@fluentui/react-charting 5.24.22 → 5.24.24

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 (90) hide show
  1. package/CHANGELOG.json +37 -1
  2. package/CHANGELOG.md +21 -2
  3. package/dist/react-charting.d.ts +6 -2
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +3 -2
  7. package/lib/components/CommonComponents/CartesianChart.base.js +1 -0
  8. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  9. package/lib/components/DeclarativeChart/DeclarativeChart.js +2 -1
  10. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  11. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
  12. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +2 -1
  13. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  14. package/lib/components/GaugeChart/GaugeChart.base.d.ts +1 -1
  15. package/lib/components/HeatMapChart/HeatMapChart.base.js +1 -1
  16. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  17. package/lib/components/HeatMapChart/HeatMapChart.styles.js +1 -8
  18. package/lib/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
  19. package/lib/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
  20. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  21. package/lib/components/ScatterChart/ScatterChart.base.js +66 -13
  22. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  23. package/lib/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  24. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  25. package/lib/utilities/utilities.d.ts +10 -10
  26. package/lib-amd/components/CommonComponents/CartesianChart.base.js +1 -0
  27. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  28. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +2 -1
  29. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  30. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
  31. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +4 -3
  32. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  33. package/lib-amd/components/FunnelChart/funnelGeometry.js +5 -6
  34. package/lib-amd/components/FunnelChart/funnelGeometry.js.map +1 -1
  35. package/lib-amd/components/GaugeChart/GaugeChart.base.d.ts +1 -1
  36. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +1 -1
  37. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  38. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js +1 -8
  39. package/lib-amd/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
  40. package/lib-amd/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
  41. package/lib-amd/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  42. package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js +1 -2
  43. package/lib-amd/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  44. package/lib-amd/components/SankeyChart/SankeyChart.base.js +4 -4
  45. package/lib-amd/components/SankeyChart/SankeyChart.base.js.map +1 -1
  46. package/lib-amd/components/ScatterChart/ScatterChart.base.js +64 -11
  47. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  48. package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  49. package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -1
  50. package/lib-amd/utilities/image-export-utils.js +2 -3
  51. package/lib-amd/utilities/image-export-utils.js.map +1 -1
  52. package/lib-amd/utilities/scatterpolar-utils.js +2 -3
  53. package/lib-amd/utilities/scatterpolar-utils.js.map +1 -1
  54. package/lib-amd/utilities/utilities.d.ts +10 -10
  55. package/lib-amd/utilities/utilities.js +39 -39
  56. package/lib-amd/utilities/utilities.js.map +1 -1
  57. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +1 -0
  58. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  59. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +2 -1
  60. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  61. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +1 -1
  62. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +4 -3
  63. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  64. package/lib-commonjs/components/FunnelChart/funnelGeometry.js +5 -6
  65. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  66. package/lib-commonjs/components/GaugeChart/GaugeChart.base.d.ts +1 -1
  67. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +1 -1
  68. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  69. package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js +1 -8
  70. package/lib-commonjs/components/HeatMapChart/HeatMapChart.styles.js.map +1 -1
  71. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.d.ts +2 -2
  72. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  73. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +1 -2
  74. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  75. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js +4 -4
  76. package/lib-commonjs/components/SankeyChart/SankeyChart.base.js.map +1 -1
  77. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +64 -11
  78. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  79. package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +4 -0
  80. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  81. package/lib-commonjs/utilities/image-export-utils.js +2 -3
  82. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  83. package/lib-commonjs/utilities/scatterpolar-utils.js +2 -3
  84. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -1
  85. package/lib-commonjs/utilities/utilities.d.ts +10 -10
  86. package/lib-commonjs/utilities/utilities.js +39 -40
  87. package/lib-commonjs/utilities/utilities.js.map +1 -1
  88. package/package.json +2 -2
  89. package/src/components/HeatMapChart/HeatMapChart.types.ts +2 -2
  90. package/src/components/ScatterChart/ScatterChart.types.ts +5 -0
@@ -1 +1 @@
1
- var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},d={month:"short",day:"2-digit"},f={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},d,d,f],[o,o,o,o,o,d,d,f],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return D}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),d={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function f(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in d)if(d.hasOwnProperty(n)&&t&&0===n.indexOf(t))return d[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:f(s.s.mini,s.BO.regular,p),xSmall:f(s.s.xSmall,s.BO.regular,p),small:f(s.s.small,s.BO.regular,p),smallPlus:f(s.s.smallPlus,s.BO.regular,p),medium:f(s.s.medium,s.BO.regular,p),mediumPlus:f(s.s.mediumPlus,s.BO.regular,p),large:f(s.s.large,s.BO.regular,p),xLarge:f(s.s.xLarge,s.BO.semibold,p),xLargePlus:f(s.s.xLargePlus,s.BO.semibold,p),xxLarge:f(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:f(s.s.xxLargePlus,s.BO.semibold,p),superLarge:f(s.s.superLarge,s.BO.semibold,p),mega:f(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function C(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function M(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");C(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),C(n,s.Dn.Arabic,"segoeui-arabic"),C(n,s.Dn.Cyrillic,"segoeui-cyrillic"),C(n,s.Dn.EastEuropean,"segoeui-easteuropean"),C(n,s.Dn.Greek,"segoeui-greek"),C(n,s.Dn.Hebrew,"segoeui-hebrew"),C(n,s.Dn.Vietnamese,"segoeui-vietnamese"),C(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),C(n,s.bi.Selawik,"selawik","selawik"),C(n,s.Dn.Armenian,"segoeui-armenian"),C(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,d=u.themeDarker,f=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,C=u.neutralTertiary,M=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),d&&(o.linkHovered=d),f&&(o.primaryButtonBackgroundHovered=f),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),C&&(o.disabledBodyText=C,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||C,o.buttonTextDisabled=C,o.inputIconDisabled=C,o.disabledText=C),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),M&&(o.disabledBodySubtext=M,o.disabledBorder=M,o.buttonBackgroundChecked=M,o.menuDivider=M),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var V={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function D(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=M({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=M(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:V,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return V},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var f="left",v="right",h="@noflip",p=((s={})[f]=v,s[v]=f,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(f)>=0)n[i]=e.replace(f,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,f);else if(String(r).indexOf(f)>=0)n[i+1]=r.replace(f,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,f);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?C([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return C([e],n,x(i,t),r)})):C([e],n,x(i,t),r)}function C(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&C(s,n,i,e)}else if(Array.isArray(l))C(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var d=l[c];if("selectors"===c){var f=l.selectors;for(var v in f)f.hasOwnProperty(v)&&w(i,n,v,f[v],e)}else"object"==typeof d||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=d&&w(i,n,c,d,e):void 0!==d&&("margin"===c||"padding"===c?M(o,c,d):o[c]=d)}}return n}function M(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),d(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=C(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,d=u.__order;c<d.length;c++){var f=d[c];s.push(f,A(t,u[f]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var d=s[c+1];if(d){var f=s[c];f=f.replace(/&/g,k(".".concat(t.className),n));var v="".concat(f,"{").concat(d,"}").concat(0===f.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function V(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return d}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,d=t.descriptionMessage,f=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,f)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,f))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],f)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],f))))),!!d&&o.createElement("div",{className:this._classNames.descriptionMessage},d))},n}(o.Component),c=i(263),d=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Mt.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Ct},dX:function(){return J}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",d="0.267s",f="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),C=G(40),M=G(400),k=q(10),A=q(20),S=q(-10),L=q(-20),V=U(10),D=U(20),N=U(40),O=U(400),T=U(-10),E=U(-20),F=U(-40),B=U(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),$=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),z=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),j=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),f,l),slideRightIn20:X("".concat(h,",").concat(y),f,l),slideRightIn40:X("".concat(h,",").concat(m),f,l),slideRightIn400:X("".concat(h,",").concat(b),f,l),slideLeftIn10:X("".concat(h,",").concat(x),f,l),slideLeftIn20:X("".concat(h,",").concat(w),f,l),slideLeftIn40:X("".concat(h,",").concat(C),f,l),slideLeftIn400:X("".concat(h,",").concat(M),f,l),slideUpIn10:X("".concat(h,",").concat(k),f,l),slideUpIn20:X("".concat(h,",").concat(A),f,l),slideDownIn10:X("".concat(h,",").concat(S),f,l),slideDownIn20:X("".concat(h,",").concat(L),f,l),slideRightOut10:X("".concat(p,",").concat(V),f,l),slideRightOut20:X("".concat(p,",").concat(D),f,l),slideRightOut40:X("".concat(p,",").concat(N),f,l),slideRightOut400:X("".concat(p,",").concat(O),f,l),slideLeftOut10:X("".concat(p,",").concat(T),f,l),slideLeftOut20:X("".concat(p,",").concat(E),f,l),slideLeftOut40:X("".concat(p,",").concat(F),f,l),slideLeftOut400:X("".concat(p,",").concat(B),f,l),slideUpOut10:X("".concat(p,",").concat(P),f,l),slideUpOut20:X("".concat(p,",").concat(_),f,l),slideDownOut10:X("".concat(p,",").concat(H),f,l),slideDownOut20:X("".concat(p,",").concat(I),f,l),scaleUpIn100:X("".concat(h,",").concat(W),f,l),scaleDownIn100:X("".concat(h,",").concat($),f,l),scaleUpOut103:X("".concat(p,",").concat(z),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,d,s),fadeIn400:X(h,f,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,d,s),fadeOut400:X(p,f,s),fadeOut500:X(p,v,s),rotate90deg:X(j,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,d=n.highContrastStyle,f=n.borderColor,v=void 0===f?t.palette.white:f,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=d,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},dt="undefined"==typeof window?i.g:window,ft=dt&&dt.CSPSettings&&dt.CSPSettings.nonce,vt=((ut=dt.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),dt.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",ft&&i.setAttribute("nonce",ft),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Ct(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Mt=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.12.2"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var d=s.subComponentStyles;for(var f in d)d.hasOwnProperty(f)&&(u.hasOwnProperty(f)?u[f].push(d[f]):u[f]=[d[f]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var f in u)g(f)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var d={settings:{},scopedSettings:{},inCustomizerContext:!1},f=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){f.settings={},f.scopedSettings={}},t.applySettings=function(n){f.settings=(0,e.Cl)((0,e.Cl)({},f.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){f.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},f.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=d);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&f.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||f.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},d=i(927),f=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?f:s,h=r.forwardRef((function(u,a){var s=r.useRef(),f=(0,d.m)(v,l),h=f.styles,p=(f.dir,(0,e.Tt)(f,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return d},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var d,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=d;(void 0===d||h!==o||n>0&&v>n)&&(d=f(),v=0,h=o),s=d;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,f()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function d(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function f(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},fX:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),d=50,f=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,C=w&&w.window?w.window:"__default__";n.has(C)||n.set(C,new Map);var M=n.get(C),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(C,new Map),M=n.get(C),i=0),t.disableCaching||(M=m(n.get(C),y),M=m(M,b)),!S&&M[p]||(M[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var d=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var f=e.nr.getInstance(c);d.stylesheet=f;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(f,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(C=(0,a.GJ)(d||{},{displayName:p},b))&&(h.push(C),s[p]=m.concat([C.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var C;(C=w[x])&&(0,a.Ae)(C,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?f:void 0}),S||i++),i>(t.cacheSize||d)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(C).clear(),i=0,t.disableCaching=!0}return M[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AreaChart:function(){return Bv},CartesianChart:function(){return qf},ChartHoverCard:function(){return Js.ChartHoverCard},ChartTable:function(){return bp},DataVizGradientPalette:function(){return Qs},DataVizPalette:function(){return Xl},DeclarativeChart:function(){return iy},DonutChart:function(){return _f},FunnelChart:function(){return Vp},GanttChart:function(){return Wg},GaugeChart:function(){return Fp},GaugeChartVariant:function(){return Lp},GaugeValueFormat:function(){return Sp},GroupedVerticalBarChart:function(){return vh},HeatMapChart:function(){return yh},HorizontalBarChart:function(){return jc},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return Cp},Legends:function(){return zd},LineChart:function(){return pv},MultiStackedBarChart:function(){return qv},MultiStackedBarChartVariant:function(){return Wv},NodesComposition:function(){return jh},PieChart:function(){return jv},ResponsiveContainer:function(){return _g},SankeyChart:function(){return qh},ScatterChart:function(){return mv},Shape:function(){return Fd},Sparkline:function(){return pp},StackedBarChart:function(){return Kv},Textbox:function(){return av},TreeChart:function(){return dp},TreeTraverse:function(){return Yh},VerticalBarChart:function(){return uh},VerticalStackedBarChart:function(){return sh},getChartHoverCardStyles:function(){return hh.J},getColorFromToken:function(){return Ql},getGradientFromToken:function(){return uc},getNextColor:function(){return Jl},getNextGradient:function(){return oc},withResponsiveContainer:function(){return Hg}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),d="__currentId__",f=(0,s.z)()||{};void 0===f[d]&&(f[d]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+f[d]++}function g(t){void 0===t&&(t=0),f[d]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var C=i(543);function M(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!D(n)&&!N(n))){var d=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(d){if(a&&V(d,!0,l)||!a)return d;var f=k(t,d.previousElementSibling,!0,!0,!0,o,u,a,l);if(f)return f;for(var v=d.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&V(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var d=(l?L:S)(n);if(i&&d&&V(n,a,s))return n;if(!r&&d&&(o||!D(n)&&!N(n))){var f=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(f)return f}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function V(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function D(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function $(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function z(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function j(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,q,U=i(916),Z=((0,U.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,C.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(q||(q={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function dt(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function ft(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):ft(a=dt(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?dt(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?dt(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Mt(n),d=o?i:-1*i,f=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=f,-1*l),e)||(f=bt(t,f,e)),s[G[d]]=st(t,c,d),s[G[f]]=st(t,c,f),a&&(s[G[-1*d]]=st(t,c,-1*d),s[G[-1*f]]=st(t,c,-1*f)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Ct(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,d=e.alignTargetEdge,f={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(f=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,d=e.targetEdge,f=e.alignmentEdge,v=d,h=f,p=0;p<4;p++){if(ft(c,i,d))return{elementRectangle:c,targetEdge:d,alignmentEdge:f};if(r&&ht(n,i,d,o)){switch(d){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:d,alignmentEdge:f,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=d,h=f),a.splice(a.indexOf(d),1),a.length>0&&(a.indexOf(-1*d)>-1?d*=-1:(f=d,d=a.slice(-1)[0]),c=yt(t,n,{targetEdge:d,alignmentEdge:f},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(f.elementRectangle,i),h=a?-f.targetEdge:void 0;if(v.length>0)if(d)if(f.alignmentEdge&&v.indexOf(-1*f.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(f,n,u,s);if(it(p.elementRectangle,i))return p;f=pt(et(p.elementRectangle,i),f,i,h)}else f=pt(v,f,i,h);else f=pt(v,f,i,h);return f}(c,n,i,e,o,u,r,a,s)}function Mt(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Mt(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var d=c[s];i[G[d]]=t[G[d]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),d=Ct(Mt(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},d),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),d=t.isBeakVisible&&t.beakWidth||0,f=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=f;var h,p,g,y,m,b,x,w,M,k=t.bounds?(M=t.bounds,new Q(M.left,M.right,M.top,M.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,C.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return ft(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?ft(l,a,o)||(l=dt(l,a,o)):l=dt(l,a,r),l}(d,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Vt(t){var n=(0,C.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Dt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var d=function(n){var i=Date.now(),f=i-s,v=a?u-f:u;return f>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(d,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,d(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,d=0,f=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),f=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-d>=a&&(i=!0),d=n);var r=n-d,u=a-r,h=n-f,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef();return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Vt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,C.Y)().activeElement,t=n.current,(u=(i=(0,C.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,C.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,d=i.ariaDescribedBy,f=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Dt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},$(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":d,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},f)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef();return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,$t=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},zt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},jt=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},qt=(0,a.Z)({disableCaching:!0});function Ut(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,d=t.gapSpace,f=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,d=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,d):Mt(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,f,d)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,d,f,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),d=c[0],f=c[1],v=u.useRef(0),h=u.useRef(),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,C=t.hideOverflow,M=t.preferScrollResizePositioning,k=$t(),A=u.useRef();A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?d:void 0,A=M&&!(C||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!d&&L||d&&L&&(c=L,!Qt((l=d).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,f(L)):v.current>0&&(v.current=0,null==x||x(d))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}f(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,d,t,y,C,M,S,k]),d}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,d=i.isBeakVisible,f=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,V=void 0===L||L,D=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),j=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,C.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],q=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],d=u.useRef(),f=u.useCallback((function(){if(!d.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),d.current=t,s&&c(!1)}return d.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),f}(i,X,G),U=Zt(i,B,H,X,q,P),Z=Ut(i,q,X,U),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,d=t.dismissOnTargetClick,f=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||d||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){f&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,f,d,c,s,l,y,v]),g}(i,U,B,X,G),J=K[0],Q=K[1],tt=(null==U?void 0:U.elementPosition.top)&&(null==U?void 0:U.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==U?void 0:U.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return M(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,U,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=d&&!!D,rt=qt(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:U,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:j,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},$(i,R,Xt),{className:z(rt.root,U&&U.targetEdge&&jt[U.targetEdge]),style:U?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(U)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:V,style:ot},T,{ref:P}),f)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,d=(0,It.Km)(nn,i),f=i.semanticColors,v=i.effects;return{container:[d.container,{position:"relative"}],root:[d.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[d.beak,{position:"absolute",backgroundColor:f.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[d.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:f.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[d.calloutMain,{backgroundColor:f.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),dn=i(770);function fn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(dn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:fn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(dn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),d=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,C.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,d),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,d=t.theme,f=$(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},f,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(d,"rtl"===c)}},g)),g}(t,c,d,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Cn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Mn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Vn="#".concat(Ln),Dn=i(921),Nn=(0,Dn.S)()?u.useLayoutEffect:u.useEffect,On=(0,a.Z)(),Tn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(),s=u.useRef(null),c=u.useContext(ln),d=u.useState(!1),f=d[0],v=d[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Mn.Y2);t&&i&&t.classList.add(Mn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,M=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,V=t.theme,D=Et(s,null==m?void 0:m.ref,h),N=On(L,{theme:V,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,C.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Vn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&f&&(null==A||A(),null==M||M(),v(!1))}),[f,A,M]),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:D},u.createElement(Cn,(0,o.Cl)({},!y&&(bn||(bn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return bn[t]=En}))),bn),m,{className:z(N.content,null==m?void 0:m.className),ref:D}),p)),l.current))}));Tn.displayName="LayerBase";var En=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},Fn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},Bn=(0,r.I)(Tn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(Fn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),Pn=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(Bn,(0,o.Cl)({},i),a)}));Pn.displayName="Callout";var _n=i(61);function Hn(t){return t}var In=1e-6;function Wn(t){return"translate("+t+",0)"}function Rn(t){return"translate(0,"+t+")"}function $n(t){return n=>+t(n)}function zn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function jn(){return!this.__axis}function Yn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",d=1===t||3===t?Wn:Rn;function f(f){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Hn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?zn:$n)(n.copy(),l),x=f.selection?f.selection():f,w=x.selectAll(".domain").data([null]),C=x.selectAll(".tick").data(v,n).order(),M=C.exit(),k=C.enter().append("g").attr("class","tick"),A=C.select("line"),S=C.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==x&&(w=w.transition(f),C=C.transition(f),A=A.transition(f),S=S.transition(f),M=M.transition(f).attr("opacity",In).attr("transform",(function(t){return isFinite(t=b(t))?d(t+l):this.getAttribute("transform")})),k.attr("opacity",In).attr("transform",(function(t){var n=this.parentNode.__axis;return d((n&&isFinite(n=n(t))?n:b(t))+l)}))),M.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),C.attr("opacity",1).attr("transform",(function(t){return d(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return i=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),f):i.slice()},f.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),f):e&&e.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(l=+t,f):l},f}function Xn(t){return Yn(2,t)}function Gn(t){return Yn(3,t)}function qn(t){return Yn(4,t)}const Un=Math.sqrt(50),Zn=Math.sqrt(10),Kn=Math.sqrt(2);function Jn(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=Un?10:o>=Zn?5:o>=Kn?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?Jn(t,n,2*i):[a,l,s]}function Qn(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?Jn(n,t,i):Jn(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function ti(t,n,i){return Jn(t=+t,n=+n,i=+i)[2]}function ni(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?ti(n,t,i):ti(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ii(t,n,i){let e;for(;;){const r=ti(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function ei(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function ri(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function oi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function ui(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function ai(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function li(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function si(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?li:function(t=ai){if(t===ai)return li;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);si(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(ci(t,i,n),r(t[e],o)>0&&ci(t,i,e);u<a;){for(ci(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?ci(t,i,a):(++a,ci(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function ci(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function di(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return ei(t);if(n>=1)return ri(t);var e,r=(e-1)*n,o=Math.floor(r),u=ri(si(t,o).subarray(0,o+1));return u+(ei(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function fi(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function vi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=ai,i=(n,i)=>ai(t(n),i),e=(n,i)=>t(n)-i):(n=t===ai||t===fi?t:hi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function hi(){return 0}const pi=1e3,gi=6e4,yi=36e5,mi=864e5,bi=6048e5,xi=31536e6,wi=new Date,Ci=new Date;function Mi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Mi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(wi.setTime(+n),Ci.setTime(+e),t(wi),t(Ci),Math.floor(i(wi,Ci))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const ki=Mi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));ki.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Mi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):ki:null),ki.range;const Ai=Mi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*pi)}),((t,n)=>(n-t)/pi),(t=>t.getUTCSeconds())),Si=(Ai.range,Mi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi)}),((t,n)=>{t.setTime(+t+n*gi)}),((t,n)=>(n-t)/gi),(t=>t.getMinutes()))),Li=(Si.range,Mi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*gi)}),((t,n)=>(n-t)/gi),(t=>t.getUTCMinutes()))),Vi=(Li.range,Mi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi-t.getMinutes()*gi)}),((t,n)=>{t.setTime(+t+n*yi)}),((t,n)=>(n-t)/yi),(t=>t.getHours()))),Di=(Vi.range,Mi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*yi)}),((t,n)=>(n-t)/yi),(t=>t.getUTCHours()))),Ni=(Di.range,Mi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gi)/mi),(t=>t.getDate()-1))),Oi=(Ni.range,Mi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/mi),(t=>t.getUTCDate()-1))),Ti=(Oi.range,Mi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/mi),(t=>Math.floor(t/mi))));function Ei(t){return Mi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gi)/bi))}Ti.range;const Fi=Ei(0),Bi=Ei(1),Pi=Ei(2),_i=Ei(3),Hi=Ei(4),Ii=Ei(5),Wi=Ei(6);function Ri(t){return Mi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/bi))}Fi.range,Bi.range,Pi.range,_i.range,Hi.range,Ii.range,Wi.range;const $i=Ri(0),zi=Ri(1),ji=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),qi=Ri(6),Ui=($i.range,zi.range,ji.range,Yi.range,Xi.range,Gi.range,qi.range,Mi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Zi=(Ui.range,Mi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Ki=(Zi.range,Mi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Ki.every=t=>isFinite(t=Math.floor(t))&&t>0?Mi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,Ki.range;const Ji=Mi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Qi(t,n,i,e,r,o){const u=[[Ai,1,pi],[Ai,5,5e3],[Ai,15,15e3],[Ai,30,3e4],[o,1,gi],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,yi],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,mi],[e,2,1728e5],[i,1,bi],[n,1,2592e6],[n,3,7776e6],[t,1,xi]];function a(n,i,e){const r=Math.abs(i-n)/e,o=vi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(ni(n/xi,i/xi,e));if(0===o)return ki.every(Math.max(ni(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}Ji.every=t=>isFinite(t=Math.floor(t))&&t>0?Mi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,Ji.range;const[te,ne]=Qi(Ji,Zi,$i,Ti,Di,Li),[ie,ee]=Qi(Ki,Ui,Fi,Ni,Vi,Si);var re=new Date,oe=new Date;function ue(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return ue((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return re.setTime(+n),oe.setTime(+e),t(re),t(oe),Math.floor(i(re,oe))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const ae=864e5,le=6048e5;function se(t){return ue((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/le}))}var ce=se(0),de=se(1),fe=se(2),ve=se(3),he=se(4),pe=se(5),ge=se(6),ye=(ce.range,de.range,fe.range,ve.range,he.range,pe.range,ge.range,ue((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/ae}),(function(t){return t.getUTCDate()-1}))),me=ye;function be(t){return ue((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/le}))}ye.range;var xe=be(0),we=be(1),Ce=be(2),Me=be(3),ke=be(4),Ae=be(5),Se=be(6),Le=(xe.range,we.range,Ce.range,Me.range,ke.range,Ae.range,Se.range,ue((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ae),(t=>t.getDate()-1))),Ve=Le,De=(Le.range,ue((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));De.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ue((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var Ne=De,Oe=(De.range,ue((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Oe.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ue((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var Te=Oe;function Ee(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fe(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Be(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function Pe(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=Xe(r),c=Ge(r),d=Xe(o),f=Ge(o),v=Xe(u),h=Ge(u),p=Xe(a),g=Ge(a),y=Xe(l),m=Ge(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:hr,e:hr,f:br,g:Nr,G:Tr,H:pr,I:gr,j:yr,L:mr,m:xr,M:wr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:no,s:io,S:Cr,u:Mr,U:kr,V:Sr,w:Lr,W:Vr,x:null,X:null,y:Dr,Y:Or,Z:Er,"%":to},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Fr,e:Fr,f:Ir,g:Zr,G:Jr,H:Br,I:Pr,j:_r,L:Hr,m:Wr,M:Rr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:no,s:io,S:$r,u:zr,U:jr,V:Xr,w:Gr,W:qr,x:null,X:null,y:Ur,Y:Kr,Z:Qr,"%":to},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=d.exec(n.slice(i));return e?(t.w=f.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:rr,e:rr,f:cr,g:tr,G:Qe,H:ur,I:ur,j:or,L:sr,m:er,M:ar,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:ir,Q:fr,s:vr,S:lr,u:Ue,U:Ze,V:Ke,w:qe,W:Je,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:tr,Y:Qe,Z:nr,"%":dr};function C(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=We[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function M(t,n){return function(i){var e,r,o=Be(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=Fe(Be(o.y,0,1))).getUTCDay(),e=r>4||0===r?de.ceil(e):de(e),e=me.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Ee(Be(o.y,0,1))).getDay(),e=r>4||0===r?we.ceil(e):we(e),e=Ve.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?Fe(Be(o.y,0,1)).getUTCDay():Ee(Be(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Fe(o)):Ee(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in We?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=C(i,b),b.X=C(e,b),b.c=C(n,b),x.x=C(i,x),x.X=C(e,x),x.c=C(n,x),{format:function(t){var n=C(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=C(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}Oe.range;var _e,He,Ie,We={"-":"",_:" ",0:"0"},Re=/^\s*\d+/,$e=/^%/,ze=/[\\^$*+?|[\]().{}]/g;function je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Ye(t){return t.replace(ze,"\\$&")}function Xe(t){return new RegExp("^(?:"+t.map(Ye).join("|")+")","i")}function Ge(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function qe(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function Ue(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function Ze(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function Ke(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function Je(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function Qe(t,n,i){var e=Re.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function tr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function nr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function ir(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function er(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function rr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function or(t,n,i){var e=Re.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function sr(t,n,i){var e=Re.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function cr(t,n,i){var e=Re.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function dr(t,n,i){var e=$e.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function fr(t,n,i){var e=Re.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=Re.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function hr(t,n){return je(t.getDate(),n,2)}function pr(t,n){return je(t.getHours(),n,2)}function gr(t,n){return je(t.getHours()%12||12,n,2)}function yr(t,n){return je(1+Ve.count(Ne(t),t),n,3)}function mr(t,n){return je(t.getMilliseconds(),n,3)}function br(t,n){return mr(t,n)+"000"}function xr(t,n){return je(t.getMonth()+1,n,2)}function wr(t,n){return je(t.getMinutes(),n,2)}function Cr(t,n){return je(t.getSeconds(),n,2)}function Mr(t){var n=t.getDay();return 0===n?7:n}function kr(t,n){return je(xe.count(Ne(t)-1,t),n,2)}function Ar(t){var n=t.getDay();return n>=4||0===n?ke(t):ke.ceil(t)}function Sr(t,n){return t=Ar(t),je(ke.count(Ne(t),t)+(4===Ne(t).getDay()),n,2)}function Lr(t){return t.getDay()}function Vr(t,n){return je(we.count(Ne(t)-1,t),n,2)}function Dr(t,n){return je(t.getFullYear()%100,n,2)}function Nr(t,n){return je((t=Ar(t)).getFullYear()%100,n,2)}function Or(t,n){return je(t.getFullYear()%1e4,n,4)}function Tr(t,n){var i=t.getDay();return je((t=i>=4||0===i?ke(t):ke.ceil(t)).getFullYear()%1e4,n,4)}function Er(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+je(n/60|0,"0",2)+je(n%60,"0",2)}function Fr(t,n){return je(t.getUTCDate(),n,2)}function Br(t,n){return je(t.getUTCHours(),n,2)}function Pr(t,n){return je(t.getUTCHours()%12||12,n,2)}function _r(t,n){return je(1+me.count(Te(t),t),n,3)}function Hr(t,n){return je(t.getUTCMilliseconds(),n,3)}function Ir(t,n){return Hr(t,n)+"000"}function Wr(t,n){return je(t.getUTCMonth()+1,n,2)}function Rr(t,n){return je(t.getUTCMinutes(),n,2)}function $r(t,n){return je(t.getUTCSeconds(),n,2)}function zr(t){var n=t.getUTCDay();return 0===n?7:n}function jr(t,n){return je(ce.count(Te(t)-1,t),n,2)}function Yr(t){var n=t.getUTCDay();return n>=4||0===n?he(t):he.ceil(t)}function Xr(t,n){return t=Yr(t),je(he.count(Te(t),t)+(4===Te(t).getUTCDay()),n,2)}function Gr(t){return t.getUTCDay()}function qr(t,n){return je(de.count(Te(t)-1,t),n,2)}function Ur(t,n){return je(t.getUTCFullYear()%100,n,2)}function Zr(t,n){return je((t=Yr(t)).getUTCFullYear()%100,n,2)}function Kr(t,n){return je(t.getUTCFullYear()%1e4,n,4)}function Jr(t,n){var i=t.getUTCDay();return je((t=i>=4||0===i?he(t):he.ceil(t)).getUTCFullYear()%1e4,n,4)}function Qr(){return"+0000"}function to(){return"%"}function no(t){return+t}function io(t){return Math.floor(+t/1e3)}_e=Pe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),He=_e.format,_e.parse,Ie=_e.utcFormat,_e.utcParse;const eo=vi(ai),ro=eo.right;eo.left,vi((function(t){return null===t?NaN:+t})).center;var oo=ro;function uo(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function ao(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function lo(){}var so=.7,co=1/so,fo="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",po=/^#([0-9a-f]{3,8})$/,go=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),yo=new RegExp(`^rgb\\(${ho},${ho},${ho}\\)$`),mo=new RegExp(`^rgba\\(${fo},${fo},${fo},${vo}\\)$`),bo=new RegExp(`^rgba\\(${ho},${ho},${ho},${vo}\\)$`),xo=new RegExp(`^hsl\\(${vo},${ho},${ho}\\)$`),wo=new RegExp(`^hsla\\(${vo},${ho},${ho},${vo}\\)$`),Co={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mo(){return this.rgb().formatHex()}function ko(){return this.rgb().formatRgb()}function Ao(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=po.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?So(n):3===i?new Do(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Lo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Lo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=go.exec(t))?new Do(n[1],n[2],n[3],1):(n=yo.exec(t))?new Do(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=mo.exec(t))?Lo(n[1],n[2],n[3],n[4]):(n=bo.exec(t))?Lo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=xo.exec(t))?Bo(n[1],n[2]/100,n[3]/100,1):(n=wo.exec(t))?Bo(n[1],n[2]/100,n[3]/100,n[4]):Co.hasOwnProperty(t)?So(Co[t]):"transparent"===t?new Do(NaN,NaN,NaN,0):null}function So(t){return new Do(t>>16&255,t>>8&255,255&t,1)}function Lo(t,n,i,e){return e<=0&&(t=n=i=NaN),new Do(t,n,i,e)}function Vo(t,n,i,e){return 1===arguments.length?((r=t)instanceof lo||(r=Ao(r)),r?new Do((r=r.rgb()).r,r.g,r.b,r.opacity):new Do):new Do(t,n,i,null==e?1:e);var r}function Do(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function No(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}`}function Oo(){const t=To(this.opacity);return`${1===t?"rgb(":"rgba("}${Eo(this.r)}, ${Eo(this.g)}, ${Eo(this.b)}${1===t?")":`, ${t})`}`}function To(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fo(t){return((t=Eo(t))<16?"0":"")+t.toString(16)}function Bo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new _o(t,n,i,e)}function Po(t){if(t instanceof _o)return new _o(t.h,t.s,t.l,t.opacity);if(t instanceof lo||(t=Ao(t)),!t)return new _o;if(t instanceof _o)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new _o(u,a,l,t.opacity)}function _o(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Ho(t){return(t=(t||0)%360)<0?t+360:t}function Io(t){return Math.max(0,Math.min(1,t||0))}function Wo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function Ro(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}uo(lo,Ao,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Mo,formatHex:Mo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Po(this).formatHsl()},formatRgb:ko,toString:ko}),uo(Do,Vo,ao(lo,{brighter(t){return t=null==t?co:Math.pow(co,t),new Do(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?so:Math.pow(so,t),new Do(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Do(Eo(this.r),Eo(this.g),Eo(this.b),To(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:No,formatHex:No,formatHex8:function(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}${Fo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Oo,toString:Oo})),uo(_o,(function(t,n,i,e){return 1===arguments.length?Po(t):new _o(t,n,i,null==e?1:e)}),ao(lo,{brighter(t){return t=null==t?co:Math.pow(co,t),new _o(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?so:Math.pow(so,t),new _o(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new Do(Wo(t>=240?t-240:t+120,r,e),Wo(t,r,e),Wo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new _o(Ho(this.h),Io(this.s),Io(this.l),To(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=To(this.opacity);return`${1===t?"hsl(":"hsla("}${Ho(this.h)}, ${100*Io(this.s)}%, ${100*Io(this.l)}%${1===t?")":`, ${t})`}`}}));var $o=t=>()=>t;function zo(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):$o(isNaN(t)?n:t)}var jo=function t(n){var i=function(t){return 1===(t=+t)?zo:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):$o(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Vo(t)).r,(n=Vo(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=zo(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Yo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Vo(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function Xo(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=tu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function Go(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function qo(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function Uo(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=tu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Yo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return Ro((i-e/n)*n,u,r,o,a)}})),Yo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return Ro((i-e/n)*n,r,o,u,a)}}));var Zo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ko=new RegExp(Zo.source,"g");function Jo(t,n){var i,e,r,o=Zo.lastIndex=Ko.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=Zo.exec(t))&&(e=Ko.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:qo(i,e)})),o=Ko.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function Qo(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function tu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?$o(n):("number"===r?qo:"string"===r?(i=Ao(n))?(n=i,jo):Jo:n instanceof Ao?jo:n instanceof Date?Go:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?Xo:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Uo:qo:Qo))(t,n)}function nu(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function iu(t){return+t}var eu=[0,1];function ru(t){return t}function ou(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function uu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=ou(r,e),o=i(u,o)):(e=ou(e,r),o=i(o,u)),function(t){return o(e(t))}}function au(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=ou(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=oo(t,n,1,e)-1;return o[i](r[i](n))}}function lu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function su(){var t,n,i,e,r,o,u=eu,a=eu,l=tu,s=ru;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==ru&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?au:uu,r=o=null,d}function d(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return d.invert=function(i){return s(n((o||(o=e(a,u.map(t),qo)))(i)))},d.domain=function(t){return arguments.length?(u=Array.from(t,iu),c()):u.slice()},d.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},d.rangeRound=function(t){return a=Array.from(t),l=nu,c()},d.clamp=function(t){return arguments.length?(s=!!t||ru,c()):s!==ru},d.interpolate=function(t){return arguments.length?(l=t,c()):l},d.unknown=function(t){return arguments.length?(i=t,d):i},function(i,e){return t=i,n=e,c()}}function cu(){return su()(ru,ru)}function du(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function fu(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function vu(t){return new Date(t)}function hu(t){return t instanceof Date?+t:+new Date(+t)}function pu(t,n,i,e,r,o,u,a,l,s){var c=cu(),d=c.invert,f=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(d(t))},c.domain=function(t){return arguments.length?f(Array.from(t,hu)):f().map(vu)},c.ticks=function(n){var i=f();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=f();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?f(fu(i,t)):c},c.copy=function(){return lu(c,pu(t,n,i,e,r,o,u,a,l,s))},c}function gu(){return du.apply(pu(ie,ee,Ki,Ui,Fi,Ni,Vi,Si,Ai,He).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function yu(){return du.apply(pu(te,ne,Ji,Zi,$i,Oi,Di,Li,Ai,Ie).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function mu(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class bu extends Map{constructor(t,n=wu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(xu(this,t))}has(t){return super.has(xu(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function xu({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function wu(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Cu=Symbol("implicit");function Mu(){var t=new bu,n=[],i=[],e=Cu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Cu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new bu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Mu(n,i).unknown(e)},du.apply(r,arguments),r}function ku(){var t,n,i=Mu().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function d(){var i=e().length,d=u<o,f=d?u:o,v=d?o:u;t=(v-f)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),f+=(v-f-t*(i-l))*c,n=t*(1-l),a&&(f=Math.round(f),n=Math.round(n));var h=mu(i).map((function(n){return f+t*n}));return r(d?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),d()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,d()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,d()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,d()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),d()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),d()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,d()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),d()):c},i.copy=function(){return ku(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},du.apply(d(),arguments)}var Au,Su=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lu(t){if(!(n=Su.exec(t)))throw new Error("invalid format: "+t);var n;return new Vu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Vu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Du(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Nu(t){return(t=Du(Math.abs(t)))?t[1]:NaN}function Ou(t,n){var i=Du(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Lu.prototype=Vu.prototype,Vu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Tu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Ou(100*t,n),r:Ou,s:function(t,n){var i=Du(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Au=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+Du(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Eu(t){return t}var Fu,Bu,Pu,_u=Array.prototype.map,Hu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Iu(){var t=cu();return t.copy=function(){return lu(t,Iu())},du.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return Qn(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=ni(t,n,i);switch((e=Lu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Nu(n)/3)))-Nu(Math.abs(t)))}(o,u))||(e.precision=r),Pu(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Nu(n)-Nu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Nu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return Bu(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=ti(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Wu(t){return Math.log(t)}function Ru(t){return Math.exp(t)}function $u(t){return-Math.log(-t)}function zu(t){return-Math.exp(-t)}function ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Yu(t){return(n,i)=>-t(-n,i)}function Xu(){const t=function(t){const n=t(Wu,Ru),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Yu(e),r=Yu(r),t($u,zu)):t(Wu,Ru),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,d=e(u),f=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&f-d<v){if(d=Math.floor(d),f=Math.ceil(f),u>0){for(;d<=f;++d)for(s=1;s<o;++s)if(c=d<0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}}else for(;d<=f;++d)for(s=o-1;s>=1;--s)if(c=d>0?s/r(-d):s*r(d),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=Qn(u,a,v))}else h=Qn(d,f,Math.min(f-d,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Lu(i)).precision||(i.trim=!0),i=Bu(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(fu(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(su()).domain([1,10]);return t.copy=()=>lu(t,Xu()).base(t.base()),du.apply(t,arguments),t}function Gu(){}function qu(t){return null==t?Gu:function(){return this.querySelector(t)}}function Uu(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Zu(){return[]}function Ku(t){return function(n){return n.matches(t)}}Fu=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Eu:(n=_u.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Eu:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(_u.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function d(t){var n=(t=Lu(t)).fill,i=t.align,d=t.sign,f=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Tu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?o:/[%p]/.test(m)?l:"",w=Tu[m],C=/[defgprs%]/.test(m);function M(t){var r,o,l,f=b,M=x;if("c"===m)M=w(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,M=("s"===m?Hu[8+Au/3]:"")+M+(k&&"("===d?")":""),C)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){M=(46===l?u+t.slice(r+1):t.slice(r))+M,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=f.length+t.length+M.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-M.length:1/0),S=""),i){case"<":t=f+t+M+S;break;case"=":t=f+S+t+M;break;case"^":t=S.slice(0,A=S.length>>1)+f+t+M+S.slice(A);break;default:t=S+f+t+M}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:d,formatPrefix:function(t,n){var i=d(((t=Lu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Nu(n)/3))),r=Math.pow(10,-e),o=Hu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Bu=Fu.format,Pu=Fu.formatPrefix;var Ju=Array.prototype.find;function Qu(){return this.firstElementChild}var ta=Array.prototype.filter;function na(){return Array.from(this.children)}function ia(t){return new Array(t.length)}function ea(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function ra(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new ea(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function oa(t,n,i,e,r,o,u){var a,l,s,c=new Map,d=n.length,f=o.length,v=new Array(d);for(a=0;a<d;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<f;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new ea(t,o[a]);for(a=0;a<d;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ua(t){return t.__data__}function aa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function la(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}ea.prototype={constructor:ea,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var sa="http://www.w3.org/1999/xhtml",ca={svg:"http://www.w3.org/2000/svg",xhtml:sa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function da(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ca.hasOwnProperty(n)?{space:ca[n],local:t}:t}function fa(t){return function(){this.removeAttribute(t)}}function va(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ha(t,n){return function(){this.setAttribute(t,n)}}function pa(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ga(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function ya(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function ma(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ba(t){return function(){this.style.removeProperty(t)}}function xa(t,n,i){return function(){this.style.setProperty(t,n,i)}}function wa(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Ca(t){return function(){delete this[t]}}function Ma(t,n){return function(){this[t]=n}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Aa(t){return t.trim().split(/^|\s+/)}function Sa(t){return t.classList||new La(t)}function La(t){this._node=t,this._names=Aa(t.getAttribute("class")||"")}function Va(t,n){for(var i=Sa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function Da(t,n){for(var i=Sa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Na(t){return function(){Va(this,t)}}function Oa(t){return function(){Da(this,t)}}function Ta(t,n){return function(){(n.apply(this,arguments)?Va:Da)(this,t)}}function Ea(){this.textContent=""}function Fa(t){return function(){this.textContent=t}}function Ba(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Pa(){this.innerHTML=""}function _a(t){return function(){this.innerHTML=t}}function Ha(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ia(){this.nextSibling&&this.parentNode.appendChild(this)}function Wa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ra(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===sa&&n.documentElement.namespaceURI===sa?n.createElement(t):n.createElementNS(i,t)}}function $a(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function za(t){var n=da(t);return(n.local?$a:Ra)(n)}function ja(){return null}function Ya(){var t=this.parentNode;t&&t.removeChild(this)}function Xa(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Ga(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function qa(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function Ua(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function Za(t,n,i){var e=ma(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function Ka(t,n){return function(){return Za(this,t,n)}}function Ja(t,n){return function(){return Za(this,t,n.apply(this,arguments))}}La.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Qa=[null];function tl(t,n){this._groups=t,this._parents=n}function nl(t){return"string"==typeof t?new tl([[document.querySelector(t)]],[document.documentElement]):new tl([[t]],Qa)}function il(t){return"string"==typeof t?new tl([document.querySelectorAll(t)],[document.documentElement]):new tl([Uu(t)],Qa)}function el(t){this._context=t}function rl(t){return new el(t)}function ol(t){this._context=t}function ul(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function al(t){return new ol(t)}function ll(t,n){this._context=t,this._t=n}function sl(t){return new ll(t,.5)}function cl(t){return new ll(t,0)}function dl(t){return new ll(t,1)}function fl(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function vl(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=fl(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return hl(t),!0}catch{return!1}}function hl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function pl(t,n){t=fl(t);try{const i=hl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}function gl(t){for(const[n,i]of Object.entries(t))if("object"!=typeof i||Array.isArray(i)||null===i){if("bdata"===n&&"string"==typeof i&&vl(i)){const e=t.dtype||"utf-8";t[n]=pl(i,e)}else if(Array.isArray(i))for(let t=0;t<i.length;t++)"object"==typeof i[t]&&null!==i[t]&&gl(i[t])}else gl(i)}function yl(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(yl(t.slice(n*r,(n+1)*r),e));return o}function ml(t){const n=JSON.parse(JSON.stringify(t.data));if(gl(t.data),JSON.stringify(t.data)!==JSON.stringify(n)){for(const n of t.data||[])["y","x","z","r","theta","values"].forEach((t=>{if(n[t]&&"object"==typeof n[t]&&"bdata"in n[t]){const i=n[t].bdata;let e=n[t].shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Ol(t)||(t=void 0)}catch(n){const i=e.split(",").map((t=>Number(t.trim())));i.every((t=>!isNaN(t)))?t=i:e=void 0}e=t}void 0!==e&&Ol(e)?n[t]=yl(i,e):n[t]=i}}));return t}return t.data=n,t}tl.prototype=function(){return new tl([[document.documentElement]],Qa)}.prototype={constructor:tl,select:function(t){"function"!=typeof t&&(t=qu(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new tl(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Uu(t.apply(this,arguments))}}(t):function(t){return null==t?Zu:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new tl(e,r)},selectChild:function(t){return this.select(null==t?Qu:function(t){return function(){return Ju.call(this.children,t)}}("function"==typeof t?t:Ku(t)))},selectChildren:function(t){return this.selectAll(null==t?na:function(t){return function(){return ta.call(this.children,t)}}("function"==typeof t?t:Ku(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new tl(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ua);var i,e=n?oa:ra,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var d=r[c],f=o[c],v=f.length,h=aa(t.call(d,d&&d.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(d,f,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new tl(a,r))._enter=l,a._exit=s,a},enter:function(){return new tl(this._enter||this._groups.map(ia),this._parents)},exit:function(){return new tl(this._exit||this._groups.map(ia),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],d=e[l],f=c.length,v=a[l]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new tl(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=la);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new tl(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=da(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?va:fa:"function"==typeof n?i.local?ya:ga:i.local?pa:ha)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?ba:"function"==typeof n?wa:xa)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||ma(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Ca:"function"==typeof n?ka:Ma)(t,n)):this.node()[t]},classed:function(t,n){var i=Aa(t+"");if(arguments.length<2){for(var e=Sa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Ta:n?Na:Oa)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ea:("function"==typeof t?Ba:Fa)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Pa:("function"==typeof t?Ha:_a)(t)):this.node().innerHTML},raise:function(){return this.each(Ia)},lower:function(){return this.each(Wa)},append:function(t){var n="function"==typeof t?t:za(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:za(t),e=null==n?ja:"function"==typeof n?n:qu(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Ya)},clone:function(t){return this.select(t?Ga:Xa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?Ua:qa,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?Ja:Ka)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=ul(t),r=ul(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const bl="Unsupported chart - type :",xl=t=>!isNaN(parseFloat(t))&&isFinite(t),wl=t=>{if(xl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Cl=(t,n,...i)=>!!Ol(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),Ml=t=>Cl(t,(t=>wl(t)||null===t)),kl=t=>Cl(t,(t=>"string"==typeof t&&xl(t)||"number"==typeof t||null===t)),Al=t=>Cl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Sl=t=>Cl(t,(t=>(t=>{if(xl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),Ll=t=>Cl(t,(t=>"string"==typeof t||null===t)),Vl=t=>Cl(t,(t=>"object"==typeof t&&null!==t&&!Ol(t))),Dl=t=>null==t||"number"==typeof t&&!isFinite(t),Nl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"&lt;").replace(/>/g,"&gt;"):t[i]=Nl(t[i],n+1));return t};function Ol(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const Tl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!kl(t.y))throw new Error("Non numeric Y values encountered.")},El=t=>["markers","text+markers","markers+text","text"].includes(t),Fl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(El(o)){if(!kl(t.x)&&!Ll(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!kl(t.y))throw new Error(`${bl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}else{if(!["lines+markers","markers+lines","text+lines+markers","lines","text+lines","lines+text","lines+markers+text"].includes(o))throw new Error(`${bl} ${t.type}, mode: ${o}, Unsupported mode`);if(!kl(t.x)&&!Ll(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!kl(t.y)&&!Ll(t.y))throw new Error(`${bl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}const l=Wl(t),s=Rl(t);if(l&&s)throw new Error(`${bl} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported for AreaChart.`);if(s&&Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported for VSBC fallback.`)},Bl=(t,n)=>{const i=Hl(t);return Object.keys(i).some((t=>{var e;const r=Il(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Pl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${bl} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)},t=>Tl(t,!1)],bar:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)},t=>{(t=>{if("h"===t.orientation){if(!kl(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!_l(t)&&Ml(t.x))throw new Error(`${bl} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);Tl(t,!1)}else if(!kl(t.y)&&!Ll(t.y)&&!Vl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;Dl(n)||Dl(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||Dl(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(Dl(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${bl} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>Fl(t,n)],scattergl:[(t,n)=>Fl(t,n)],scatterpolar:[t=>{if(!kl(t.theta)&&!Ll(t.theta))throw new Error(`${bl} ${t.type}, theta values must be array of numbers or strings`);if(!kl(t.r))throw new Error(`${bl} ${t.type}, Non numeric r values`)}],funnel:[t=>Tl(t,!1)],histogram2d:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)}]},_l=t=>Ml(t.base)||kl(t.base),Hl=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Il=(t,n)=>`${t}axis${n>1?n:""}`,Wl=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Rl=t=>{var n;if(El(null!==(n=t.mode)&&void 0!==n?n:""))return!1;const i=Ml(t.x),e=kl(t.x),r=Sl(t.x),o=Al(t.x),u=Ll(t.y);return!((i||e||o)&&!r&&!u)};var $l,zl,jl,Yl,Xl={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},Gl={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},ql={qualitative:Gl,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},Ul=Object.values(Gl),Zl=Object.values(Xl),Kl=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},Jl=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=Ul[(t+n)%Ul.length];return Kl(e,i)},Ql=function(t,n){if(void 0===n&&(n=!1),Zl.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=ql[e][r];return Kl(o,n)}return t},ts=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ns=function(t){var n=t.r,i=t.g,e=t.b;return{r:ts(n/255),g:ts(i/255),b:ts(e/255)}},is=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},es=function(t,n){var i=is(ns(Vo(t))),e=is(ns(Vo(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)};function rs(t,n){void 0===n&&(n=!1);var i=Pu(".2~",t);Math.abs(t)<1?i=Bu(".2~g"):n&&Math.abs(t)>=1e3&&(i=Pu(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function os(t){return rs(t)}function us(t,n,i,e,r){var o,u=t.domainNRangeValues,a=t.showRoundOffXTickValues,l=void 0===a||a,s=t.xAxistickSize,c=void 0===s?6:s,d=t.tickPadding,f=void 0===d?10:d,v=t.xAxisCount,h=t.xAxisElement,p=t.hideTickOverlap,g=t.calcMaxLabelWidth,y=Xs(r).domain([u.dStartValue,u.dEndValue]).range([u.rStartValue,u.rEndValue]);l&&y.nice();var m=null!=v?v:6,b=function(t,i,r){if(n.tickFormat)return Bu(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,_n.c$)(o,e)};if(p&&void 0===v){var x=g(y.ticks().map((function(t,n){return b(t)})))+20,w=y.range(),C=w[0],M=w[1];m=Math.min(Math.max(1,Math.floor(Math.abs(M-C)/x)),10)}var k=Gn(y).tickSize(c).tickPadding(f).ticks(m).tickFormat((function(t,n){return b(t,0,y.tickFormat(m))}));[zl.HorizontalBarChartWithAxis,zl.GanttChart].includes(i)&&k.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues&&k.tickValues(n.tickValues),h&&nl(h).call(k).selectAll("text").attr("aria-hidden","true");var A=(null!==(o=n.tickValues)&&void 0!==o?o:y.ticks(m)).map(k.tickFormat());return{xScale:y,tickValues:A}}function as(t,n){var i,e=Ai,r=n?Li:Si,o=n?Di:Vi,u=n?Oi:Ni,a=n?Zi:Ui,l=n?$i:Fi,s=n?Ji:Ki,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function ls(t,n){var i=t.yMinMaxValues,e=void 0===i?{startValue:0,endValue:0}:i,r=t.yAxisElement,o=void 0===r?null:r,u=t.yMaxValue,a=void 0===u?0:u,l=t.yMinValue,s=void 0===l?0:l,c=t.containerHeight,d=t.margins,f=t.tickPadding,v=void 0===f?12:f,h=t.maxOfYVal,p=void 0===h?0:h,g=t.yAxisTickFormat,y=t.yAxisTickCount,m=void 0===y?4:y,b=p||e.endValue,x=b>a?b:a,w=e.startValue<s?Math.min(0,e.startValue):s,C=Iu().domain([w,x]).range([c-d.bottom,d.top]),M=(n?Xn(C):qn(C)).tickPadding(v).ticks(m);return g?M.tickFormat(g):M.tickFormat(os),o&&nl(o).call(M).selectAll("text").attr("aria-hidden","true"),C}function ss(t,n,i,e,r,o,u,a){void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var l=t.yMinMaxValues,s=void 0===l?{startValue:0,endValue:0}:l,c=t.yAxisElement,d=void 0===c?null:c,f=t.yMaxValue,v=void 0===f?0:f,h=t.yMinValue,p=void 0===h?0:h,g=t.containerHeight,y=t.containerWidth,m=t.margins,b=t.tickPadding,x=void 0===b?12:b,w=t.maxOfYVal,C=void 0===w?0:w,M=t.yAxisTickFormat,k=t.yAxisTickCount,A=void 0===k?4:k,S=t.eventAnnotationProps,L=t.eventLabelHeight,V=C||s.endValue||0,D=V>v?V:v,N=o?Math.min(s.startValue||0,p||0):s.startValue<p?0:p,O=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ii(t>=0&&t===n?0:t,o,i),a=Qn(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,_n.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(D,N,A,e,u),T=[o?O[0]:N,O[O.length-1]];if("log"===a){var E=s.startValue,F=s.endValue;p>0&&(E=Math.min(E,p)),v>0&&(F=Math.max(F,v)),T=[E,F]}var B=Xs(a).domain(T).range([g-m.bottom,m.top+(S?L:0)]),P=(!n&&r||n&&!r?Xn(B):qn(B)).tickPadding(x).tickSizeInner(-(y-m.left-m.right));return"log"!==a&&P.tickValues(O),M?P.tickFormat(M):P.tickFormat((function(t,n){return function(t,n,i){var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":os(e)}(t,0,B.tickFormat(A))})),d&&nl(d).call(P).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=O,B}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(zl||(zl={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(jl||(jl={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(Yl||(Yl={}));var cs=function(t,n,i,e){var r=t.containerHeight,o=t.tickPadding,u=void 0===o?12:o,a=t.margins,l=t.yAxisTickFormat,s=t.yAxisElement,c=t.yAxisPadding,d=null!=c?c:.5;d=1===d?.99:d;var f=ku().domain(n).range([r-a.bottom,a.top]).padding(d),v=(i?Xn(f):qn(f)).tickPadding(u).ticks(n);return l&&v.tickFormat(l),s&&nl(s).call(v).selectAll("text"),f},ds=function(t,n,i,e,r){var o=t.containerHeight,u=t.tickPadding,a=void 0===u?12:u,l=t.margins,s=t.yAxisTickFormat,c=t.yAxisElement,d=t.yAxisPadding,f=void 0===d?0:d,v=t.containerWidth,h=ku().domain(n).range([o-l.bottom,l.top]).padding(f);r===zl.VerticalStackedBarChart&&h.paddingInner(1).paddingOuter(0);var p=i?Xn(h):qn(h),g=p.tickPadding(a).tickValues(n).tickSize(0);return r===zl.VerticalStackedBarChart&&p.tickSizeInner(-(v-l.left-l.right)),s&&g.tickFormat(s),c&&nl(c).call(g).selectAll("text"),h};function fs(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),Object.keys(i).map((function(t){return{x:isNaN(Number(t))?t:Number(t),values:i[t]}}))}var vs=function(t,n,i){var e=nl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},hs=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function ps(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=nl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],d=c&&Object.keys(c).length,f=function(t){nl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<d;l++)f(l)}function gs(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function ys(t,n,i,e,r,o){var u=js(t),a=Zs(t,r),l=a[0],s=a[1];if(o){var c=Gs(l,s,r);l-=c.start,s+=c.end}var d=n.left,f=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:d,rEndValue:f}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:d,rEndValue:f}}function ms(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function bs(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function xs(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function ws(t,n,i,e,r,u,a,l){var s,c,d;if(void 0===r&&(r=[]),[zl.AreaChart,zl.LineChart,zl.ScatterChart].includes(u)){if(c=(s=Zs(t))[0],d=s[1],c=ei((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),d=ri((0,o.fX)((0,o.fX)([],r,!0),[d],!1)),l||u===zl.ScatterChart){var f=Gs(c.getTime(),d.getTime());c=new Date(c.getTime()-f.start),d=new Date(d.getTime()+f.end)}}else c=ei(t,(function(t){return t.x})),d=ri(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:d,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:d,rStartValue:v,rEndValue:h}}function Cs(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){qs(t.y,e)&&r.push(t.y)}))})),{startValue:ei(r),endValue:ri(r)}}function Ms(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:ei(e),endValue:ri(e)}}function ks(t,n){if(void 0!==n&&n===Yl.NumericAxis){var i=ri(t,(function(t){return t.y}));return{startValue:ei(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var As,Ss,Ls=function(t,n){if(n)switch(typeof t){case"string":return jl.StringAxis;case"number":return jl.NumericAxis;default:return jl.DateAxis}else switch(typeof t){case"string":return Yl.StringAxis;case"number":return Yl.NumericAxis;default:return Yl.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(As||(As={})),function(t){t[t.dottedLine=0]="dottedLine"}(Ss||(Ss={}));var Vs=(($l={})[As.circle]={widthRatio:1},$l[As.square]={widthRatio:1},$l[As.triangle]={widthRatio:1},$l[As.diamond]={widthRatio:1},$l[As.pyramid]={widthRatio:1},$l[As.hexagon]={widthRatio:2},$l[As.pentagon]={widthRatio:1.168},$l[As.octagon]={widthRatio:2.414},$l),Ds=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function Ns(t){return rs(t,!0)}var Os=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},Ts=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Es=function(t,n){return"number"==typeof t||"number"==typeof n};function Fs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Bs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Ps=/var\((--[a-zA-Z0-9\-]+)\)/g;function _s(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){nl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];nl(i).style(r,e.getPropertyValue(n))}))}var Hs={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Is=p("measurement_span_");function Ws(t,n){if(void 0===n&&(n=rl),"function"==typeof t)return t;switch(t){case"linear":return rl;case"natural":return al;case"step":return sl;case"stepAfter":return dl;case"stepBefore":return cl;default:return n}}var Rs=/(category|total|sum|min|max|mean|median) (ascending|descending)/,$s=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(Rs);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:ei,max:ri,sum:oi,total:oi,mean:ui,median:di},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function zs(t,n){var i=n.semanticColors.bodyText;return es(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function js(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var Ys,Xs=function(t){return"log"===t?Xu():Iu()},Gs=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},qs=function(t,n){return"number"!=typeof t||"log"!==n||t>0},Us=function(t,n){return!Dl(t)&&!Dl(n)},Zs=function(t,n){var i=function(t){return qs(t.x,n)};return[ei(t,(function(t){return ei(t.data.filter(i),(function(t){return t.x}))})),ri(t,(function(t){return ri(t.data.filter(i),(function(t){return t.x}))}))]},Ks=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=Zs(n,u),c=s[0],d=s[1],f=Gs(+c,+d,u),v=c instanceof Date?new Date(+c-f.start):c-f.start,h=d instanceof Date?new Date(+d+f.end):d+f.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(d))),g=o?l:a,y=Cs(n,0,o,g),m=y.startValue,b=y.endValue,x=Gs(m,b,g),w=m-x.start,C=b+x.end,M=o?r:e,k=Math.min(Math.abs(M(w)-M(m)),Math.abs(M(b)-M(C)));return Math.min(p,k)},Js=i(357),Qs={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},tc={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},nc={default:tc,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},ic=Object.values(tc),ec=Object.values(Qs),rc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},oc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=ic[(t+n)%ic.length];return rc(e,i)},uc=function(t,n){if(void 0===n&&(n=!1),ec.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=nc[e][r];return rc(o,n)}return[t,t]};function ac(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function lc(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=ac(t,t[i],n[i]))}(t,{componentDidMount:sc,componentDidUpdate:cc,componentWillUnmount:dc})}function sc(){fc(this.props.componentRef,this)}function cc(t){t.componentRef!==this.props.componentRef&&(fc(t.componentRef,null),fc(this.props.componentRef,this))}function dc(){fc(this.props.componentRef,null)}function fc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function vc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(Ys||(Ys={}));var hc,pc=u.createContext(void 0),gc="data-is-focusable",yc="data-focuszone-id",mc="tabindex",bc="data-no-vertical-wrap",xc="data-no-horizontal-wrap",wc=999999999,Cc=-999999999;function Mc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var kc,Ac={},Sc=new Set,Lc=["text","number","password","email","tel","url","search","textarea"],Vc=!1,Dc=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,d=c._isImmediateDescendantOfZone(t.target);if(d)n=t.target;else for(var f=t.target;f&&f!==c._root.current;){if(V(f,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(f)){n=f;break}f=b(f,Vc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&V(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((d||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Vc);for(;i.length&&((n=i.pop())&&V(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!D(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==Ys.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==Ys.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==Ys.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==Ys.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var d=!1;if(c._processingTabKey=!0,d=e!==Ys.vertical&&c._shouldWrapFocus(c._activeElement,xc)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,d)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var f=c._root.current&&c._root.current.firstChild;if(c._root.current&&f&&c.focusElement(A(c._root.current,f,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,bc)?wc:Cc},lc(c),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var d=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:d,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:d,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return Sc.size},n._onKeyDownCapture=function(t){9===t.which&&Sc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),Ac[this._id]=this,i){for(var e=b(i,Vc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,Vc)}this._isInnerZone||(Sc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Vc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Vc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return V(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete Ac[this._id],this._isInnerZone||(Sc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=$(this.props,H),d=i||e||"div";this._evaluateFocusBeforeRender();var f=(0,It.O4)();return u.createElement(d,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:z((hc||(hc=(0,U.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),hc),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,f)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(gc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=Ac[i.getAttribute(yc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&V(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(D(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(gc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Mc(i,n),!0;i=b(i,Vc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(D(t))return Ac[t.getAttribute(yc)];for(var n=t.firstElementChild;n;){if(D(n))return Ac[n.getAttribute(yc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===Ys.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,bc)?wc:Cc:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,bc)?wc:Cc:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,xc);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==Ys.vertical?o=e.right-r.right:i||(o=Cc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,xc);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==Ys.vertical?o=r.left-e.left:i||(o=Cc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),d=Math.floor(c.top),f=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&d>f+l||!t&&v<h-l)break;p>-1&&(t&&d>u?(u=d,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===Ys.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Vc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,Vc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!V(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];D(e)?"true"===e.getAttribute(gc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(mc)&&e.setAttribute(mc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(mc)&&e.setAttribute(mc,"0"))):(e.getAttribute&&"false"===e.getAttribute(gc)&&e.setAttribute(mc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(mc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(mc)&&e.setAttribute(mc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(mc)&&e.setAttribute(mc,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&Lc.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,C.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&vc(t,this._root.current)},n.prototype._getDocument=function(){return(0,C.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:Ys.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=pc,n}(u.Component);function Nc(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(kc||(kc={}));var Oc,Tc=(0,a.Z)(),Ec=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,d=void 0===c?this._onRenderContent:c,f=t.targetElement,v=t.theme;return this._classNames=Tc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement(Pn,(0,o.Cl)({target:f,directionalHint:e,directionalHintForRTL:r},i,$(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},d(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),Fc=(0,r.I)(Ec,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,d=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(Oc||(Oc={}));var Bc,Pc,_c=(0,a.Z)(),Hc=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case kc.Parent:return e._tooltipHost.current.parentElement;case kc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=zt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=zt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!Nc(a))return}if(!t.target||!vc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Oc.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case Oc.medium:return 300;case Oc.long:return 500;default:return 0}},lc(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,d=void 0===c||c,f=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=_c(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:j({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},$(this.props,R,["id"])),f),m=(null==f?void 0:f.onRenderContent)?f.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=d&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(Fc,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Oc.medium},n.contextType=Ft,n}(u.Component),Ic={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},Wc=(0,r.I)(Hc,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(Ic,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),Rc=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&Nc(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(Wc,{overflowMode:kc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},Ds(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),$c=(0,a.Z)(),zc=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=$c(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=$c(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(Rc,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Dc,{direction:Ys.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement(Pn,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=Ds(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,_n.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,_n.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,_n.c$)(a,n)));case"percentage":var s="".concat((0,_n.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),d=0,f=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(f=i/c*100)<0?f=0:f<1&&0!==f&&(f=1),h+=f}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||oc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||oc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(d+=f),(f=x/c*100)<0?f=0:f<1&&0!==f?f=1/g:f/=g,s.push(d);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var C=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},Ns(C))}var M=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:M},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-f-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:f+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(M,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),jc=(0,r.I)(zc,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),Yc={host:"ms-HoverCard-host"},Xc=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,C.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),j(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,d=c?c[i]:null;if(d)for(var f in d)if(d.hasOwnProperty(f))for(var v=d[f],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(Bc||(Bc={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(Pc||(Pc={}));var Gc,qc={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(Gc||(Gc={}));var Uc=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},Zc=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function Kc(t){var n=u.useRef();return u.useEffect((function(){n.current=t})),n.current}function Jc(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function Qc(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var td={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},nd=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),d=Pt(),f=$t(),v=!!u.useContext(pc),h=null===(i=Kc(!1))||void 0===i||i,p=F(td,t),g=Wt({hasFocus:!1,focusStackId:Jc("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,C=p.forceFocusInsideTrap,M=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,V=p.disableRestoreFocus,D=void 0===V?p.ignoreExternalFocusing:V,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=Qc((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(M&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=Qc((function(t){if(nd.focusStack=nd.focusStack.filter((function(t){return g.focusStackId!==t})),d){var n=d.activeElement;D||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==d.body&&!n.shadowRoot||P(t)}})),W=Qc((function(t){if(!b&&g.focusStackId===nd.focusStack.slice(-1)[0]){var n=Zc(t);n&&!w(a.current,n)&&(d&&Uc(d)===d.body?setTimeout((function(){d&&Uc(d)===d.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return C&&t.push(E(f,"focus",W,!0)),N||t.push(E(f,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[C,N,f]),u.useEffect((function(){if(!b&&(h||C)&&a.current){nd.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||Uc(d);return x||w(a.current,t)||_(),function(){return I(t)}}}),[C,b]),u.useEffect((function(){if(!b&&O)return Vt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},$(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=Zc(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=Uc(d)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));nd.displayName="FocusTrapZone",nd.focusStack=[];var id,ed=function(t){return u.createElement(Pn,(0,o.Cl)({},t),u.createElement(nd,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},rd=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,d=t.onLeave,f=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},$(t,R)),{className:f,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:d,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(ed,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement(Pn,(0,o.Cl)({},g),h))},od=(0,a.Z)(),ud=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),lc(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,d=s.firstFrameRendered,f=i+e;this._classNames=od(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===Gc.expanded&&d});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(rd,(0,o.Cl)({},this.props,{content:v,finalHeight:f,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),ad=(0,r.I)(ud,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(qc,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),ld={root:"ms-PlainCard-root"},sd=(0,a.Z)(),cd=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},lc(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=sd(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(rd,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),dd=(0,r.I)(cd,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(ld,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),fd=(0,a.Z)(),vd=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:Gc.compact,openMode:"keydown"===t.type?Bc.hotKey:Bc.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Dt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Dt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:Gc.compact,openMode:Bc.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:Gc.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},lc(i),i._async=new Nt(i),i._events=new Xc(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:Gc.compact,openMode:Bc.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:Gc.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:Gc.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,d=t.type,f=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=fd(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},$(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===Bc.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),C=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),M=(0,o.Cl)((0,o.Cl)({},f),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(d===Pc.expanding?u.createElement(ad,(0,o.Cl)({},C)):u.createElement(dd,(0,o.Cl)({},M))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,C.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:Pc.expanding},n}(u.Component),hd=(0,r.I)(vd,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(Yc,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(id||(id={}));var pd=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var d=n(s);if(void 0===d)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(d)))return{dataToMeasure:d};s=d}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},gd=u.createContext({isMeasured:!1}),yd={position:"fixed",visibility:"hidden"},md={position:"relative"};function bd(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var xd={isMeasured:!0},wd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(pd),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(bd,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],d=s[1],f=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===id.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===id.vertical?i.height:i.width}),o);d(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(f,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,f,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],d=r[4],f=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]);var h=t.className,p=t.onRenderData,g=$(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:md},f&&!v&&u.createElement("div",{style:yd,ref:d},u.createElement(gd.Provider,{value:xd},p(a))),u.createElement("div",{ref:c,style:v?yd:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));wd.displayName="ResizeGroupBase";var Cd,Md=wd;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Cd||(Cd={}));var kd=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Cd.PERSISTED_KEYTIP_ADDED:Cd.KEYTIP_ADDED;Xc.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||Xc.raise(this,Cd.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Cd.PERSISTED_KEYTIP_REMOVED:Cd.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||Xc.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){Xc.raise(this,Cd.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){Xc.raise(this,Cd.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){Xc.raise(this,Cd.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),Ad=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},Sd=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},Ld=function(t){var n=kd.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),d=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),f=d.modifiedOverflowItems;return function(t,n,i){var e=Kc(t);u.useEffect((function(){e&&(Sd(i,e),Ad(n,i,t))})),u.useEffect((function(){return Ad(n,i,t),function(){Sd(i,t)}}),[])}(s,d.keytipsToRegister,n),u.createElement("div",{className:i},l(f))},Vd=(0,a.Z)(),Dd=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=M(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,d=t.role,f=t.overflowSide,v=void 0===f?"end":f,h=t.onRenderItem,p=Vd(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},$(t,R),{role:d||"group","aria-orientation":"menubar"===d?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(Ld,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(Ld,(0,o.Cl)({},t,{className:p.overflowButton})))}));Dd.displayName="OverflowSet";var Nd,Od={flexShrink:0,display:"inherit"},Td=(0,r.I)(Dd,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",Od],overflowButton:["ms-OverflowSet-overflowButton",Od]}}),void 0,{scope:"OverflowSet"}),Ed=((Nd={})["".concat(As[As.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Nd["".concat(As[As.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Nd["".concat(As[As.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Nd["".concat(As[As.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Nd["".concat(As[As.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Nd["".concat(As[As.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Nd["".concat(As[As.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Nd["".concat(As[As.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Nd["".concat(Ss[Ss.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Nd),Fd=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(Ed).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Fs(n),{transform:"rotate(".concat(e===As[As.diamond]?45:e===As[As.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:Ed[e]},Fs(i))))};function Bd(t,n,i,e){return void 0===i&&(i=!1),void 0===e&&(e={}),new Promise((function(r,u){if(!t)return u(new Error("Chart container is not defined"));try{var a="string"==typeof e.background?function(t,n){var i=getComputedStyle(t);return n.replace(Ps,(function(t,n){return i.getPropertyValue(n)}))}(t,e.background):"transparent",l=function(t,n,i,e){var r=t.querySelector("svg");if(!r)throw new Error("SVG not found");for(var u=nl(r.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),a=r.getElementsByTagName("*"),l=u.node().getElementsByTagName("*"),s=["text"],c=["table","thead","tbody","tr","th","td"],d=0;d<a.length;d++){var f=a[d].tagName.toLowerCase();s.includes(f)||c.includes(f)?_s((0,o.fX)((0,o.fX)([],Pd,!0),_d,!0),a[d],l[d]):_s(Pd,a[d],l[d])}a=null,l=null;var v=r.getBoundingClientRect(),h=v.width,p=v.height,g="function"==typeof n?n(h,i):{node:null,width:0,height:0},y=Math.max(h,g.width),m=p+g.height;g.node&&(nl(g.node).attr("transform","translate(0, ".concat(p,")")),u.append((function(){return g.node}))),u.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y).attr("height",m).attr("fill",e),u.attr("width",y).attr("height",m).attr("viewBox","0 0 ".concat(y," ").concat(m)).attr("direction",i?"rtl":"ltr");var b={node:u.node(),width:y,height:m};return u=null,b}(t,n,i,a);if(!l.node)return u(new Error("SVG node is null"));var s=(new XMLSerializer).serializeToString(l.node);l.node=null;var c="data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),Wd.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),Id.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(s)));s=null,function(t,n){return void 0===n&&(n={}),new Promise((function(i,e){var r=n.scale||1,o=n.width||300,u=n.height||150,a=r*o,l=r*u,s=document.createElement("canvas"),c=new Image;s.width=a,s.height=l,c.onload=function(){var t=s.getContext("2d");if(!t)return e(new Error("Canvas context is null"));t.clearRect(0,0,a,l),t.drawImage(c,0,0,a,l);var n=s.toDataURL("image/png");i(n)},c.onerror=function(t){e(t)},c.src=t}))}(c,{width:e.width||l.width,height:e.height||l.height,scale:e.scale}).then(r).catch(u),c=null}catch(t){return u(t)}}))}var Pd=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],_d=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],Hd={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};var Id=/^[\da-f]{2}$/i,Wd=/^[\da-f]{4}$/i,Rd=(0,a.Z)(),$d=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=nl(za("svg:g").call(document.documentElement)),c=u?0:12,d=8,f=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(Is))||((m=document.createElement("span")).setAttribute("id",Is),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Hs),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");f.push({elem:w,width:x}),c+x>n&&f.length>1&&(f.pop(),v.push(f),h.push(c),f=[{elem:w,width:x}],c=u?0:12,d+=32);var C=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-8-13:8)).attr("y",d+8).attr("width",13).attr("height",13).style("fill",C?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),w.append("text").attr("x",c+(l?x-29:29)).attr("y",d+8).attr("dominant-baseline","hanging").style("opacity",C?1:.67).text(t[i].title).call((function(t){return _s(Hd,b,t.node())})),c+=x},y=0;y<t.length;y++)g(y);if(v.push(f),h.push(c),d+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}return{node:s.node(),width:Math.max.apply(Math,h),height:d}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(Dc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Td,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,d=void 0!==c&&c,f=[],v=Rd(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);f.push(i)})),u.createElement(Dc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":d},{direction:Ys.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),f)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,d=a.styles,f=a.overflowText,v=Rd(d,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=f||"more";return u.createElement(hd,{type:Pc.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){return l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,d=c.theme,f=c.className,v=c.styles,h=Rd(v,{theme:d,className:f,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,d={};return n.canSelectMultipleLegends?d=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,d=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:d},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=Rd(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(Md,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:$(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(Fd,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),zd=(0,r.I)($d,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,d={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,d),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,d),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,d)]}}}}));function jd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Yd(t){return function(){return t}}function Xd(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Gd(t){return t}Array.prototype.slice;const qd=Math.abs,Ud=Math.atan2,Zd=Math.cos,Kd=Math.max,Jd=Math.min,Qd=Math.sin,tf=Math.sqrt,nf=1e-12,ef=Math.PI,rf=ef/2,of=2*ef;function uf(t){return t>=1?rf:t<=-1?-rf:Math.asin(t)}function af(){var t=Gd,n=Xd,i=null,e=Yd(0),r=Yd(of),o=Yd(0);function u(u){var a,l,s,c,d,f=(u=jd(u)).length,v=0,h=new Array(f),p=new Array(f),g=+e.apply(this,arguments),y=Math.min(of,Math.max(-of,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<f;++a)(d=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=d);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-f*b)/v:0;a<f;++a,g=c)l=h[a],c=g+((d=p[l])>0?d*s:0)+b,p[l]={data:u[l],index:a,value:d,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:Yd(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:Yd(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yd(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Yd(+t),u):o},u}const lf=Math.PI,sf=2*lf,cf=1e-6,df=sf-cf;function ff(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class vf{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ff:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return ff;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(d>cf)if(Math.abs(c*a-l*s)>cf&&r){let f=i-o,v=e-u,h=a*a+l*l,p=f*f+v*v,g=Math.sqrt(h),y=Math.sqrt(d),m=r*Math.tan((lf-Math.acos((h+d-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>cf&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*f>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,d=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>cf||Math.abs(this._y1-s)>cf)&&this._append`L${l},${s}`,i&&(d<0&&(d=d%sf+sf),d>df?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:d>cf&&this._append`A${i},${i},0,${+(d>=lf)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function hf(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new vf(n)}function pf(t){return t.innerRadius}function gf(t){return t.outerRadius}function yf(t){return t.startAngle}function mf(t){return t.endAngle}function bf(t){return t&&t.padAngle}function xf(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/tf(a*a+l*l),c=s*l,d=-s*a,f=t+c,v=n+d,h=i+c,p=e+d,g=(f+h)/2,y=(v+p)/2,m=h-f,b=p-v,x=m*m+b*b,w=r-o,C=f*p-h*v,M=(b<0?-1:1)*tf(Kd(0,w*w*x-C*C)),k=(C*b-m*M)/x,A=(-C*m-b*M)/x,S=(C*b+m*M)/x,L=(-C*m+b*M)/x,V=k-g,D=A-y,N=S-g,O=L-y;return V*V+D*D>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-d,x11:k*(r/w-1),y11:A*(r/w-1)}}function wf(){var t=pf,n=gf,i=Yd(0),e=null,r=yf,o=mf,u=bf,a=null,l=hf(s);function s(){var s,c,d,f=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-rf,p=o.apply(this,arguments)-rf,g=qd(p-h),y=p>h;if(a||(a=s=l()),v<f&&(c=v,v=f,f=c),v>nf)if(g>of-nf)a.moveTo(v*Zd(h),v*Qd(h)),a.arc(0,0,v,h,p,!y),f>nf&&(a.moveTo(f*Zd(p),f*Qd(p)),a.arc(0,0,f,p,h,y));else{var m,b,x=h,w=p,C=h,M=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>nf&&(e?+e.apply(this,arguments):tf(f*f+v*v)),V=Jd(qd(v-f)/2,+i.apply(this,arguments)),D=V,N=V;if(L>nf){var O=uf(L/f*Qd(S)),T=uf(L/v*Qd(S));(k-=2*O)>nf?(C+=O*=y?1:-1,M-=O):(k=0,C=M=(h+p)/2),(A-=2*T)>nf?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*Zd(x),F=v*Qd(x),B=f*Zd(M),P=f*Qd(M);if(V>nf){var _,H=v*Zd(w),I=v*Qd(w),W=f*Zd(C),R=f*Qd(C);if(g<ef)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,d=a-o,f=d*l-c*s;if(!(f*f<nf))return[t+(f=(c*(n-o)-d*(t-r))/f)*l,n+f*s]}(E,F,W,R,H,I,B,P)){var $=E-_[0],z=F-_[1],j=H-_[0],Y=I-_[1],X=1/Qd(((d=($*j+z*Y)/(tf($*$+z*z)*tf(j*j+Y*Y)))>1?0:d<-1?ef:Math.acos(d))/2),G=tf(_[0]*_[0]+_[1]*_[1]);D=Jd(V,(f-G)/(X-1)),N=Jd(V,(v-G)/(X+1))}else D=N=0}A>nf?N>nf?(m=xf(W,R,E,F,v,N,y),b=xf(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<V?a.arc(m.cx,m.cy,N,Ud(m.y01,m.x01),Ud(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,Ud(m.y01,m.x01),Ud(m.y11,m.x11),!y),a.arc(0,0,v,Ud(m.cy+m.y11,m.cx+m.x11),Ud(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,Ud(b.y11,b.x11),Ud(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),f>nf&&k>nf?D>nf?(m=xf(B,P,H,I,f,-D,y),b=xf(E,F,W,R,f,-D,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),D<V?a.arc(m.cx,m.cy,D,Ud(m.y01,m.x01),Ud(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,Ud(m.y01,m.x01),Ud(m.y11,m.x11),!y),a.arc(0,0,f,Ud(m.cy+m.y11,m.cx+m.x11),Ud(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,Ud(b.y11,b.x11),Ud(b.y01,b.x01),!y))):a.arc(0,0,f,M,C,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-ef/2;return[Zd(e)*i,Qd(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:Yd(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Yd(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:Yd(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Yd(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yd(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Yd(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:Yd(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Cf=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Mf=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),d=c[0],f=c[1],v=Math.sqrt(d*d+f*f),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:d/v)*h,y:(0===v?0:f/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?Bu(".0%")(0===s?0:g/s):Ns(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return kf(t),null},n.prototype.updateChart=function(t){kf(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,d=s.href,f=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(Cf,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:d,theme:this.props.theme,opacity:y}),C=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!f&&f===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:d?this._redirectToUrl.bind(this,d):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:C},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(C,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.defaultProps={arc:wf()},n}(u.Component);function kf(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Af,Sf,Lf,Vf=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Df=(0,a.Z)(),Nf=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,d=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:oc(n,0,i.props.theme.isInverted)[0],d=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:oc(n,0,i.props.theme.isInverted)[1]),u.createElement(Mf,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:d,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=af().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=Df(Vf,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=Df(Vf,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,il(".".concat(t)).each((function(){for(var t=nl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:af().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),Of=(0,a.Z)(),Tf=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Bd(e._rootElem,null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?Jl(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},lc(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=Of(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,d=Math.min(this.state._width-s,this.state._height-c)/2,f=this._elevateToMinimums(a.filter((function(t){return t.data>=0}))),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,f):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(Dc,{direction:Ys.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},u.createElement(Nf,{width:this.state._width,height:this.state._height,outerRadius:d,innerRadius:this.props.innerRadius,data:f,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement(Pn,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this,i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(zd,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,_n.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(Af||(Af={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(Sf||(Sf={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(Lf||(Lf={}));var Ef=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},Ff=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:Sf.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},Bf=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},Pf=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},_f=(0,r.I)(Tf,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},axisAnnotation:Ff(i,i.fonts.small)}}));function Hf(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function If(t){return t[0]}function Wf(t){return t[1]}function Rf(t,n){var i=Yd(!0),e=null,r=rl,o=null,u=hf(a);function a(a){var l,s,c,d=(a=jd(a)).length,f=!1;for(null==e&&(o=r(c=u())),l=0;l<=d;++l)!(l<d&&i(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?If:Yd(t),n="function"==typeof n?n:void 0===n?Wf:Yd(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:Yd(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:Yd(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:Yd(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var $f=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!vc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Oc.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case Oc.medium:return 300;case Oc.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,d=c.isTooltipVisible,f=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||d&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=f?f:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=f?f:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(Fc,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Oc.medium},n}(u.Component),zf=(0,a.Z)(),jf=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Yf=[zl.HorizontalBarChartWithAxis,zl.HeatMapChart,zl.VerticalStackedBarChart,zl.GanttChart],Xf=function(t){function n(n){var i,e,r,a,s,c,d,f,v,h,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H=t.call(this,n)||this;H.minLegendContainerHeight=32,H._isRtl=(0,l.jI)(),H._isFirstRender=!0,H._removalValueForTextTuncate=0,H.isIntegralDataset=!0,H.calculateMaxYAxisLabelLength=function(t){return hs(H.props.stringDatasetForYAxisDomain.map((function(t){return n=t,H.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,H.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},H._multiValueCallout=function(t){var n=H._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:H._classNames.calloutContentRoot},u.createElement("div",{className:H._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:H._classNames.calloutContentX},Ds(t.xAxisCalloutAccessibilityData,"text",!1)),(0,_n.c$)(t.hoverXValue,H.props.culture,H.props.useUTC))),u.createElement("div",{className:H._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,e){var r=i+1===e.length,a=t.shouldDrawBorderBottom,l=void 0!==a&&a;return u.createElement("div",(0,o.Cl)({},Ds(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),H._getCalloutContent(t,i,n,r))})),!!t.descriptionMessage&&u.createElement("div",{className:H._classNames.descriptionMessage},t.descriptionMessage)))},H._getData=function(t,n,i){H.props.getGraphData&&H.props.getGraphData(t,n,H.state.containerHeight-H._removalValueForTextTuncate,H.state.containerWidth,H.xAxisElement,H.yAxisElement,i)},H._onChartLeave=function(){H.props.onChartMouseLeave&&H.props.onChartMouseLeave()},H._calculateChartMinWidth=function(){var t=H._calcMaxLabelWidthWithTransform(H._tickValues)+10,n=H.margins.left+H.margins.right+t*(H._tickValues.length-1);return[zl.GroupedVerticalBarChart,zl.VerticalBarChart,zl.VerticalStackedBarChart].includes(H.props.chartType)&&(n+=16),n},H._getChartDescription=function(){return(H.props.chartTitle||"Chart. ")+H._getAxisTitle("X",H.props.xAxisTitle,H.props.xAxisType)+H._getAxisTitle("Y",H.props.yAxisTitle,H.props.yAxisType||Yl.NumericAxis)+(H.props.secondaryYScaleOptions?H._getAxisTitle("secondary Y",H.props.secondaryYAxistitle,Yl.NumericAxis):"")},H._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===jl.StringAxis||i===Yl.StringAxis?"categories":i===jl.DateAxis||i===Yl.DateAxis?"time":"values"))+". "},H._calcMaxLabelWidthWithTransform=function(t){if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===jl.StringAxis){var n=hs(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(H.props.showXAxisLablesTooltip){var i=t.map((function(t){var n=H.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),e=hs(i,".".concat(H._classNames.xAxis," text"));return Math.ceil(e)}if(H.props.wrapXAxisLables){var r=[];t.forEach((function(t){r.push.apply(r,t.toString().split(/\s+/))}));var o=hs(r,".".concat(H._classNames.xAxis," text"));return Math.max(Math.ceil(o),10)}var u=hs(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(u)},H._transformXAxisLabels=function(){var t,n,i;if(H._removalValueForTextTuncate=0,H.props.wrapXAxisLables||H.props.showXAxisLablesTooltip){var e=void 0;H.props.xAxisType===jl.StringAxis&&(e=((null===(t=H.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?H._xScale.step():H.state.containerWidth);var r={node:H.xAxisElement,xAxis:H._xScale,showXAxisLablesTooltip:H.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:H.props.noOfCharsToTruncate||4,width:e};H._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=nl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=nl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],d=0,f=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",f).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",f).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",f).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",f).attr("dy",1.1*++d+v+"em").text(l));s=Math.max(s,d+1)})),!r){var c=12,d=document.getElementById("WordBreakId"),f=d&&d.getBoundingClientRect(),v=f&&f.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(r))&&void 0!==n?n:0}if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===jl.StringAxis){var o=null!==(i=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];nl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return nl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:H.xAxisElement,xAxis:H._xScale}))&&void 0!==i?i:0;H._removalValueForTextTuncate=o+H.margins.bottom}},H.state={containerHeight:0,containerWidth:0,_width:H.props.width||600,_height:H.props.height||350,startFromX:0},H.idForGraph=p("chart_"),H.titleMargin=8,H.idForDefaultTabbableElement=p("defaultTabbableElement_"),H._tooltipId=p("tooltip_"),H.margins={top:null!==(e=null===(i=H.props.margins)||void 0===i?void 0:i.top)&&void 0!==e?e:20,bottom:null!==(a=null===(r=H.props.margins)||void 0===r?void 0:r.bottom)&&void 0!==a?a:35,right:H._isRtl?null!==(c=null===(s=H.props.margins)||void 0===s?void 0:s.left)&&void 0!==c?c:40:(null!==(f=null===(d=H.props.margins)||void 0===d?void 0:d.right)&&void 0!==f?f:null===(v=H.props)||void 0===v?void 0:v.secondaryYScaleOptions)?40:20,left:H._isRtl?(null!==(g=null===(h=H.props.margins)||void 0===h?void 0:h.right)&&void 0!==g?g:null===(y=H.props)||void 0===y?void 0:y.secondaryYScaleOptions)?40:20:null!==(b=null===(m=H.props.margins)||void 0===m?void 0:m.left)&&void 0!==b?b:40};var I=24;return void 0!==H.props.xAxisTitle&&""!==H.props.xAxisTitle&&(H.margins.bottom=null!==(w=null===(x=H.props.margins)||void 0===x?void 0:x.bottom)&&void 0!==w?w:H.margins.bottom+20),void 0!==H.props.yAxisTitle&&""!==H.props.yAxisTitle&&(H.margins.left=H._isRtl?(null!==(M=null===(C=H.props.margins)||void 0===C?void 0:C.right)&&void 0!==M?M:null===(k=H.props)||void 0===k?void 0:k.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I:null!==(S=null===(A=H.props.margins)||void 0===A?void 0:A.left)&&void 0!==S?S:H.margins.left+I,H.margins.right=H._isRtl?null!==(V=null===(L=H.props.margins)||void 0===L?void 0:L.left)&&void 0!==V?V:H.margins.left+I:(null!==(N=null===(D=H.props.margins)||void 0===D?void 0:D.right)&&void 0!==N?N:null===(O=H.props)||void 0===O?void 0:O.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I),void 0!==H.props.xAxisAnnotation&&""!==H.props.xAxisAnnotation&&(H.margins.top=null!==(E=null===(T=H.props.margins)||void 0===T?void 0:T.top)&&void 0!==E?E:H.margins.top+20),void 0===H.props.yAxisAnnotation||""===H.props.yAxisAnnotation||void 0!==H.props.secondaryYAxistitle&&""!==H.props.secondaryYAxistitle||(H._isRtl?H.margins.left=null!==(B=null===(F=H.props.margins)||void 0===F?void 0:F.right)&&void 0!==B?B:H.margins.right+I:H.margins.right=null!==(_=null===(P=H.props.margins)||void 0===P?void 0:P.right)&&void 0!==_?_:H.margins.right+I),H}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),Yf.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===Yl.StringAxis){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),Yf.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===Yl.StringAxis){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,d=this,f=this.props,v=f.calloutProps,h=f.points,p=f.chartType,g=f.chartHoverProps,y=f.svgFocusZoneProps,m=f.svgProps,b=f.culture,x=f.dateLocalizeOptions,w=f.timeFormatLocale,C=f.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer();var M=(0,o.Cl)({},this.margins);Yf.includes(this.props.chartType)&&(this._isRtl?M.right+=this.state.startFromX:M.left+=this.state.startFromX),this.props.getmargins&&this.props.getmargins(M),this._classNames=zf(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var k,A,S,L,V,D=null,N=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var O={domainNRangeValues:this.props.getDomainNRangeValues(h,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,p,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues,this.state.startFromX),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform},T=void 0,E=void 0;switch(this.props.xAxisType){case jl.NumericAxis:T=(t=us(O,this.props.tickParams,this.props.chartType,b,this.props.xScaleType)).xScale,E=t.tickValues;break;case jl.DateAxis:T=(n=function(t,n,i,e,r,o,u,a){var l,s=t.domainNRangeValues,c=t.xAxisElement,d=t.tickPadding,f=void 0===d?6:d,v=t.xAxistickSize,h=void 0===v?6:v,p=t.xAxisCount,g=t.calcMaxLabelWidth,y=u?yu():gu();y.domain([s.dStartValue,s.dEndValue]).range([s.rStartValue,s.rEndValue]).nice();var m=null!=p?p:6,b=100,x=-1,w=r?Pe(r):void 0;y.ticks().forEach((function(t){var n=as(t,u);n>x&&(x=n),n<b&&(b=n)}));var C=null!=e?e:(0,_n.c2)(b,x),M=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ie:He)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(b,x,w,u),k=function(t,e){return o?o(t):r?M(t):void 0===i&&n.tickFormat?u?Ie(n.tickFormat)(t):He(n.tickFormat)(t):(0,_n.Yn)(t,i,u,!1,C)},A=g(y.ticks().map(k))+40,S=y.range(),L=S[0],V=S[1],D=Math.min(Math.max(1,Math.floor(Math.abs(V-L)/A)),10);m=Math.min(D,null!=p?p:m);var N=Gn(y).tickSize(h).tickPadding(f).ticks(m).tickFormat(k);[zl.GanttChart].includes(a)&&N.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues&&N.tickValues(n.tickValues),c&&nl(c).call(N).selectAll("text").attr("aria-hidden","true");var O=(null!==(l=n.tickValues)&&void 0!==l?l:y.ticks(m)).map(N.tickFormat());return{xScale:y,tickValues:O}}(O,this.props.tickParams,b,x,w,C,this.props.useUTC,this.props.chartType)).xScale,E=n.tickValues;break;case jl.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,d=t.xAxisInnerPadding,f=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=ku().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==d?d:c).paddingOuter(void 0!==f?f:c),y=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var m=[],b=y.map((function(t){return p([t])})),x=0,w=v,C=1,M=g.range();M[1]-M[0]<0&&(x=v,w=0,C=-1);for(var k=y.length-1;k>=0;k--){var A=g(y[k]);C*(A-C*b[k]/2-x)>=0&&C*(A+C*b[k]/2-w)<=0&&(m.push(y[k]),w=A-C*(b[k]/2+10))}y=m=m.reverse()}var S=Gn(g).tickSize(u).tickPadding(l).tickValues(y);return t.xAxisElement&&nl(t.xAxisElement).call(S).selectAll("text").attr("aria-hidden","true"),{xScale:g,tickValues:y}}(O,this.props.tickParams,this.props.datasetForXAxisDomain),T=i.xScale,E=i.tickValues;break;default:T=(e=us(O,this.props.tickParams,this.props.chartType,b,this.props.xScaleType)).xScale,E=e.tickValues}this._xScale=T,this._tickValues=E,this._transformXAxisLabels();var F={margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(h,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0},B=void 0,P=void 0,_={yAxisDomainValues:[]};if(this.props.yAxisType&&this.props.yAxisType===Yl.StringAxis)B=this.props.createStringYAxis(F,this.props.stringDatasetForYAxisDomain,this._isRtl,this.props.barwidth,this.props.chartType);else{if(null===(a=this.props)||void 0===a?void 0:a.secondaryYScaleOptions){var H={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(l=this.props.secondaryYScaleOptions)||void 0===l?void 0:l.yMinValue)||0,yMaxValue:null!==(c=null===(s=this.props.secondaryYScaleOptions)||void 0===s?void 0:s.yMaxValue)&&void 0!==c?c:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(h,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};P=this.props.createYAxis(H,this._isRtl,_,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}B=this.props.createYAxis(F,this._isRtl,_,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(Yf.includes(this.props.chartType)&&this.props.yAxisType===Yl.StringAxis){if(!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){B&&(k=this.yAxisElement,A=B,S=this.props.noOfCharsToTruncate||4,L=this.props.showYAxisLablesTooltip||!1,V=this._isRtl,null!==k&&nl(k).call(A).selectAll(".tick text").each((function(){var t=nl(this),n=t.text(),i=V?"...".concat(t.text().slice(0,S)):"".concat(t.text().slice(0,S),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),L&&e>S?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var I=nl(this.yAxisElement).call(B);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var W={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:I};I&&ps(W)}}this.props.getAxisData&&this.props.getAxisData(_),this._getData(T,B,P),N=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:T,yScalePrimary:B,yScaleSecondary:P})),!this.props.hideTooltip&&v.isCalloutVisible&&(D=this._generateCallout(v,g))}var R,$={width:this.state.containerWidth,height:this.state.containerHeight};R=this.props.focusZoneDirection===Ys.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:Ys.horizontal;var z=$.width-this.margins.left-this.margins.right-this.state.startFromX,j=$.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-this.titleMargin,Y={wrapContent:vs,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){return d.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Dc,(0,o.Cl)({direction:R,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},y),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:$.width,height:$.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Fs(m)),u.createElement("g",{ref:function(t){d.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat($.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement($f,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+this.state.startFromX+z/2,y:$.height-this.titleMargin,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:z},Y)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement($f,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+this.state.startFromX+z/2,y:this.titleMargin+3,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:z},Y)),u.createElement("g",{ref:function(t){d.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?$.width-this.margins.right-this.state.startFromX:this.margins.left+this.state.startFromX,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){d.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left+this.state.startFromX:$.width-this.margins.right-this.state.startFromX,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement($f,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:$.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:j},Y))),N,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement($f,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?$.width-this.margins.right/2+this.titleMargin:this.margins.left/2-this.titleMargin,textAnchor:"middle",transform:"translate(0,\n ".concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:j},Y)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement($f,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:$.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:j},Y)))),!this.props.hideLegend&&u.createElement("div",{ref:function(t){return d.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),D&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},D))},n.prototype._generateCallout=function(t,n){return u.createElement(Pn,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(jf,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=zf(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,d=s.useUTC,f=(0,_n.c$)(t.y,c,d);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,_n.c$)(t,c,d)),u.createElement("div",{className:l.calloutContentY},(0,_n.c$)(v[t],c,d)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",f,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(Fd,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:As[t.index%Object.keys(Vs).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,_n.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,d)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),Gf=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),qf=(0,r.I)(Xf,(function(t){var n,i,e,r,u,a,l,s,c,d=t.className,f=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=f.fonts;return{root:[f.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},d],chartWrapper:(0,o.Cl)({},b?{overflow:"auto"}:{}),axisTitle:Ff(f,f.fonts.xSmall),axisAnnotation:Ff(f,f.fonts.small),xAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:f.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},yAxis:{selectors:{text:[f.fonts.tiny,{fill:f.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:f.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!Gf&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:f.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:f.semanticColors.bodySubtext})],calloutBlockContainer:[f.fonts.mediumPlus,{marginTop:"13px",color:f.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:f.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[f.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:f.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(f.semanticColors.menuDivider)}],tooltip:Ef(f),svgTooltip:(c={fill:f.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c)}})),Uf=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Zf(t,n){return Uf(t)(n)}var Kf=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Jf=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Qf="spacer-",tv=1/3,nv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},iv=function(t){return t.getBoundingClientRect()},ev=iv,rv=iv,ov=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Dn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,d=c.items,f=void 0===d?[]:d,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<f.length;y++){var m=v+y,b=f[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,C=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!C||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},C))}return u.createElement("div",(0,o.Cl)({},h),g)},lc(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var d=rv(this._scrollElement),f=Kf(this._scrollElement),v={top:f,bottom:f+d.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Jf(this._scrollElement,u);case 2:return void Jf(this._scrollElement,g-d.height);case 3:return void Jf(this._scrollElement,(u+g-d.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-d.height)}return void(this._scrollElement&&Jf(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new Xc(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=$(this.props,R),d=0,f=l;d<f.length;d++){var v=f[d];s.push(this._renderPage(v))}var h=r?Zf(r,this._onRenderSurface):this._onRenderSurface;return(u?Zf(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:z("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var d in o)o.hasOwnProperty(d)&&this._onPageRemoved(o[d])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},nv),l=[],s=1,c=0,d=null,f=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,C,M=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||M>=g.top&&c<=g.bottom,S=!b._requiredRect||M>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||f>=i&&f<i+s||i===r){d&&(l.push(d),d=null);var L=Math.min(s,v-i),V=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);V.top=c,V.height=u,b._visibleRect&&b._visibleRect.bottom&&(V.isVisible=M>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(V),S&&b._allowedRect&&(w=a,C={top:c,bottom:M,height:u,left:g.left,right:g.right,width:g.width},w.top=C.top<w.top||-1===w.top?C.top:w.top,w.left=C.left<w.left||-1===w.left?C.left:w.left,w.bottom=C.bottom>w.bottom||-1===w.bottom?C.bottom:w.bottom,w.right=C.right>w.right||-1===w.right?C.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else d||(d=b._createPage(Qf+i,void 0,i,0,void 0,m,!0)),d.height=(d.height||0)+(M-c)+1,d.itemCount+=s;if(c+=M-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return d&&(d.key=Qf+"end",l.push(d)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},nv),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Kf(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*tv)&&(a=this._surfaceRect=ev(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var d=Math.max(0,-a.top),f=(0,s.z)(this._root.current),v={top:d,left:a.left,bottom:d+f.innerHeight,right:a.right,width:a.width,height:f.innerHeight};this._requiredRect=uv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=uv(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function uv(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var av=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=nl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},Fs(i)))},lv=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement(Pn,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Dc,{isCircularNavigation:!0,direction:Ys.vertical},u.createElement(ov,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var d=t.textColor?Ql(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(av,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:d})),s)},sv=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?Ql(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,d=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),f=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement(lv,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,d,f)};function cv(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),d=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],f=[],v=[],h=d.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return d.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),d=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(d-t.y,2))>=s}));(0===f.length||y)&&(f.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:d,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:d}))})),f}var dv,fv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(dv||(dv={}));var vv=vi((function(t){return t.x})).left,hv=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return Bd(null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?ys(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===jl.DateAxis?ws(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=js(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?Jl(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=Cs(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=Gs(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?dv.hoverSize:1===n||i?2.5*a:dv.invisibleSize:l===t?dv.hoverSize:dv.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(Vs).length:0,d=Vs[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=d>1?l/d:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=Cs(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=Ql(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var d=o.data[s].startX,f=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(f):c._xAxisScale(d),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(f)-c._xAxisScale(d)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(Hf(e)[0],document.getElementById(c._rectId)),u=vv(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,d=null;if(void 0===a&&void 0!==l)s=l.x,d=u;else if(void 0!==a&&void 0===l)s=a.x,d=u-1;else{var f=void 0,v=void 0,h=void 0;switch(Ls(r[t].data[0].x,!0)){case jl.DateAxis:f=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1;break;case jl.NumericAxis:f=o,v=a.x,h=l.x,s=Math.abs(f-v)>Math.abs(f-h)?l.x:a.x,d=Math.abs(f-v)>Math.abs(f-h)?u:u-1}}var p=r[t].data[d],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,b=s instanceof Date?(0,_n.Yn)(s,c.props.culture,c.props.useUTC):s,x=s instanceof Date?s.getTime():s,w=m(c._calloutPoints,(function(t){return t.x===x})),C=r[t].data[d],M=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==C&&(c.state.nearestCircleToHighlight.x!==C.x||c.state.nearestCircleToHighlight.y!==C.y);w&&M&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),nl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(C.x))).attr("cy","".concat(i(C.y))).attr("visibility","visibility"),nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(C.x),", ").concat(i(C.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(C.y))),c.setState({nearestCircleToHighlight:C,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:w,YValueHover:w.values,dataPointCalloutProps:w,hoverXValue:g||b,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),w||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:C,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,_n.Yn)(n,c.props.culture,c.props.useUTC):n,u=n instanceof Date?n.getTime():n,a=m(c._calloutPoints,(function(t){return t.x===u}));if(a){var l=c;nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(l._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:a.values,stackCalloutProps:a,dataPointCalloutProps:a,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var d=t instanceof Date?(0,_n.Yn)(t,c.props.culture,c.props.useUTC):t,f=t instanceof Date?t.getTime():t,v=n instanceof Date?n.getTime():n,h=c,p=m(c._calloutPoints,(function(t){return t.x===f})),g=void 0;if(!1===c.props.isCalloutForStack&&(null==p?void 0:p.values)){var y=m(p.values,(function(t){return(null==t?void 0:t.y)===v}));y&&(g={x:f,values:[y]})}p?(nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(h._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+d,YValueHover:p.values,YValue:v,legendVal:a,lineColor:l,stackCalloutProps:p,dataPointCalloutProps:g,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){nl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,_n.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},lc(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=fs(c._points)||[],c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&Bs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=fs(this._points)||[])},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=gs(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=fs(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var d=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),f={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:zl.LineChart,calloutProps:d,tickParams:f,legendBars:c,createYAxis:ss,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?jl.DateAxis:jl.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ds,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(sv,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:As[r.index%Object.keys(Vs).length]})})),d=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=Ql(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(zd,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),d,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,$,z,j,Y,X=this,G=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var q=ri(this._points,(function(t){return ri(t.data,(function(t){return t.markerSize}))})),U=fv(this.props.styles,{theme:this.props.theme}),Z=function(t){var Z=[],J=[],Q=[],tt=K._points[t].legend,nt=K._points[t].color,it=K.state.activePoint,et=K.props.theme,rt=n-K.margins.bottom+6,ot=!(!K._points[t].useSecondaryYScale||!K._yScaleSecondary),ut=ot?K._yScaleSecondary:K._yScalePrimary,at=K._hasMarkersMode?Ks({data:K._points,xScale:K._xAxisScale,yScalePrimary:K._yScalePrimary,yScaleSecondary:K._yScaleSecondary,useSecondaryYScale:ot,xScaleType:K.props.xScaleType,yScaleType:K.props.yScaleType,secondaryYScaleType:K.props.secondaryYScaleType}):0;if(1===K._points[t].data.length){var lt=K._points[t].data[0],st=lt.x,ct=lt.y,dt=lt.xAxisCalloutData,ft=lt.xAxisCalloutAccessibilityData,vt=K._xAxisScale(st),ht=ut(ct);if(Us(vt,ht)){var pt="".concat(K._circleId,"_").concat(t),gt=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,yt=K._points[t].data[0].markerSize,mt=null===(e=null===(i=K._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),bt=K._points[t].data[0].text;Q.push(u.createElement(u.Fragment,{key:"".concat(pt,"_fragment")},u.createElement("circle",(0,o.Cl)({id:pt,key:pt,r:yt?yt*at/q:it===pt?5.5:3.5,cx:vt,cy:ht,fill:it===pt?et.semanticColors.bodyBackground:nt,opacity:gt?1:.1,onMouseOver:K._handleHover.bind(K,st,ct,rt,dt,pt,ft,ut,tt,nt),onMouseMove:K._handleHover.bind(K,st,ct,rt,dt,pt,ft,ut,tt,nt),onMouseOut:K._handleMouseOut,strokeWidth:it===pt?4:0,stroke:it===pt?nt:"",role:"img","aria-label":K._getAriaLabel(t,0),"data-is-focusable":gt,ref:function(t){X._refCallback(t,pt)},onFocus:function(){return X._handleFocus(pt,st,dt,pt,ft)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[0].onDataPointClick))),!K._isScatterPolar&&mt&&bt&&u.createElement("text",{key:"".concat(pt,"-label"),x:vt,y:ht+Math.max(yt?yt*at/q:3.5,4)+12,className:U.markerLabel,opacity:gt?1:.1},bt)))}}var xt=0,wt=null!==(a=null===(r=K._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Ct=null===(l=K._points[t].lineOptions)||void 0===l?void 0:l.curve;if((K.props.optimizeLargeData||Ct)&&K._points[t].data.length>1){for(var Mt=Rf().x((function(t){return X._xAxisScale(t[0])})).y((function(t){return ut(t[1])})).curve(Ws(Ct)).defined((function(t){return Us(X._xAxisScale(t[0]),ut(t[1]))})),kt="".concat(K._lineId,"_").concat(t),At="".concat(K._borderId,"_").concat(t),St=(null===(s=K._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||K.props.strokeWidth||4,Lt=(gt=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,[]),Vt=0;Vt<K._points[t].data.length;Vt++)Lt.push([K._points[t].data[Vt].x instanceof Date?K._points[t].data[Vt].x.getTime():K._points[t].data[Vt].x,K._points[t].data[Vt].y]);if(gt){var Dt=(null===(c=K._points[t].lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(K._points[t].lineOptions.lineBorderWidth.toString()):0;Dt>0&&J.push(u.createElement("path",{id:At,key:At,d:Mt(Lt),fill:"transparent",strokeLinecap:null!==(f=null===(d=K._points[t].lineOptions)||void 0===d?void 0:d.strokeLinecap)&&void 0!==f?f:"round",strokeWidth:Number.parseFloat(St.toString())+Dt,stroke:(null===(v=K._points[t].lineOptions)||void 0===v?void 0:v.lineBorderColor)||et.semanticColors.bodyBackground,opacity:1})),Z.push(u.createElement("path",(0,o.Cl)({id:kt,key:kt,d:Mt(Lt),fill:"transparent","data-is-focusable":!0,stroke:nt,strokeWidth:St,strokeLinecap:null!==(p=null===(h=K._points[t].lineOptions)||void 0===h?void 0:h.strokeLinecap)&&void 0!==p?p:"round",strokeDasharray:null===(g=K._points[t].lineOptions)||void 0===g?void 0:g.strokeDasharray,onMouseMove:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOver:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOut:K._handleMouseOut},K._getClickHandler(K._points[t].onLineClick),{opacity:1})))}else Z.push(u.createElement("path",{id:kt,key:kt,d:Mt(Lt),fill:"transparent","data-is-focusable":!1,stroke:nt,strokeWidth:St,strokeLinecap:null!==(m=null===(y=K._points[t].lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=K._points[t].lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:.1}));var Nt=null!==K.state.activeLine&&K.state.activeLine===t;Q.push(u.createElement("circle",{id:"".concat(K._staticHighlightCircle,"_").concat(t),key:"".concat(K._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:et.semanticColors.bodyBackground,strokeWidth:4,stroke:nt,visibility:Nt?"visibility":"hidden",onMouseMove:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOver:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOut:K._handleMouseOut}))}else if(!K.props.optimizeLargeData)for(var Ot=function(n){var i=K._checkInGap(n,wt,xt),e=i.isInGap;xt=i.gapIndex;var r="".concat(K._lineId,"_").concat(t,"_").concat(n),a="".concat(K._borderId,"_").concat(t,"_").concat(n),l="".concat(K._circleId,"_").concat(t,"_").concat(n),s=K._points[t].data[n-1],c=s.x,d=s.y,f=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=K._points[t].data[n],p=h.x,g=h.y,y=K._xAxisScale(c),m=ut(d),b=K._xAxisScale(p),Y=ut(g),G=(null===(x=K._points[t].lineOptions)||void 0===x?void 0:x.strokeWidth)||K.props.strokeWidth||4,ot=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,lt=K._points[t].hideNonActiveDots&&it!==l,st=null===(C=null===(w=K._points[t].lineOptions)||void 0===w?void 0:w.mode)||void 0===C?void 0:C.includes("text"),ct=K._points[t].data[n-1].text,dt=K._points[t].data[n-1].markerSize;if(Us(y,m)){var ft=K._getPath(y,m,l,n,!1,K._points[t].index);Q.push((null===(k=null===(M=K._points[t].lineOptions)||void 0===M?void 0:M.mode)||void 0===k?void 0:k.includes("markers"))||st?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:dt?dt*at/q:4,cx:y,cy:m,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,c,f,l,v)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n-1].onDataPointClick),{opacity:ot&&!lt?1:.01,fill:K._getPointFill(nt,l,n,!1),stroke:nt,strokeWidth:G,role:"img","aria-label":null!==(A=K._points[t].data[n-1].text)&&void 0!==A?A:K._getAriaLabel(t,n-1)})),!K._isScatterPolar&&st&&ct&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(dt?dt*at/q:4,4)+12,className:U.markerLabel,opacity:ot&&!lt?1:.01},ct)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:ft,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,c,f,l,v)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n-1].onDataPointClick),{opacity:ot&&!lt?1:.01,fill:K._getPointFill(nt,l,n,!1),stroke:nt,strokeWidth:G,role:"img","aria-label":K._getAriaLabel(t,n-1)})))}if(n+1===K._points[t].data.length){var vt="".concat(l).concat(n,"L"),ht="".concat(l).concat(n,"D"),pt=K._points[t].hideNonActiveDots&&it!==vt,gt=K._points[t].data[n],yt=gt.xAxisCalloutData,mt=gt.xAxisCalloutAccessibilityData;dt=K._points[t].data[n].markerSize;var bt=null===(L=null===(S=K._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("text"),Ct=K._points[t].data[n].text;Us(b,Y)&&(ft=K._getPath(b,Y,vt,n,!0,K._points[t].index),Q.push(u.createElement(u.Fragment,{key:"".concat(vt,"_container")},(null===(D=null===(V=K._points[t].lineOptions)||void 0===V?void 0:V.mode)||void 0===D?void 0:D.includes("markers"))||bt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:vt,key:vt,r:dt?dt*at/q:4,cx:b,cy:Y,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,p,yt,vt,mt)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n].onDataPointClick),{opacity:ot&&!pt?1:.01,fill:K._getPointFill(nt,vt,n,!0),stroke:nt,strokeWidth:G,role:"img","aria-label":null!==(N=K._points[t].data[n].text)&&void 0!==N?N:K._getAriaLabel(t,n)})),!K._isScatterPolar&&bt&&Ct&&u.createElement("text",{key:"".concat(vt,"-label"),x:b,y:Y+Math.max(dt?dt*at/q:4,4)+12,className:U.markerLabel,opacity:ot&&!lt?1:.01},ct)):u.createElement("path",(0,o.Cl)({id:vt,key:vt,d:ft,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,p,yt,vt,mt)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n].onDataPointClick),{opacity:ot&&!pt?1:.01,fill:K._getPointFill(nt,vt,n,!0),stroke:nt,strokeWidth:G,role:"img","aria-label":K._getAriaLabel(t,n)})),u.createElement("circle",{id:ht,key:ht,r:8,cx:b,cy:Y,opacity:0,width:0,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:K._handleMouseOut}))))}if(Us(y,m)&&Us(b,Y)&&(!K._hasMarkersMode||(null===(T=null===(O=K._points[t].lineOptions)||void 0===O?void 0:O.mode)||void 0===T?void 0:T.includes("lines"))))if(ot){if(!e){var Mt=(null===(E=K._points[t].lineOptions)||void 0===E?void 0:E.lineBorderWidth)?Number.parseFloat(K._points[t].lineOptions.lineBorderWidth.toString()):0;Mt>0&&J.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:Y,strokeLinecap:null!==(B=null===(F=K._points[t].lineOptions)||void 0===F?void 0:F.strokeLinecap)&&void 0!==B?B:"round",strokeWidth:Number.parseFloat(G.toString())+Mt,stroke:(null===(P=K._points[t].lineOptions)||void 0===P?void 0:P.lineBorderColor)||et.semanticColors.bodyBackground,opacity:1})),Z.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:Y,strokeWidth:G,ref:function(t){X._refCallback(t,r)},onMouseOver:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,d,rt,f,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,stroke:nt,strokeLinecap:null!==(H=null===(_=K._points[t].lineOptions)||void 0===_?void 0:_.strokeLinecap)&&void 0!==H?H:"round",strokeDasharray:null===(I=K._points[t].lineOptions)||void 0===I?void 0:I.strokeDasharray,strokeDashoffset:null===(W=K._points[t].lineOptions)||void 0===W?void 0:W.strokeDashoffset,opacity:1},K._getClickHandler(K._points[t].onLineClick))))}}else e||Z.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:Y,strokeWidth:G,stroke:nt,strokeLinecap:null!==($=null===(R=K._points[t].lineOptions)||void 0===R?void 0:R.strokeLinecap)&&void 0!==$?$:"round",strokeDasharray:null===(z=K._points[t].lineOptions)||void 0===z?void 0:z.strokeDasharray,strokeDashoffset:null===(j=K._points[t].lineOptions)||void 0===j?void 0:j.strokeDashoffset,opacity:.1}))},Tt=1;Tt<K._points[t].data.length;Tt++)Ot(Tt);K._isScatterPolar&&Q.push.apply(Q,cv({xAxisScale:K._xAxisScale,yAxisScale:ut,className:U.markerLabel||"",lineOptions:null===(Y=K._points[t])||void 0===Y?void 0:Y.lineOptions})),G.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(tt,", line ").concat(t+1," of ").concat(K._points.length," with ").concat(K._points[t].data.length," data points.")},J,Z,Q))},K=this,J=this._points.length-1;J>=0;J--)Z(J);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var Q=nl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var tt={tooltipCls:U.tooltip,id:this._tooltipId,axis:Q};Q&&ps(tt)}return G},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),pv=(0,r.I)(hv,(function(t){return{tooltip:Ef(t.theme),markerLabel:Pf(t.theme)}})),gv=(0,a.Z)(),yv=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),d=u.useMemo((function(){return p("ScatterChartTooltipId_")}),[]),f=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(st(t.data.scatterChartData)),h=u.useMemo((function(){return fs(v.current)||[]}),[v]),g=u.useRef(""),y=u.useRef(""),b=u.useRef(null),x=u.useMemo((function(){return[]}),[]),w=u.useRef(null),C=u.useRef([]),M=u.useRef(0),k=u.useRef(null),A=u.useRef(null),S=u.useState(""),L=S[0],V=S[1],D=u.useState(""),N=D[0],O=D[1],T=u.useState([]),E=T[0],F=T[1],B=u.useState([]),P=B[0],_=B[1],H=u.useState(!1),I=H[0],W=H[1],R=u.useState(""),$=R[0],z=R[1],j=u.useState(),Y=j[0],X=j[1],G=u.useState(!1),q=G[0],U=G[1],Z=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),K=Z[0],J=Z[1],Q=u.useState(""),tt=Q[0],nt=Q[1],it=u.useRef(void 0),et=u.useRef(!1),rt=u.useRef(!1),ot=gv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;it.current&&!Bs(it.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&J((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),it.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=k.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Bd(null===(n=k.current)||void 0===n?void 0:n.chartContainer,null===(i=A.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var ut=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Ls(t.data.scatterChartData[0].data[0].x,!0):jl.StringAxis,at=u.useRef([]),lt=u.useRef([]);function st(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?Jl(n,0):Ql(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){v.current===st(t.data.scatterChartData)&&t.data===v.current||(at.current=st(t.data.scatterChartData),lt.current=fs(at.current))}),[t.height,t.width,t.data,v]);var ct=u.useCallback((function(t){w.current=t}),[]);function dt(){_([]),W(!1)}function ft(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?J(n):J(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var vt=u.useCallback((function(n,i){var e=t.theme;return $===i?e.semanticColors.bodyBackground:n}),[$,t]),ht=u.useCallback((function(n,i,e,r,o,u,a,l){return u===jl.NumericAxis?ys(n,i,e,o,t.xScaleType,!0):u===jl.DateAxis?ws(n,i,e,o,l,r):xs(i,e,o)}),[t.xScaleType]),pt=u.useCallback((function(n,i,e,r,o){b.current=r;var u=i instanceof Date?(0,_n.Yn)(i,t.culture,t.useUTC):i,a=i instanceof Date?i.getTime():i,l=m(h,(function(t){return t.x===a}));l?(nl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),x.forEach((function(t){t.index===n&&(U(!0),V(e||""+u),nt("#".concat(r)),F(l.values),z(r))}))):z(r)}),[c,g,M,h,x,t.culture,t.useUTC]),gt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,_n.Yn)(n,t.culture,t.useUTC):n,d=n instanceof Date?n.getTime():n,f=m(h,(function(t){return t.x===d}));f?(nl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),b.current!==o&&(b.current=o,U(!0),V(r||""+s),nt("#".concat(o)),F(f.values),X(f),z(o))):z(o)}),[c,g,M,h,t.culture,t.useUTC]),yt=u.useCallback((function(){nl("#".concat(c)).attr("visibility","hidden")}),[c]),mt=u.useCallback((function(){b.current=null,z(""),q&&U(!1)}),[b,q,z,U]),bt=u.useCallback((function(){return K.length>0?K:N?[N]:[]}),[K,N]),xt=u.useCallback((function(){return 0===bt().length}),[bt]),wt=u.useCallback((function(t){return bt().includes(t)}),[bt]),Ct=u.useCallback((function(n,i){var e,r,o=null===(e=v.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,_n.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[v,t.culture,t.useUTC]),Mt=u.useCallback((function(n,i){var e,r,l,c,f,h,p,m,b,x,C,k,A,S,L,V,D,N,O,T,E,F,B,_,H,W,R,z,j,Y,X,G,q=[];v.current=I?P:st(t.data.scatterChartData),ut===jl.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var U=ri(v.current,(function(t){return ri(t.data,(function(t){return t.markerSize}))})),Z=ut!==jl.StringAxis?Ks({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,K=function(t){for(var n=[],e=null===(c=null===(l=v.current)||void 0===l?void 0:l[t])||void 0===c?void 0:c.legend,r=null===(h=null===(f=v.current)||void 0===f?void 0:f[t])||void 0===h?void 0:h.color,d=i-(null!==(m=null===(p=w.current)||void 0===p?void 0:p.bottom)&&void 0!==m?m:0)+6,P=function(i){var l=null===(A=null===(k=v.current)||void 0===k?void 0:k[t])||void 0===A?void 0:A.data[i],c=l.x,f=l.y,h=l.xAxisCalloutData,p=l.xAxisCalloutAccessibilityData,m=null===(S=g.current)||void 0===S?void 0:S.call(g,c),b=null===(L=y.current)||void 0===L?void 0:L.call(y,f);if(!Us(m,b))return"continue";var x,w="".concat(s,"_").concat(t,"_").concat(i),C="".concat(a,"_").concat(t,"_").concat(i),P=(null===(D=null===(V=v.current)||void 0===V?void 0:V[t])||void 0===D?void 0:D.data[i]).markerSize,R=P&&0!==U?ut!==jl.StringAxis?P*Z/U:4+(P-4)/(U-4)*12:$===C?6:4,z=wt(e)||xt()||I,j=(null===(O=null===(N=v.current)||void 0===N?void 0:N[t])||void 0===O?void 0:O.hideNonActiveDots)&&$!==C,Y=null===(E=null===(T=v.current)||void 0===T?void 0:T[t].data[i])||void 0===E?void 0:E.text;rt.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:C,key:C,r:Math.max(R,4),cx:m+M.current,cy:b,"data-is-focusable":z,onMouseOver:function(t){return gt(c,f,d,h,C,p,t)},onMouseMove:function(t){return gt(c,f,d,h,C,p,t)},onMouseOut:yt,onFocus:function(){return pt(w,c,h,C,p)},onBlur:yt},(x=null===(_=null===(B=null===(F=v.current)||void 0===F?void 0:F[t])||void 0===B?void 0:B.data[i])||void 0===_?void 0:_.onDataPointClick)?{onClick:x}:{},{opacity:z&&!j?1:.1,fill:vt(r,C),stroke:r,role:"img","aria-label":Ct(t,i),tabIndex:""!==(null===(W=null===(H=v.current)||void 0===H?void 0:H[t])||void 0===W?void 0:W.legend)?0:void 0})))),rt&&Y&&n.push(u.createElement("text",{key:"".concat(C,"-label"),x:m+M.current,y:b+Math.max(R+12,16),className:ot.markerLabel},Y))},K=0;K<(null===(C=null===(x=null===(b=v.current)||void 0===b?void 0:b[t])||void 0===x?void 0:x.data)||void 0===C?void 0:C.length);K++)P(K);et.current&&n.push.apply(n,cv({xAxisScale:g.current,yAxisScale:y.current,className:ot.markerLabel||"",lineOptions:null===(z=null===(R=v.current)||void 0===R?void 0:R[t])||void 0===z?void 0:z.lineOptions})),q.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(j=v.current)||void 0===j?void 0:j.length," with ").concat(null===(G=null===(X=null===(Y=v.current)||void 0===Y?void 0:Y[t])||void 0===X?void 0:X.data)||void 0===G?void 0:G.length," data points.")},n))},J=(null===(r=v.current)||void 0===r?void 0:r.length)-1;J>=0;J--)K(J);if(!t.showXAxisLablesTooltip)try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var Q=nl(n).call(g.current);try{document.getElementById(d)&&document.getElementById(d).remove()}catch(t){}var tt={tooltipCls:ot.tooltip,id:d,xAxis:Q};Q&&ps(tt)}return q}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,Ct,vt,pt,gt,yt,wt,xt,s,d,ut,$,I,P,ot,t.xScaleType,t.yScaleType]),kt=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,et.current=js(v.current),rt.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(v.current),C.current=Mt(r,i)}),[C,g,y,Mt]),At=u.useCallback((function(n,i){var e=Cs(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=Gs(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),St=t.legendProps,Lt=t.tickValues,Vt=t.tickFormat;v.current=st(t.data.scatterChartData);var Dt=v.current;St&&St.canSelectMultipleLegends&&(Dt=P.length>=1?P:v.current,h=fs(Dt));var Nt=null;t.hideLegend||rt.current||(Nt=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){O("")},hoverAction:function(){mt(),O(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(zd,(0,o.Cl)({legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:dt},{onChange:ft},t.legendProps))}(v.current));var Ot=(0,o.Cl)({isCalloutVisible:q,directionalHint:3,YValueHover:E,hoverXValue:L,id:"toolTip".concat(b.current),target:tt,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&q),descriptionMessage:t.getCalloutDescriptionMessage&&Y?t.getCalloutDescriptionMessage(Y):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Tt={tickValues:Lt,tickFormat:Vt},Et=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();return r=Array.from(new Set(Et)),t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(qf,(0,o.Cl)({},t,{ref:k,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Dt,chartType:zl.ScatterChart,calloutProps:Ot,tickParams:Tt,legendBars:Nt,getmargins:ct,getMinMaxOfYAxis:At,getDomainNRangeValues:ht,createYAxis:ss,createStringYAxis:ds,getGraphData:kt,xAxisType:ut,onChartMouseLeave:mt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:k},et.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,C.current)))}})):u.createElement("div",{id:f,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));yv.displayName="ScatterChart";var mv=(0,r.I)(yv,(function(t){return{tooltip:Ef(t.theme),markerLabel:Pf(t.theme)}}));function bv(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function xv(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function wv(t,n){return t[n]}function Cv(t){const n=[];return n.key=t,n}function Mv(t){return t<0?-1:1}function kv(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(Mv(o)+Mv(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Av(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Sv(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function Lv(t){this._context=t}function Vv(t){this._context=t}function Dv(t){return new Lv(t)}function Nv(t,n,i){var e=null,r=Yd(!0),o=null,u=rl,a=null,l=hf(s);function s(s){var c,d,f,v,h,p=(s=jd(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)d=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),f=c-1;f>=d;--f)a.point(y[f],m[f]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return Rf().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?If:Yd(+t),n="function"==typeof n?n:Yd(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?Wf:Yd(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:Yd(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:Yd(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Yd(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:Yd(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:Yd(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Yd(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Yd(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}Lv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Sv(this,this._t0,Av(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Sv(this,Av(this,i=kv(this,t,n)),i);break;default:Sv(this,this._t0,i=kv(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new Vv(t)}.prototype=Object.create(Lv.prototype)).point=function(t,n){Lv.prototype.point.call(this,n,t)},Vv.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var Ov,Tv=(0,a.Z)(),Ev=vi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Ov||(Ov={}));var Fv=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return Bd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Cs(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===jl.NumericAxis?ys(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(Hf(t)[0],document.getElementById(e._rectId)),r=Ev(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?Ls(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var d=void 0,f=void 0,v=void 0;switch(c){case jl.DateAxis:d=new Date(i).getTime(),f=u.x.getTime(),v=a.x.getTime(),l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1;break;case jl.NumericAxis:d=i,f=u.x,v=a.x,l=Math.abs(d-f)>Math.abs(d-v)?a.x:u.x,s=Math.abs(d-f)>Math.abs(d-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,_n.Yn)(l,e.props.culture,e.props.useUTC):l,b=l instanceof Date?l.getTime():l,x=m(e._calloutPoints,(function(t){return t.x===b})),w=c===jl.DateAxis?l.getTime():l,C=e.state.nearestCircleToHighlight!==w;if(x&&C&&!e.state.isShowCalloutPending){var M=e._getFilteredLegendValues(x.values);e.setState({nearestCircleToHighlight:w,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:Ov.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},x),{values:M}),YValueHover:M,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},x),{values:M}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}x||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:w,displayOfLine:Ov.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Ov.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=Yd([]),n=xv,i=bv,e=wv;function r(r){var o,u,a=Array.from(t.apply(this,arguments),Cv),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=jd(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:Yd(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:Yd(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?xv:"function"==typeof t?t:Yd(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?bv:t,r):i},r}().keys(t)(n);o=ri(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?Cs(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=fs(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var d="chart".concat(c);s.push(d)}var f=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:f,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=fs(t),f={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);f=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)d="chart".concat(c),s.push(d);f=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:f,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(zd,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,d=c.pointOptions,f=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,d,f,h,p,g,y,m,b,x,w,C=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,M=Ws(null===(d=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===d?void 0:d.curve,Dv),k=Nv().x((function(t){return n(t.xVal)})).y0((function(t){return C(t.values[0])})).y1((function(t){return C(t.values[1])})).curve(M),A=Rf().x((function(t){return n(t.xVal)})).y((function(t){return C(t.values[1])})).curve(M),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(f=s[a])||void 0===f?void 0:f.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:C(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=d&&d.r?Number(d.r):8;e._data.forEach((function(t,a){var c;if(s.length!==a){var f=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),Fs(d),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:f(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},Fs(d),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},Fs(f))));var p=Tv(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=nl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&ps(y)}return v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?Jl(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,_n.Yn)(u,e.props.culture,e.props.useUTC):u,c=u instanceof Date?u.getTime():u,d=e._calloutPoints.find((function(t){return t.x===c}));d.values=d.values.filter((function(t){return t.y===a}));var f=e._getFilteredLegendValues(d.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:f,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},d),{values:f}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},d),{values:f}),activePoint:i})},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},lc(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:Ov.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._tooltipId=p("AreaChartTooltipID"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=gs(i);this._colors=r,this._opacity=a,this._data=l.renderData;var d=this._getLegendData(i),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:zl.AreaChart,calloutProps:v,legendBars:d,createYAxis:ss,isCalloutForStack:!0,xAxisType:c?jl.DateAxis:jl.NumericAxis,tickParams:f,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ds,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,_n.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),Bv=(0,r.I)(Fv,(function(t){return{tooltip:Ef(t.theme)}})),Pv=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},_v=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){Iv(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Iv(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Pv(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:wf()},n}(u.Component),Hv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=wf().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],d=s[1],f=(0,a.Z)()((function(t){return Pv(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,_n.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(f.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement($f,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:d+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,_n.c$)(null==o?void 0:o.data.y,l)),className:f.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:vs}))},n}(_v);function Iv(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Wv,Rv=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(Hv,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(Jl(c,0,null==l?void 0:l.isInverted));var d=this.props.colors,f=void 0===d?s:d;this.colors=Mu().range(f.map((function(t){return Ql(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(Dc,{direction:Ys.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:af().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),$v=(0,a.Z)(),zv=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,d=a.culture;this._classNames=$v(c,{theme:l,width:i,height:e,className:s});var f=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(Rv,{culture:d,width:i+8,height:e+8,outerRadius:f,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),jv=(0,r.I)(zv,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(Wv||(Wv={}));var Yv,Xv=(0,a.Z)(),Gv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Xv(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(zd,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Xv(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,d=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var f=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},f,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement(Pn,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:c,YValue:d,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,d=this,f=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(f-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===Wv.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===Wv.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var C=0!==x?x/(100-v):1,M=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,f=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=f;d.props.enableGradient&&(f=(null===(r=t.gradient)||void 0===r?void 0:r[0])||oc(e,0,null===(o=d.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||oc(e,0,null===(c=d.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(M+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/C:k>99&&100!==k?k=99/C:k/=C,y.push(M);var m=d.props.styles,x=!(!d._legendHighlighted(t.legend)&&!d._noLegendHighlighted()),w=t.placeHolder?d.props.theme.semanticColors.bodyText:f;d._classNames=Xv(m,{theme:d.props.theme,shouldHighlight:x,href:a,variant:d.props.variant,hideLabels:d.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?d._classNames.placeHolderOnHover:d._classNames.opacityChangeOnHover,ref:function(n){d._refCallback(n,t.legend)},"data-is-focusable":!d.props.hideTooltip&&x,onFocus:d._onBarFocus.bind(d,h,w,t),onBlur:d._onBarLeave,role:"img","aria-label":d._getAriaLabel(t),onMouseOver:d._onBarHover.bind(d,h,w,t),onMouseMove:d._onBarHover.bind(d,h,w,t),onMouseLeave:d._onBarLeave,onClick:a?t.placeHolder?void 0:d._redirectToUrl.bind(d,a):t.onClick},d.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:f}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(d._barId,"-").concat(l,"-").concat(e),x:"".concat(d._isRTL?100-y[e]-k-d.state.barSpacingInPercent*e:y[e]+d.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:d.props.roundCorners?3:0,fill:d.props.enableGradient?"url(#".concat(A,")"):f}))}));if(this.props.variant!==Wv.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){d._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},Ns(L)))}var V=void 0!==e&&e,D=this.props.variant!==Wv.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==Wv.AbsoluteScale&&!V&&1===t.chartData.length,O=function(){return(0,_n.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(Rc,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},Ds(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,_n.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Ds(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),qv=(0,r.I)(Gv,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===Wv.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===Wv.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==Wv.AbsoluteScale||c?0:40}}})),Uv=(0,a.Z)(),Zv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var d=this._createBarsAndLegends(n,c,s,i,e),f=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=Uv(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,_n.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(Rc,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),f&&u.createElement("div",(0,o.Cl)({},Ds(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,_n.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Ds(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,d[0]),u.createElement(Pn,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},d[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=Uv(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),d=[i.blueLight,i.blue,i.blueMid,i.red,i.black],f=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:d[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||oc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||f.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,C=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),M=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=Uv(w,{theme:l.props.theme,shouldHighlight:C,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&C,onFocus:l._onBarFocus.bind(l,m,M,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,M,t),onMouseMove:l._onBarHover.bind(l,m,M,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(f,e),this._addLegend(f,r);var w=u.createElement(zd,(0,o.Cl)({legends:f,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Kv=(0,r.I)(Zv,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,d=t.benchmarkRatio,f=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+d+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:f,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(f,", ").concat(f,")")},i)}}})),Jv=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Qv=function(t,n,i){var e=Jv(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},th=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},nh=function(t,n){return t+n/(1-n)*(t-1)},ih=function(t,n,i){return t*nh(n,i)},eh=function(t,n,i){return t/nh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Yv||(Yv={}));var rh=(0,a.Z)(),oh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return Bd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?function(t,n,i,e){var r=ri(t,(function(t){return t.x})),o=ei(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):xs(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===jl.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),d=e.props.theme,f=e.props,v=f.data,h=f.lineLegendColor,g=void 0===h?d.palette.yellow:h,y=f.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=Rf().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),C=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;C>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*C,stroke:d.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var M=m.map((function(i,r){var a,d={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){return d.refElement=t},onFocus:e._lineFocus.bind(e,i.point,d),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,M)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Yv.show:Yv.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Yv.show,radius:8}:e._legendHighlighted(n)?{visibility:Yv.show,radius:.3}:{visibility:Yv.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(Js.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===jl.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===jl.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,d=void 0!==c&&c,f=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=d?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:f?d?oc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||oc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Iu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===jl.NumericAxis){var o=ri(e._points,(function(t){return t.x})),u=ei(e._points,(function(t){return t.x}));i=Iu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Es(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===jl.DateAxis){var a=ei(e._points,(function(t){return t.x})),l=ri(e._points,(function(t){return t.x}));(i=e.props.useUTC?yu():gu()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=ku().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,d=void 0===c?r.palette.yellow:c,f=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=oc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};f.push(r)})),e._isHavingLine&&s&&d){var h={title:s,color:d,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};f.unshift(h)}return u.createElement(zd,(0,o.Cl)({legends:f,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis){if(Es(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth),u>=(f=ih(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-f)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=eh(u,r.length,e._xAxisInnerPadding),l=Os(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(f=ih(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var d=hs(r)+20;c=(u-(f=(r.length-e._xAxisInnerPadding)*d))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var f=ih(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-f)/2)}e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,Qv(r,th(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},lc(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._tooltipId=p("VCTooltipID_"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(ri(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(ei(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=rh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:zl.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:ss,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:Ys.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:ds,getmargins:this._getMargins,getMinMaxOfYAxis:Ms,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Es(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?Ls(this.props.data[0].x,!0):jl.StringAxis,this._points=this.props.data||[],this._barWidth=Os(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:Ts(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===jl.StringAxis?2/3:.5),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Iu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=rh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x)-e._barWidth/2,M=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&ps(h)}return f},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=rh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x),M=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d);e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&ps(h)}return f},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),d=this._yMax<0?this._yMax:0,f=this._points.map((function(n,i){var r,a,f,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=rh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(d),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,d,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x)-e._barWidth/2,M=t-e.margins.bottom-(b?-1*w:w)-s(d),k=t-e.margins.bottom-s(d),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(f=n.gradient)||void 0===f?void 0:f[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&ps(h)}return f},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):Ns(i))},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),uh=(0,r.I)(oh,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:Ef(i),barLabel:Bf(i)}})),ah=(0,a.Z)(),lh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return Bd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?function(t,n,i,e){var r=ei(t,(function(t){return t.x})),o=ri(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):xs(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],d=[],f=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==jl.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,f,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,C=w?a(s[i][b-1].y):n(s[i][b-1].y),M=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==Yl.StringAxis?0:n.bandwidth()/2;h>0&&d.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:C,x2:M,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:C,x2:M,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(f=s[i][0].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},d=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==Yl.StringAxis?0:n.bandwidth()/2;f.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){return c.refElement=t}},d&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,d,c,f)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,d=void 0===c?0:c,f=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(f);e._xAxisType===jl.StringAxis&&(e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===jl.NumericAxis||(e._xAxisType,jl.DateAxis),r.xAxisPoint)),c=e._xAxisType!==jl.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,f=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===Yl.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===Yl.StringAxis?0:n(e.Y_ORIGIN)),w=x,C=x,M=0,k=0,A=h.map((function(t,g){var x,A,S,L,V=t.color?t.color:e._colors[g],D=V;e.props.enableGradient&&(V=(null===(x=t.gradient)||void 0===x?void 0:x[0])||oc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],D=(null===(S=t.gradient)||void 0===S?void 0:S[1])||oc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=V);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=ah(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,V,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===Yl.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,d,1),M=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,d);T<B&&(T=B),t.data>=e.Y_ORIGIN?M=w-=T+F:C=(M=C+F)+T,f+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(M+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){return N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:M,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){return N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,V=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},D=!1,N=0;return e.props.hideLabels||e._yAxisType===Yl.StringAxis||(e._noLegendHighlighted()?(D=!0,N=f):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){return S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:N>=e.Y_ORIGIN?M-6:M+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):Ns(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=nl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&ps(y)}return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Iu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===jl.NumericAxis){var o=ri(e._dataset,(function(t){return t.x})),u=ei(e._dataset,(function(t){return t.x})),a=Iu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Es(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===jl.DateAxis){var l=ei(e._dataset,(function(t){return t.x})),s=ri(e._dataset,(function(t){return t.x})),c=e.props.useUTC?yu():gu();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:ku().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===Yl.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),d=n.legend,f=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(d,", ").concat(f,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis){if(Es(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth),i>=(r=ih(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=eh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=Os(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=ih(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=hs(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var d=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,Qv(d,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=ri(t,(function(t){return t.y}));return{startValue:ei(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:ei(r),endValue:ri(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=Ls(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Ls(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===Yl.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==Yl.StringAxis?[]:$s(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},lc(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._tooltipId=p("VSBCTooltipId_"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=ah(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:zl.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:ss,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:ds,barwidth:this._barWidth,focusZoneDirection:r||n?Ys.horizontal:Ys.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Es(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barWidth=Os(this.props.barWidth,this.props.maxBarWidth);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.red,t.black],this._xAxisType=Ls(this.props.data[0].xAxisPoint,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=Ts(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===jl.StringAxis?2/3:.5),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===Yl.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,d=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||oc(l,0,null==d?void 0:d.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var f=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};f.push(n)}));var v=f.concat(a);return u.createElement(zd,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,_n.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,_n.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===Yl.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===Yl.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),sh=(0,r.I)(lh,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:Ef(e),barLabel:Bf(e)}})),ch=(0,a.Z)(),dh=.1,fh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e.toImage=function(t){var n,i;return Bd(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:ei(e),endValue:ri(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis||o===jl.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:xs(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=Os(e.props.barwidth,e.props.maxBarWidth,eh(l.bandwidth(),e._legends.length,dh)),e._groupWidth=ih(e._barWidth,e._legends.length,dh);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t){var n=new Set,i=e._getOrderedXAxisLabels(t);t.forEach((function(t){t.series.forEach((function(t){n.add(t.legend)}))}));var r=e._createDataset(t);return{legends:Array.from(n),xAxisLabels:i,datasetForBars:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e.setState({refSelected:i,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.data,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:e.props.isCalloutForStack?n.stackCallOutAccessibilityData:t.callOutAccessibilityData,YValueHover:n.groupSeries,hoverXValue:t.xAxisCalloutData}))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e.setState({refSelected:i.currentTarget,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.data,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:e.props.isCalloutForStack?n.stackCallOutAccessibilityData:t.callOutAccessibilityData,YValueHover:n.groupSeries,hoverXValue:t.xAxisCalloutData})},e._redirectToUrl=function(t){t&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],d=Object.keys(t).filter((function(t){return t in e._legendColorMap})),f=ih(e._barWidth,d.length,dh),v=ku().domain(d).range(e._isRtl?[f,0]:[0,f]).paddingInner(dh);if(e._legends.forEach((function(n,i){var a,l=t[n];if(l){var d=l[0].useSecondaryYScale&&o?o:r,f=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=d(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),C=Math.max(d(e.Y_ORIGIN)-d(Math.abs(n.data)),1),M=n.color;n.data>=e.Y_ORIGIN?w=b-=C+m:x=(w=x+m)+C,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:C,width:e._barWidth,x:f,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):M,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:f+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):Ns(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=nl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&ps(g)}return u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-f)/2,", 0)")},s,c)},e._createDataset=function(t){var n=[];return t.forEach((function(t,i){var e={},r={};t.series.forEach((function(t){e[t.legend]?(e[t.legend].push((0,o.Cl)({},t)),r[t.legend].data+=t.data):(e[t.legend]=[(0,o.Cl)({},t)],r[t.legend]=(0,o.Cl)({},t))})),e.xAxisPoint=t.name,e.indexNum=i,e.groupSeries=Object.values(r),e.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,n.push(e)})),n},e._createX0Scale=function(t){return ku().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return ku().domain(e._legends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(dh)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[];return e._legends.forEach((function(n){var i={title:n,color:e._legendColorMap[n][0],hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(i)})),u.createElement(zd,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis)if(Es(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=Os(e.props.barwidth,e.props.maxBarWidth);var i=ih(e._barWidth,e._legends.length,dh);n>=(r=ih(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=eh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=eh(u,e._legends.length,dh),l=Os(e.props.barwidth,e.props.maxBarWidth,a),s=(i=ih(l,e._legends.length,dh),(n-(r=ih(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=hs(e._xAxisLabels)+20,d=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,d))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._xAxisLabels.length," groups of ").concat(e._legends.length," bars each. ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Vo(Iu().domain([0,1]).range([t,r])(n)).formatRgb()},e._addDefaultColors=function(t){var n;e._legendColorMap={};var i=0;return null!==(n=null==t?void 0:t.map((function(t){var n,r;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(r=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,r,u,a,l,s,c,d=t.color?t.color:Jl(i,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),f=d;if(e.props.enableGradient)if(t.color)d=e._adjustColor(t.color||f,.2,!1,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),f=e._adjustColor(t.color||d,.2,!0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);else{var v=oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted);d=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],f=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[d,f];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[d,f]),i+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==r?r:[]})})))&&void 0!==n?n:[]},e._getOrderedXAxisLabels=function(t){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(t),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t){var n={};return t.forEach((function(t){n[t.name]||(n[t.name]=[]),t.series.forEach((function(i){n[t.name].push(i.data)}))})),n},lc(e),e._createSet=(0,an.J9)((function(t){return e._createDataSetOfGVBC(t)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:""},e._calloutId=p("callout"),e._tooltipId=p("GVBCTooltipId_"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this._addDefaultColors(this.props.data);this._xAxisType=Ls(n[0].name,!0);var i=this._createSet(n),e=i.legends,r=i.xAxisLabels,a=i.datasetForBars;this._legends=e,this._xAxisLabels=r,this._datasetForBars=a;var l=this._getLegendData();this._adjustProps();var s=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(s,this.props.yMaxValue||0),this._classNames=ch(this.props.styles,{theme:this.props.theme,href:this.props.href});var c=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),Ds(this.state.callOutAccessibilityData,"text",!1)),d={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:zl.GroupedVerticalBarChart,calloutProps:c,legendBars:l,xAxisType:this._xAxisType,createYAxis:ss,datasetForXAxisDomain:this._xAxisLabels,tickParams:d,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:ds,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:Ys.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(){return u.createElement("g",null,t._groupedVerticalBarGraph)}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.series.length})).length>0)},n.prototype._adjustProps=function(){this._barWidth=Os(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=Ts(this.props.xAxisInnerPadding,void 0,2/(2+nh(this._legends.length,dh))),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),vh=(0,r.I)(fh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:Ef(n),barLabel:Bf(n)}})),hh=i(263),ph=(0,a.Z)(),gh=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return Bd(null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l,s){return u===jl.NumericAxis||u===jl.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:xs(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],d=zs(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:d},(0,_n.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var f={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(f),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(f.x),", ").concat(r._yAxisScale(f.y),")"),ref:function(t){r._rectRefCallback(t,s,f)},onFocus:r._onRectFocus.bind(r,s,f),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,f),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(zd,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Iu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===jl.DateAxis?"".concat(t.getTime()):r._xAxisType===jl.StringAxis?t:r._xAxisType===jl.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===Yl.DateAxis?"".concat(t.getTime()):r._yAxisType===Yl.StringAxis?t:r._yAxisType===Yl.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===jl.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===jl.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===jl.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===Yl.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===Yl.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===Yl.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===Yl.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===Yl.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===jl.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===jl.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===Yl.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===Yl.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),He(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return Bu(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?$s(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===jl.DateAxis||r._xAxisType===jl.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?$s(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===Yl.DateAxis||r._yAxisType===Yl.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===jl.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===jl.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===jl.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===jl.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===Yl.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},lc(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=Ls(i,!0),this._yAxisType=Ls(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,d=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var f=this._createSet(a,l,s,c,d),v=f.dataSet,h=f.xAxisPoints,p=f.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=ph(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),Ds(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qf,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:zl.HeatMapChart,xAxisType:jl.StringAxis,yAxisType:Yl.StringAxis,calloutProps:g,createYAxis:ss,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:ds,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:Ys.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),yh=(0,r.I)(gh,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{cartesianStyles:{},calloutStyles:{root:{maxWidth:"238px"}}}}})),mh=/[\{\}]/g,bh=/\{\d+\}/g;function xh(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(bh,(function(t){var n=e[t.replace(mh,"")];return null==n&&(n=""),n}))}function wh(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function Ch(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function Mh(t,n){return n-1-t.height}function kh(t,n){return t.sourceLinks.length?t.depth:n-1}function Ah(t){return function(){return t}}function Sh(t,n){return Vh(t.source,n.source)||t.index-n.index}function Lh(t,n){return Vh(t.target,n.target)||t.index-n.index}function Vh(t,n){return t.y0-n.y0}function Dh(t){return t.value}function Nh(t){return t.index}function Oh(t){return t.nodes}function Th(t){return t.links}function Eh(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function Fh({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function Bh(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=Nh,c=kh,d=Oh,f=Th,v=6;function h(){const h={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=Eh(e,n)),"object"!=typeof r&&(r=i.target=Eh(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(wh(n.sourceLinks,Dh),wh(n.targetLinks,Dh)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=Ch(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(Ch(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/wh(n,Dh)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),Fh(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=C(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Vh),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=M(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Vh),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(Lh);for(const{target:{targetLinks:n}}of t)n.sort(Sh)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(Lh),i.sort(Sh)}function C(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function M(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return Fh(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:Ah(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Ah(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(d="function"==typeof t?t:Ah(t),h):d},h.links=function(t){return arguments.length?(f="function"==typeof t?t:Ah(t),h):f},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class Ph{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var _h=(0,a.Z)(),Hh="#757575",Ih=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function Wh(t){return"number"==typeof t?t:t.nodeId}function Rh(t,n){return t[Wh(n.source)][Wh(n.target)]}var $h="...";function zh(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var jh,Yh,Xh=Nv().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Ph(t,!0)})),Gh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return Bd(i.chartContainer,void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},lc(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return _h(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return xh(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return xh(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return xh(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=Wh(t.source),o=e[r];o||(o={},e[r]=o),o[Wh(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,d=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),f=this._computeClassNames(r,d),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(f),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(f,h,x,b),C=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),M=this._fetchLinks(p,C),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:f.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:f.root,role:"presentation",ref:function(n){return t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Dc,{direction:Ys.vertical,className:f.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:f.chart},m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:f.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:f.links,strokeOpacity:1},M[t.index])})),k.isCalloutVisible&&u.createElement(Pn,(0,o.Cl)({},k),u.createElement(Js.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=nl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=nl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=zh(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var d=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=zh(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=zh(t,$h);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=$h;break}}return t.text(null),u}(o,t.name,116,a),f=d.slice(-3)===$h;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:d,aria:n(t,s),trimmed:f,height:u,weightOffset:l}})),il(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:Bh().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?Mh:kh),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var d=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(d).length;var f,v,h=(f=c.nodes,v={},f.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=Wh(t.source),e=n[i];e||(e={},n[i]=e),e[Wh(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return oi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=Rh(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(d,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-oi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,d),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=Rh(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=Ih.map((function(t){return t.fillColor})),r=Ih.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=nl("#".concat(this._labelTooltipId));return n.empty()&&(n=nl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=Rh(n,t),d=c.reactId,f=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Xh(h),id:d,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,f)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,f)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,d=s.gElementId,f=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=f>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,C=n.y0,M=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:d},u.createElement("rect",{x:x,y:C,height:f,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),f>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:C,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:M,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:C,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:M,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return Hh}return Hh},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.html(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),qh=(0,r.I)(Gh,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:Ef(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"}}}));function Uh(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function Zh(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Jh)):void 0===n&&(n=Kh);for(var i,e,r,o,u,a=new np(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new np(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(tp)}function Kh(t){return t.children}function Jh(t){return Array.isArray(t)?t[1]:null}function Qh(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function tp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function np(t){this.data=t,this.depth=this.height=0,this.parent=null}function ip(t,n){return t.parent===n.parent?1:2}function ep(t){var n=t.children;return n?n[0]:t.t}function rp(t){var n=t.children;return n?n[n.length-1]:t.t}function op(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function up(t,n,i){return t.a.parent===n.parent?t.a:i}function ap(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(jh||(jh={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Yh||(Yh={})),np.prototype=Zh.prototype={constructor:np,count:function(){return this.eachAfter(Uh)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return Zh(this).eachBefore(Qh)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},ap.prototype=Object.create(np.prototype);var lp=(0,a.Z)(),sp=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=Zh(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=ip,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new ap(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new ap(e[r],r)),i.parent=n;return(u.parent=new ap(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,d=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)}));var f=s===c?1:t(s,c)/2,v=f-s.x,h=n/(c.x+f+v),p=i/(d.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,d=a.m,f=l.m;a=rp(a),o=ep(o),a&&o;)l=ep(l),(u=rp(u)).a=n,(r=a.z+d-o.z-s+t(a._,o._))>0&&(op(up(a,n,e),n,r),s+=r,c+=r),d+=a.m,s+=o.m,f+=l.m,c+=u.m;a&&!rp(u)&&(u.t=a,u.m+=d-c),o&&!ep(l)&&(l.t=o,l.m+=s-f,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var d=[],f=0,v=function(t){var n,i;t.id=f,d.push({id:f,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),f++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=d;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(d[x.parentID].dataName,"\n ").concat(d[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var C=(h-g)/2,M=p;y.add(x.parentID),this.D(x.id,d[x.parentID].x,d[x.parentID].y,d[x.id].x,d[x.id].y,!0,h,p,g);for(var k=null===(i=d[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=d[x.parentID])||void 0===e?void 0:e.x)-C/2-10,S=(null===(r=d[x.parentID])||void 0===r?void 0:r.x)+C/2+10,L=null===(o=d[x.parentID])||void 0===o?void 0:o.x,V=null===(u=k[0])||void 0===u?void 0:u.y,D=0;D<k.length;++D){var N=k[D];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?1===k.length?L:A:S,V,N.data.fill,1===k.length?h:C,p,N.id,w),D%2==1&&(V+=M+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=M+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?A:S,V,N.data.fill,1===k.length?h:C,p,N.id,w),D%2==1&&(V+=M+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=M+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=ei(k=null===(a=d[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=ri(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=nl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),il(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,d){var f="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(d),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":f,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),cp=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=lp(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=il("text"),i=il("rect"),e=il("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new sp(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(Dc,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),dp=(0,r.I)(cp,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function fp(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var vp=(0,a.Z)(),hp=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=Nv().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(rl);this.area=n;var i=Rf().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(rl);this.line=i;var e=this.props.data.lineChartData[0].data,r=fp(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Iu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Iu().domain([0,ri(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=vp(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dc,{direction:Ys.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),pp=(0,r.I)(hp,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function gp(t,n,i){var e=t.semanticColors.bodyText,r=t.semanticColors.bodyBackground,o=Ao(n||e),u=Ao(i||r);if(!o||!u)return r;if(es(o.formatHex(),u.formatHex())>=3)return u.formatHex();var a=function(t,n){var i=Ao(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Vo(255-e.r,255-e.g,255-e.b).formatHex()}(u.formatHex(),t);return es(o.formatHex(),a)>=3?a:r}var yp=(0,a.Z)(),mp=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return Bd(i._rootElem,void 0,i._isRTL,t)},lc(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,d=yp(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var f,v=new Set;e.forEach((function(t){var n,i,e=null===(i=Ao((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&es(b,p)>=3){f=p,h=!0;break}}return u.createElement("div",{ref:function(t){return n._rootElem=t},className:d.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:d.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:d.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,n){var i=(0,o.Cl)({},null==t?void 0:t.style),e=i.color,r=i.backgroundColor;return h?i.backgroundColor=f:(e||r)&&(i.backgroundColor=gp(c,e,r)),u.createElement("th",{key:n,className:d.headerCell,style:i},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,n){return u.createElement("tr",{key:n},t.map((function(t,n){var i=(0,o.Cl)({},null==t?void 0:t.style),e=i.color,r=i.backgroundColor;return(e||r)&&(i.backgroundColor=gp(c,e,r)),u.createElement("td",{key:n,className:d.bodyCell,style:i},t.value)})))}))))))))},n}(u.Component),bp=(0,r.I)(mp,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)})}})),xp=(0,a.Z)(),wp=function(t){function n(n){var i,e,r,a,s,c,d=t.call(this,n)||this;return d._isRtl=(0,l.jI)(),d.X_ORIGIN=0,d.toImage=function(t){var n,i;return Bd(null===(n=d._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=d._legendsRef.current)||void 0===i?void 0:i.toSVG,d._isRtl,t)},d._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){var s;return s=o===jl.NumericAxis?function(t,n,i,e,r,o){var u=bs(ms(t),o),a=u.longestPositiveBar,l=u.longestNegativeBar,s=e?n.left:n.left+r,c=e?i-n.right-r:i-n.right;return e?{dStartValue:a,dEndValue:Math.min(l,o),rStartValue:s,rEndValue:c}:{dStartValue:Math.min(l,o),dEndValue:a,rStartValue:s,rEndValue:c}}(t,n,i,r,l,d.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},s},d._getMargins=function(t){d.margins=t},d._renderContentForOnlyBars=function(t){var n,i,e,r,o=d.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,f=0;return d.props.data.forEach((function(n,i){n.y===t.y&&(f=i)})),l?(r=d.props.colors?d._createColors()(1):Jl(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=oc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:d.props.colors?d._createColors()(t.x):Jl(f,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:d.props.culture}))},d._renderCallout=function(t){return t?d._renderContentForOnlyBars(t):null},d._getCustomizedCallout=function(){return d.props.onRenderCalloutPerDataPoint?d.props.onRenderCalloutPerDataPoint(d.state.dataPointCalloutProps,d._renderCallout):null},d._getGraphData=function(t,n,i,e,r,o){var u=ms(d._points),a=bs(u,d.X_ORIGIN);d._longestBarPositiveTotalValue=a.longestPositiveBar,d._longestBarNegativeTotalValue=a.longestNegativeBar;var l=d._yAxisType===Yl.NumericAxis?d._getScales(i,e,!0):d._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,f=s.range(),v=[];return f[0]<f[1]&&(v=u.map((function(t){return d._yAxisType===Yl.NumericAxis?d._createNumericBars(i,e,r,o,t,s,c):d._createStringBars(i,e,r,o,t,s,c)})).flat()),d._bars=v},d._refCallback=function(t,n){d._refArray.push({index:n,refElement:t})},d._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=d.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,f=d.props.data,v=f.filter((function(n){return n.y===t.y})),h=0;return f.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=d.props.colors?d._createColors()(1):Jl(1,0,null===(n=d.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=oc(0,0,null===(i=d.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:d.props.colors?d._createColors()(v[0].x):Jl(h,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},d._onBarLeave=function(){},d._handleChartMouseLeave=function(){d._calloutAnchorPoint=null,d.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},d._onBarFocus=function(t,n,i){if((!1===d.state.isLegendSelected||d._isLegendHighlighted(t.legend))&&d._calloutAnchorPoint!==t){var e=d._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;d._refArray.forEach((function(e,u){n===u&&d.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:d.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},d._getScales=function(t,n,i){var e=d._longestBarPositiveTotalValue,r=d._longestBarNegativeTotalValue,o=[Math.min(d.X_ORIGIN,r),Math.max(d.X_ORIGIN,e)];if(i){var u=ri(d._points,(function(t){return t.y})),a=ei(d._points,(function(t){return t.y})),l=Math.max(u,d.props.yMaxValue||0),s=d.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Iu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f=Iu().domain([c,l]).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin])}}var f=ku().domain(d._yAxisLabels).range([t-(d.margins.bottom+d._domainMargin),d.margins.top+d._domainMargin]).padding(d._yAxisPadding);return{xBarScale:Iu().domain(o).nice().range([d.margins.left,n-d.margins.right]),yBarScale:f}},d._calculateAppropriateBarHeight=function(t,n,i){var e=Jv(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=ri(d._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},d._getDomainMarginsForHorizontalBarChart=function(t){d._domainMargin=8;var n=d._getUniqueYValues();d._yAxisPadding=1===d._yAxisPadding?.99:d._yAxisPadding;var i=d._yAxisPadding/(1-d._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(d.margins.top+8)-(d.margins.bottom+8);if(d._yAxisType!==Yl.StringAxis)d._barHeight=d.props.barHeight||d._calculateAppropriateBarHeight(n,r,d._yAxisPadding),d._barHeight=Math.max(d._barHeight,1),d._domainMargin+=d._barHeight/2;else{d._barHeight=d.props.barHeight||r/e;var u=e*d._barHeight;r>=u&&(d._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},d.margins),{top:d.margins.top+d._domainMargin,bottom:d.margins.bottom+d._domainMargin})},d._closeCallout=function(){d.setState({isCalloutVisible:!1})},d._getLegendData=function(t,n){var i=d.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?d.props.colors?d._createColors()(1):Jl(1,0,null===(e=d.props.theme)||void 0===e?void 0:e.isInverted):t.color;d.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(n,0,null===(u=d.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=oc(0,0,null===(a=d.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){d._handleChartMouseLeave(),d._onLegendHover(n)},onMouseOutAction:function(t){d._onLegendLeave(t)}};e.push(r)})),u.createElement(zd,(0,o.Cl)({legends:e,enabledWrapLines:d.props.enabledLegendsWrapLines,overflowProps:d.props.legendsOverflowProps,focusZonePropsInHoverCard:d.props.focusZonePropsForLegendsInHoverCard,overflowText:d.props.legendsOverflowText},d.props.legendProps,{onChange:d._onLegendSelectionChange.bind(d),ref:d._legendsRef}))},d._isLegendSelected=function(){return d.state.isLegendSelected},d._isLegendHighlighted=function(t){return d._getHighlightedLegend().includes(t)},d._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;d._xMax=Math.max(n[n.length-1],d.props.xMaxValue||0)}},d._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},d._getChartTitle=function(){var t=d.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},d._getOrderedYAxisLabels=function(){return d._yAxisType===Yl.StringAxis&&"default"!==d.props.yAxisCategoryOrder?$s(d._mapCategoryToValues(),d.props.yAxisCategoryOrder):(0,o.fX)([],d._points,!0).reverse().map((function(t){return t.y}))},d._mapCategoryToValues=function(){var t={};return d._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},lc(d),d.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},d._calloutId=p("callout"),d._refArray=[],d._xAxisType=d.props.data&&d.props.data.length>0?Ls(d.props.data[0].x,!0):jl.NumericAxis,d._yAxisType=d.props.data&&d.props.data.length>0?Ls(d.props.data[0].y,!1):Yl.StringAxis,d._cartesianChartRef=u.createRef(),d._legendsRef=u.createRef(),d._domainMargin=8,d._yAxisPadding=null!==(c=d.props.yAxisPadding)&&void 0!==c?c:.5,d}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(ri(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=xp(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(qf,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:zl.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:ls,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:cs,getMinMaxOfYAxis:ks,barwidth:this._barHeight,focusZoneDirection:Ys.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Iu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,d=void 0!==c&&c,f=(0,o.fX)([],r,!0);f.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=f.map((function(t,i){var e,r,o,c,f,w,C,M,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=xp(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=d?s.props.colors?s._createColors()(1):Jl(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):Jl(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!d?t.color:A;if(s.props.enableGradient){var V=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(V,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(f=t.gradient)||void 0===f?void 0:f[1])||oc(V,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],d&&(A=oc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[0],L=oc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[1]),s._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var O=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),T=O>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=O>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:O-(s._isRtl?E:T),height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(D,")"):A}))}));return w},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,d=0,f=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,C,M,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=xp(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=c?l.props.colors?l._createColors()(1):Jl(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):Jl(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var V=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||oc(V,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||oc(V,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=oc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[0],L=oc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[1]),l._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?d+=N:f+=N;var O=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),T=O>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=O>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-d:S+f:t.x>l.X_ORIGIN?S+d:S-f,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:O-(l._isRtl?E:T),height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(D,")"):A}))}));return b},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),Cp=(0,r.I)(wp,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function Mp(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var kp=(0,a.Z)(),Ap=u.forwardRef((function(t,n){var i,e=p("FunnelChartTooltipId_"),r=p("_FunnelChart_empty"),a=(0,l.jI)(),s=u.useState(null),c=s[0],d=s[1],f=u.useState(!1),v=f[0],h=f[1],g=u.useState(null),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],C=u.useState([]),M=C[0],k=C[1],A=u.useRef(null),S=u.useRef(null),L=_(t.data);function V(t,n){null==n||n.persist(),d(t.stage),m(t),h(!0),w(n.currentTarget)}function D(t,n,i){null==i||i.persist(),d(n.category),m({stage:t,value:n.value,color:n.color,category:n.category}),h(!0),w(i.currentTarget)}function N(){d(null),h(!1),m(null),w(null)}u.useEffect((function(){var n;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&k(t.legendProps.selectedLegends)}),[null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:null!=A?A:null,toImage:function(t){var n;return Bd(A.current,null===(n=S.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[]);var O=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?k(n):k(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]);function T(){return M.length>0?M:c?[c]:[]}function E(t){return T().includes(t)}function F(){return 0===T().length}function B(n,i){return"subValue"in n?{culture:t.culture,onMouseOver:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onMouseMove:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onFocus:function(t){return i=n.stage,e=n.subValue,null==(r=t)||r.persist(),m({stage:i,value:e.value,color:e.color,category:e.category}),h(!0),void w(r.currentTarget);var i,e,r},onBlur:function(){return N()},onMouseOut:function(){return N()}}:{culture:t.culture,onMouseOver:1===i?function(t){return V(n,t)}:void 0,onMouseMove:1===i?function(t){return V(n,t)}:void 0,onFocus:function(t){return function(t,n){null==n||n.persist(),m(t),h(!0),w(n.currentTarget)}(n,t)},onBlur:function(){return N()},onMouseOut:function(){return N()}}}function P(n){var i=n.key,e=n.pathD,r=n.fill,l=n.opacity,s=n.textProps,c=n.data,d=n.isFocusable,f=B(c,l),v=zs(r,t.theme);return u.createElement("g",{key:i},u.createElement("path",(0,o.Cl)({d:e,fill:r,opacity:l},f,{"data-is-focusable":d})),s&&u.createElement("g",(0,o.Cl)({},f),function(n){var i=n.show,e=n.x,r=n.y,o=n.value,l=n.textColor;if(!i)return null;var s=u.createElement("text",{x:a?z-e:e,y:r,textAnchor:"middle",alignmentBaseline:"middle",fill:l},(0,_n.c$)(o.toString(),t.culture));return a?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-z,",0)")},s):s}((0,o.Cl)((0,o.Cl)({},s),{textColor:v}))))}function _(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function H(n,i,e,r,u){var a=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),l="vertical"===t.orientation?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],d=o[e+1]||{subValues:[]},f=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/f*(f/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,C=x?x.value:0,M=w/f*(f/a)*l,k=(C/v||0)*(v/a)*l,A=(l-f/a*l)/2+h,S=A+M,L=(l-v/a*l)/2+p,V=L+k,D=(A+S+L+V)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?M*(1-(O-e*s)/s):Math.min(M,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(V,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:D,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,d=o[e],f=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=d.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,C=d.subValues[r],M=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===C.category})),k=C.value,A=M?M.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,V=e*c,D=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=V+.25*(D-V),x=(N+O)/2,w=.5*(D-V)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(V+D)/2,x=(N+O+T+E)/4,w=.9*Math.abs(D-V),(S+L)/2<20&&(w=0)),{pathD:"M".concat(V,",").concat(N,"\n L").concat(D,",").concat(T,"\n L").concat(D,",").concat(E,"\n L").concat(V,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})),s=B({stage:n.stage,subValue:i}),c=Mp((0,o.Cl)({availableWidth:l.availableWidth,minTextWidth:16,textX:l.textX,textY:l.textY,value:i.value},s));return P({key:"".concat(e,"-").concat(r),pathD:l.pathD,fill:i.color,opacity:_(t.data)&&E(i.category)||F()?1:.1,textProps:c,data:{stage:n.stage,subValue:i},isFocusable:!!(_(t.data)&&E(i.category)||F())})}var I=(0,o.Cl)({isCalloutVisible:v,directionalHint:3,id:"toolTip".concat(e),target:x,color:null==y?void 0:y.color,XValue:null==y?void 0:y.stage,YValue:null==y?void 0:y.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){h(!1)},preventDismissOnLostFocus:!0},t.calloutProps),W=t.width||350,R=t.height||500,$=kp(t.styles,{theme:t.theme,className:t.className,chartWidth:W,chartHeight:R}),z=.8*W,j=(W-z)/2;return t.data&&t.data.length>0?u.createElement("div",{ref:A,className:$.root},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("svg",{width:W,height:R,className:$.chart,role:"img","aria-label":t.chartTitle},u.createElement("g",{transform:a?"translate(".concat(j+z,", ").concat(40,") scale(-1,1)"):"translate(".concat(j,", ").concat(40,")")},L?function(n,i){for(var e,r,o=t.data,u=o.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),l=[],s={stages:o,totals:u,maxTotal:Math.max.apply(Math,u),funnelWidth:i,funnelHeight:.8*n,isRTL:a},c=0;c<o.length;c++)for(var d=o[c],f=0;f<(null!==(e=d.subValues)&&void 0!==e?e:[]).length;f++){var v=null===(r=d.subValues)||void 0===r?void 0:r[f];v&&l.push(H(d,v,c,f,s))}return l}(R-40,z):function(n,i){var e=t.data,r=i,u=.8*n;return e.map((function(n,i){var l="vertical"===t.orientation?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,d=(r-s)/2,f=o?r-c:c,v=o?r-d:d,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(f,",").concat(i*u,"\n L").concat(r-f,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,d=(u-s)/2,f=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(d,"\n L").concat(h,",").concat(f,"\n L").concat(h,",").concat(u-f,"\n L").concat(v,",").concat(u-d,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}),s=l.pathD,c=l.textX,d=l.textY,f=l.availableWidth,v=B(n),h=Mp((0,o.Cl)({availableWidth:f,minTextWidth:16,textX:c,textY:d,value:n.value},v));return P({key:i,pathD:s,fill:n.color,opacity:E(n.stage)||F()?1:.1,textProps:h,data:n,isFocusable:!(!E(n.stage)&&!F())})}))}(R-40,z)),v&&u.createElement(Pn,(0,o.Cl)({},I),u.createElement(Js.ChartHoverCard,{XValue:null==I?void 0:I.XValue,YValue:null==I?void 0:I.YValue,color:null==I?void 0:I.color})))),function(){if(t.hideLegend)return u.createElement(u.Fragment,null);var n;if(L){var i={};t.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in i||(i[t.category]=t.color)}))})),n=Object.entries(i).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return d(n)},onMouseOutAction:function(){return d(null)}}}))}else n=t.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return d(t.stage)},onMouseOutAction:function(){return d(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(zd,(0,o.Cl)({ref:S,legends:n,centerLegends:!0,onChange:O},t.legendProps)))}()):u.createElement("div",{id:r,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Ap.displayName="FunnelChart",Ap.defaultProps={orientation:"vertical"};var Sp,Lp,Vp=(0,r.I)(Ap,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(Sp||(Sp={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(Lp||(Lp={}));var Dp=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],Np=(0,a.Z)(),Op=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===Lp.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===Lp.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Tp=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===Sp.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===Sp.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},Ep=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Bd(e._rootElem,null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=Dp.length-1;t>=0;t-=1)if(e._outerRadius>=Dp[t].minRadius)return{arcWidth:Dp[t].arcWidth,chartValueSize:Dp[t].fontSize};return{arcWidth:Dp[0].arcWidth,chartValueSize:Dp[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?Ql(t.color,o.isInverted):Jl(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:oc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=wf().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,d=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:d}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+Tp(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||oc(n,0,e.props.theme.isInverted)[0]:t.color||Jl(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(zd,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+Tp(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Op(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=nl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},Ds(t.xAxisCalloutAccessibilityData,"text",!1)),(0,_n.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},Ds(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},lc(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=Np(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},u.createElement(Dc,{direction:Ys.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},Ns(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},Ns(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=Np(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},Ds((0,o.Cl)({ariaLabel:Op(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement($f,{content:Tp(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement($f,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement(Pn,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=Np(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,_n.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,_n.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,_n.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(Fd,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:As[t.index%Object.keys(Vs).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,_n.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),Fp=(0,r.I)(Ep,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,d=t.chartValueSize,f=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},f],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:d,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),Bp=i(927),Pp=u.createContext(void 0),_p=Array.prototype,Hp=_p.slice;function Ip(t){return()=>t}function Wp(t){return t}function Rp(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function $p(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function zp(t,n){this._context=t,this._k=(1-n)/6}_p.map,zp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:$p(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:$p(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var jp=function t(n){function i(t){return new zp(t,n)}return i.tension=function(n){return t(+n)},i}(0),Yp=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],Xp=[Xl.color1,Xl.warning,Xl.color8,Xl.color4,Xl.color7,Xl.color6,Xl.color2,Xl.color5,Xl.color9,Xl.color10];function Gp(t,n,i){if("plotly"!==n)return t;var e=Yp.indexOf(t.toLowerCase());return-1!==e?Ql(Xp[e],i):t}var qp=function(t,n,i){if(!n.current.has(t)){var e;return e=n.current.size<Xp.length?Ql(Xp[n.current.size],i):Jl(n.current.size,0,i),n.current.set(t,e),e}return n.current.get(t)},Up=function(t,n,i,e,r){return"default"===n&&i?function(t,n,i,e){var r=[];if(n){var o=function(t){return Ol(t)&&Bs(null==t?void 0:t.map((function(t){return t.toLowerCase()})),Yp)?"plotly":"others"}(t);if(Ol(n))n.forEach((function(t,n){var u=null==t?void 0:t.toString().trim(),a=qp("Label_".concat(n),i,e);if(u){var l=Ao(u);r.push(l?Gp(l.formatHex(),o,e):a)}else r.push(a)}));else if("string"==typeof n){var u=Ao(n);return u?Gp(u.formatHex(),o,e):qp("Label_0",i,e)}return r}}(t,i,e,r):void 0},Zp=function(t,n,i,e,r){return t&&Ol(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:qp(i,e,r)},Kp=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Ol(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},Jp=function(t,n,i){var e,r,o,u,a,l,s,c,d,f,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Ol(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(f=null===(d=null==t?void 0:t.coloraxis)||void 0===d?void 0:d.cmin)&&void 0!==f?f:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Iu().domain(x).range(w)}return i},Qp="nonplot_",tg="repeat(1, 1fr)",ng={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function ig(t){var n,i,e,r,o,u,a,l,s,c,d,f;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(f=null===(d=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===d?void 0:d.text)&&void 0!==f?f:""}}var eg=function(t,n){var i=ag(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},rg=function(t,n){var i=ug(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:Bu(null==i?void 0:i.tickformat)}:{}},og=function(t,n){var i,e=null===(i=ug(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},ug=function(t,n){return null==n?void 0:n.yaxis},ag=function(t,n){return null==n?void 0:n.xaxis},lg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,_n.c$)(t)},sg=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return wl(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},cg=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},dg=function(t,n,i,e){var r,o,u,a,l,s,c=!1;return t.forEach((function(t){if(cg(t,n)){c=!0;var i=t.y;i&&(l=Math.min.apply(Math,i),s=Math.max.apply(Math,i))}})),c?("number"==typeof l&&"number"==typeof i&&(l=Math.min(l,i)),"number"==typeof s&&"number"==typeof e&&(s=Math.max(s,e)),(null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.range)&&(l=n.yaxis2.range[0],s=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(o=null==n?void 0:n.yaxis2)||void 0===o?void 0:o.title)?n.yaxis2.title:"string"==typeof(null===(a=null===(u=null==n?void 0:n.yaxis2)||void 0===u?void 0:u.title)||void 0===a?void 0:a.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:l,yMaxValue:s}}):{}},fg=function(t,n,i,e,r){var o=Up(t,n,i,e,r);return Zp(o,0,"",e,r)},vg=function(t,n,i,e,r){return null==t?"":n?t.toString():i?e?new Date(t):r?parseFloat(t):t:t},hg=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,hg(o,r))}return i},pg=function(t,n,i,e,r,u){var a,l,s,c,d={},f=0,v=0,h=dg(t.data,t.layout),p=Vg(t.data,t.layout,n),g=p.legends,y=p.hideLegend,m=void 0,b=rg(t.data[0],t.layout);t.data.forEach((function(n,a){var l,s,c,h,p,y,x,w;m=Jp(t.layout,n,m);var C=Sl(n.x),M=Up(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(h=n.marker)||void 0===h?void 0:h.color,i,r),k=Up(null===(x=null===(y=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===y?void 0:y.layout)||void 0===x?void 0:x.colorway,e,null===(w=n.line)||void 0===w?void 0:w.color,i,r),A=n.x,S=Ml(A),L=Ll(A),V=kl(A),D=Ng(n);D.forEach((function(e,l){var s=e[0],c=e[1],h=n.x.slice(s,c),p=n.y.slice(s,c);h.forEach((function(e,s){var c,h,y,x,w,A;d[e]||(d[e]={xAxisPoint:vg(e,C,L,S,V),chartData:[],lineData:[]});var N=g[a],O=m?m(Ol(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(y=null===(h=n.marker)||void 0===h?void 0:h.color)||void 0===y?void 0:y[s%(null===(x=n.marker)||void 0===x?void 0:x.color).length]:0):Zp(M,s,N,i,r),T=Kp(n,s),E=p[s],F=lg(E,b);if("bar"===n.type)d[e].chartData.push({legend:N,data:E,color:null!==(w=Vo(O).copy({opacity:T}).formatHex8())&&void 0!==w?w:O,yAxisCalloutData:F}),"number"==typeof E&&(f=Math.max(f,E));else if("scatter"===n.type||u){var B=Zp(k,a,N,i,r),P=mg(n.line),_=Lg(n);d[e].lineData.push({legend:N+(D.length>1?".".concat(l+1):""),legendShape:_,y:E,color:null!==(A=Vo(B).copy({opacity:T}).formatHex8())&&void 0!==A?A:O,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=P?P:{}),{mode:n.mode}),useSecondaryYScale:cg(n,t.layout),yAxisCalloutData:F}),cg(n,t.layout)||"number"!=typeof E||(f=Math.max(f,E),v=Math.min(v,E))}}))}))}));var x=Object.values(d);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:x,width:null===(a=t.layout)||void 0===a?void 0:a.width,height:null!==(s=null===(l=t.layout)||void 0===l?void 0:l.height)&&void 0!==s?s:350,barWidth:"auto",yMaxValue:f,yMinValue:v,mode:"plotly"},h),{hideTickOverlap:!0,hideLegend:y,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(c=x[0])||void 0===c?void 0:c.xAxisPoint)}),ig(t.layout)),Eg(t.data,t.layout)),og(t.data[0],t.layout)),eg(t.data[0],t.layout)),b),Bg(t.data,t.layout))},gg=function(t,n,i,e,r,u){var a,l,s,c,d=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),f="area"===i,v="scatter"===i,h=dg(t.data,t.layout,f?0:void 0,f?0:void 0),p="tonexty",g=Vg(t.data,t.layout,n),y=g.legends,m=g.hideLegend,b=rg(t.data[0],t.layout),x=t.data.map((function(n,i){var a,l,s,c,f,v,h,g,m=d?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,x=Up(null===(h=null===(v=null===(f=t.layout)||void 0===f?void 0:f.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r,m,e,u),w=n.x,C=Ll(w),M=Ml(w),k=kl(w),A=Sl(n.x),S=y[i],L=Zp(x,i,S,e,u),V=Kp(n,i);p="tozeroy"===n.fill?"tozeroy":"tonexty";var D=(null===(g=n.mode)||void 0===g?void 0:g.includes("text"))||"scatterpolar"===n.type?void 0:mg(n.line),N=Lg(n);return Ng(n).map((function(i,e){var r,u,a,l,s,c,d,f,v,h=i[0],p=i[1],g=w.slice(h,p),y=n.y.slice(h,p),m=Ol(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(h,p):[],x=Array.isArray(n.text)?n.text.slice(h,p):void 0;return{legend:S,legendShape:N,data:g.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({x:vg(t,A,C,M,k),y:y[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:m[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),x?{text:x[i]}:{}),{yAxisCalloutData:lg(y[i],b)})})),color:null!==(u=Vo(L).copy({opacity:V}).formatHex8())&&void 0!==u?u:L,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=D?D:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(a=t.layout)||void 0===a?void 0:a.__polarOriginX,direction:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.polar)||void 0===s?void 0:s.angularaxis)||void 0===c?void 0:c.direction,rotation:null===(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.polar)||void 0===f?void 0:f.angularaxis)||void 0===v?void 0:v.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{}}:{}),useSecondaryYScale:cg(n,t.layout)}}))})).flat(),w=og(t.data[0],t.layout);if(void 0===w.yMinValue&&void 0===w.yMaxValue){var C=Cs(x);w.yMinValue=C.startValue,w.yMaxValue=C.endValue}var M=x.reduce((function(t,n){return t+n.data.length}),0),k={lineChartData:x},A={scatterChartData:x},S=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},h),{width:null===(l=t.layout)||void 0===l?void 0:l.width,height:null!==(c=null===(s=t.layout)||void 0===s?void 0:s.height)&&void 0!==c?c:350,hideTickOverlap:!0,hideLegend:m,useUTC:!1,optimizeLargeData:M>1e3}),ig(t.layout)),eg(t.data[0],t.layout)),b),Pg(t.data,t.layout));return f?(0,o.Cl)({data:k,mode:p},S):(0,o.Cl)((0,o.Cl)({data:v?A:k,roundedTicks:!0,enableReflow:!1},S),w)},yg=function(t){return t.replace(/&lt;[^&]*?&gt;/g,"").replace(/<[^>]*>/g,"").replace(/&lt;br&gt;|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function mg(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),ng[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=jp.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var bg=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},xg=function(t){return t.x1-t.x0},wg=function(t){return(t.x1+t.x0)/2},Cg=function(t,n,i,e){if(!t||0===t.length)return[];if(Ll(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return mu(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Iu().domain(fp(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var d=function(){var t=Wp,n=fp,i=Rp;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],d=s[1],f=i(l,c,d);if(!Array.isArray(f)){const t=d,i=+f;if(n===fp&&([c,d]=ii(c,d,i)),(f=Qn(c,d,i))[0]<=c&&(u=ti(c,d,i)),f[f.length-1]>=d)if(t>=d&&n===fp){const t=ti(c,d,i);isFinite(t)&&(t>0?d=(Math.floor(d/t)+1)*t:t<0&&(d=(Math.ceil(d*-t)+1)/-t))}else f.pop()}for(var v=f.length,h=0,p=v;f[h]<=c;)++h;for(;f[p-1]>d;)--p;(h||p<v)&&(f=f.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<v?f[r]:d;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=d){const t=Math.floor((c-o)*u);y[Math.min(v,t+(f[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=d&&y[oo(f,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:Ip(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:Ip([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:Ip(Array.isArray(t)?Hp.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var f=[],v=Math.max(Ag(s),Ag(e)),h=Sg(s,v);h<Sg(c+e,v);)f.push(h),h=Sg(h+e,v);return s=f[0],c=f[f.length-1],d.domain([s,c]).thresholds(f),d(t).slice(0,-1)}return d(t)},Mg=function(t,n){var i,e;switch(t){case"sum":return oi(n);case"avg":return 0===n.length?0:oi(n)/n.length;case"min":return null!==(i=ei(n))&&void 0!==i?i:0;case"max":return null!==(e=ri(n))&&void 0!==e?e:0;default:return n.length}},kg=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},Ag=function(t){var n,i;return null!==(i=null===(n=t.toString().split(".")[1])||void 0===n?void 0:n.length)&&void 0!==i?i:0},Sg=function(t,n){var i=Math.pow(10,n);return Math.round(t*i)/i},Lg=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},Vg=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},Dg=function(t,n){if(Ol(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Ng=function(t){if(!Ol(t.x)||!Ol(t.y))return[];for(var n=[],i=0,e=0;e<t.x.length;e++)(Dl(t.x[e])||Dl(t.y[e]))&&(e-i>0&&n.push([i,e]),i=e+1);return e-i>0&&n.push([i,e]),n},Og=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Tg=function(t){return["donut","sankey","pie"].includes(t)},Eg=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){Dl(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||Ll(a)&&!kl(a)&&!Ml(a))if(!(Ol(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]=r.categoryarray;else i[u]="data"})),i},Fg=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Bg=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=ri(t.map((function(t){return"bar"!==t.type||!Ol(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Pg=function(t,n){var i,e={},r=new Set;t.forEach((function(t){var n=Hl(t);i=n.x,r.add(n.y)}));var o=function(t,i){var e,r=Il(t,i);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)};"number"==typeof i&&o("x",i)&&(e.xScaleType="log");var u=Array.from(r).sort();return u.length>0&&o("y",u[0])&&(e.yScaleType="log"),u.length>1&&o("y",u[1])&&(e.secondaryYScaleType="log"),e},_g=function(t){var n,i,e=u.useRef(null),r=u.useRef(),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var d=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,d={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),d),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),d)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},d)};function Hg(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,d=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(_g,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},d)))}}var Ig=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,d=t.maxBarHeight,f=void 0===d?24:d,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),C=u.useRef({}),M=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),V=L[0],D=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],$=u.useState(""),z=$[0],j=$[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],q=u.useState(),U=q[0],Z=q[1];u.useEffect((function(){var t,n,i;Bs(null===(t=M.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),M.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Bd(null===(n=b.current)||void 0===n?void 0:n.chartContainer,null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var K=u.useMemo((function(){var t,n;C.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!C.current[l]){var s=t.color?Ql(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):Jl(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var d=oc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||d[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||d[1]}C.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var f=C.current[l],h=f.startColor,g=f.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?Ls(K[0].x.start,!0):jl.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Ls(K[0].y,!1):Yl.StringAxis}),[K]),tt=u.useMemo((function(){return Ts(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===jl.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=as(i.x.start,a),r=as(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,_n.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==Yl.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():$s(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a,l){var s=[];t.forEach((function(t){s.push(t.x.start,t.x.end)}));var c=ei(s)||0,d=ri(s)||0;return{dStartValue:r?d:c,dEndValue:r?c:d,rStartValue:n.left+(r?0:l),rEndValue:i-n.right-(r?l:0)}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===jl.DateAxis?(n=(0,_n.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,_n.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(U,(function(t){return t?u.createElement(Js.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,U,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),dt=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),ft=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(ft()||dt(n.legend))&&m.current!==n&&(m.current=n,B(t),D(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),j(n.xAxisCalloutData||at(n)),Z(n))}),[at,dt,ft]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),D(!1),H(""),S(""),R(""),j(""),Z(void 0)}),[]),mt=u.useCallback((function(){D(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof f&&(n=Math.min(n,f)),Math.max(n,1)}),[f,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=C.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(C.current).forEach((function(t,n){var i=C.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===Yl.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=ft()||dt(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.abs(l-a),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,dt,ft,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Ct=u.useCallback((function(t){T(t)}),[]),Mt=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(C.current).forEach((function(n){var i={title:n,color:C.current[n].startColor,hoverAction:function(){yt(),Ct(n)},onMouseOutAction:function(){Mt()}};t.push(i)})),u.createElement(zd,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Ct,Mt,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Vt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==Yl.StringAxis&&(h.current=bt(Qv(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Dt=(0,o.Cl)({isCalloutVisible:V,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:z,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(qf,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:zl.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Dt,tickParams:Nt,legendBars:At(),createYAxis:ls,getDomainNRangeValues:ot,createStringYAxis:cs,getMinMaxOfYAxis:ks,focusZoneDirection:Ys.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));Ig.displayName="GanttChart";var Wg=(0,r.I)(Ig,(function(t){return{}})),Rg=Hg(_f),$g=Hg(sh),zg=Hg(pv),jg=Hg(Cp),Yg=Hg(Bv),Xg=Hg(qh),Gg=Hg(Fp),qg=Hg(vh),Ug=Hg(uh),Zg=Hg(mv),Kg=Hg(bp),Jg=Hg(Wg),Qg="fallback",ty=function(t){var n=t.data[0].x,i=Al(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:sg(t.x)})}))),{data:e,layout:t.layout}},ny={donut:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g,y,m,b,x=t.data[0],w=Up(null!==(u=null===(o=t.layout)||void 0===o?void 0:o.piecolorway)&&void 0!==u?u:null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null!==(d=null===(c=t.layout)||void 0===c?void 0:c.piecolorway)&&void 0!==d?d:null===(f=null==x?void 0:x.marker)||void 0===f?void 0:f.colors,i,r),C={};null===(v=x.labels)||void 0===v||v.forEach((function(t,n){var e=Dg(x.values,n);if(!(Dl(e)||e<0)){var o="".concat(t),u=Zp(w,n,o,i,r);C[o]?C[o].data+=e:C[o]={legend:o,data:e,color:u}}}));var M=null!==(p=null===(h=t.layout)||void 0===h?void 0:h.width)&&void 0!==p?p:440,k=null!==(y=null===(g=t.layout)||void 0===g?void 0:g.height)&&void 0!==y?y:220,A=!!x.textinfo&&!["value","percent","label+percent"].includes(x.textinfo),S=A?0:80,L=40+(A?0:40),V=x.hole?x.hole*(Math.min(M-S,k-L)/2):1;return{data:{chartTitle:ig(t.layout).chartTitle,chartData:Object.values(C)},hideLegend:n||!1===(null===(m=t.layout)||void 0===m?void 0:m.showlegend),width:null===(b=t.layout)||void 0===b?void 0:b.width,height:k,innerRadius:V,hideLabels:A,showLabelsInPercent:!x.textinfo||["percent","label+percent"].includes(x.textinfo),roundCorners:!0}},renderer:Rg},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return Dl(t)||Dl(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||Dl(null===(e=null==m?void 0:m.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==m?void 0:m.source[n],target:null==m?void 0:m.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),w=Up(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==b?void 0:b.color,i,r),C={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(t,n){return{nodeId:n,name:t,color:Zp(w,n,t,i,r)}})),links:x.map((function(t,n){return(0,o.Cl)({},t)}))},M={root:(0,o.Cl)({},(null===(f=null===(d=t.layout)||void 0===d?void 0:d.font)||void 0===f?void 0:f.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:ig(t.layout).chartTitle,SankeyChartData:C},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:M,enableReflow:!1}},renderer:Xg},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,C,M,k=t.data[0],A=null!==(a=null===(u=k.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],S=k.cells&&Object.keys(k.cells).length>0?k.cells:null===(f=null===(d=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===d?void 0:d[0])||void 0===f?void 0:f.cells,L=A[0].map((function(t,n){return A.map((function(t,i){var e,r,u,a,l,s,c,d,f=t[n],v="string"==typeof f?yg(f):f,h="string"==typeof v||"number"==typeof v?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=Bu(e)(t)}catch(n){u=Ns(t)}else u=Ns(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(v,i,S):v,p=null===(e=null==S?void 0:S.font)||void 0===e?void 0:e.color;if(Array.isArray(p)){var g=null!==(r=p[i])&&void 0!==r?r:p[0];d="string"==typeof(w=Array.isArray(g)?g[n]:g)?w:void 0}else"string"==typeof p&&(d=p);var y,m=null===(u=null==S?void 0:S.font)||void 0===u?void 0:u.size;if(Array.isArray(m)){g=null!==(a=m[i])&&void 0!==a?a:m[0];var b=Array.isArray(g)?g[n]:g;y="number"==typeof b?b:void 0}else"number"==typeof m&&(y=m);var x,w,C=i>=1?1:0,M=null===(l=null==S?void 0:S.fill)||void 0===l?void 0:l.color;Array.isArray(M)?(g=null!==(s=M[C])&&void 0!==s?s:M[0],x="string"==typeof(w=Array.isArray(g)?g[n]:g)?w:void 0):"string"==typeof M&&(x=M);var k=Array.isArray(null==S?void 0:S.align)?null!==(c=S.align[i])&&void 0!==c?c:S.align[0]:null==S?void 0:S.align;return{value:h,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},d?{color:d}:{}),"number"==typeof y?{fontSize:y}:{}),x?{backgroundColor:x}:{}),k?{textAlign:k}:{})}}))})),V={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})};return{headers:(C=null!==(g=null===(p=k.header)||void 0===p?void 0:p.values)&&void 0!==g?g:[],M=k.header&&Object.keys(k.header).length>0?k.header:null===(b=null===(m=null===(y=t.layout)||void 0===y?void 0:y.template)||void 0===m?void 0:m.data)||void 0===b?void 0:b.table[0].header,(Array.isArray(C[0])?C.map((function(t){return t.map((function(t){return yg(t)})).filter(Boolean).join(" ")})):C.map((function(t){return yg(t)}))).map((function(t,n){var i,e,r,u,a,l,s,c,d,f=null===(i=null==M?void 0:M.font)||void 0===i?void 0:i.color;if(Array.isArray(f)){var v=null!==(e=f[n])&&void 0!==e?e:f[0];Array.isArray(v)?d="string"==typeof v[0]?v[0]:void 0:"string"==typeof v&&(d=v)}else"string"==typeof f&&(d=f);var h,p=null===(r=null==M?void 0:M.font)||void 0===r?void 0:r.size;if(Array.isArray(p)){var g=null!==(u=p[n])&&void 0!==u?u:p[0];h=Array.isArray(p[0])?null!==(a=p[0][n])&&void 0!==a?a:p[0][0]:"number"==typeof g?g:void 0}else"number"==typeof p&&(h=p);var y=n>=1?1:0,m=null===(l=null==M?void 0:M.fill)||void 0===l?void 0:l.color,b=Array.isArray(m)?null!==(s=m[y])&&void 0!==s?s:m[0]:m,x=null==M?void 0:M.align,w=Array.isArray(x)?null!==(c=x[n])&&void 0!==c?c:x[0]:x;return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof d?{color:d}:{}),"number"==typeof h?{fontSize:h}:{}),"string"==typeof b?{backgroundColor:b}:{}),w?{textAlign:w}:{})}}))),rows:L,width:null===(x=t.layout)||void 0===x?void 0:x.width,height:null===(w=t.layout)||void 0===w?void 0:w.height,styles:V}},renderer:Kg},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,C=Vg(t.data,t.layout,n),M=C.legends,k=C.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=Jp(t.layout,n,A);var c=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),d=M[o];return n.y.map((function(t,e){var o,u,a,l,s,f;if(Dl(null===(o=n.x)||void 0===o?void 0:o[e])||Dl(t))return null;var v=A?A(Ol(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):Zp(c,e,d,i,r),h=Kp(n,e);return{x:n.x[e],y:t,legend:d,color:null!==(f=Vo(v).copy({opacity:h}).formatHex8())&&void 0!==f?f:v}})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,V=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(f=null===(d=t.layout)||void 0===d?void 0:d.margin)||void 0===f?void 0:f.pad)&&void 0!==v?v:0),D=new Set(S.map((function(t){return t.y}))).size||1,N=V/(D*(1+1/(1+.01*D)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0},ig(t.layout)),Eg(t.data,t.layout)),Bg(t.data,t.layout,!0))},renderer:jg},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Vl(t.y)}))){var d=t.data.map((function(t,n){return"bar"===t.type&&Vl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=hg(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&xl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&xl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&xl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();c=(0,o.Cl)((0,o.Cl)({},t),{data:d})}var f={},v=dg(c.data,c.layout,0,0),h=Vg(c.data,c.layout,n),p=h.legends,g=h.hideLegend,y=void 0,m=rg(c.data[0],c.layout);c.data.forEach((function(t,n){var o,u,a,l,s;y=Jp(c.layout,t,y);var d=Up(null===(a=null===(u=null===(o=c.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,e,null===(l=t.marker)||void 0===l?void 0:l.color,i,r);null===(s=t.x)||void 0===s||s.forEach((function(e,o){var u,a,l,s,v,h;if(!Dl(e)&&!Dl(null===(u=t.y)||void 0===u?void 0:u[o])&&(f[e]||(f[e]={name:e.toString(),series:[]}),"bar"===t.type)){var g=p[n],b=y?y(Ol(null===(a=t.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=t.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[o%(null===(v=t.marker)||void 0===v?void 0:v.color).length]:0):Zp(d,o,g,i,r),x=Kp(t,o),w=t.y[o];f[e].series.push({key:g,data:w,xAxisCalloutData:e,color:null!==(h=Vo(b).copy({opacity:x}).formatHex8())&&void 0!==h?h:b,legend:g,useSecondaryYScale:cg(t,c.layout),yAxisCalloutData:lg(w,m)})}}))}));var b=Object.values(f);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:b,width:null===(u=c.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=c.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},v),{hideTickOverlap:!0,hideLegend:g,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=b[0])||void 0===s?void 0:s.name)}),ig(c.layout)),Eg(c.data,c.layout)),og(c.data[0],c.layout)),eg(c.data[0],c.layout)),m),Bg(c.data,c.layout))},renderer:qg},verticalstackedbar:{transformer:pg,renderer:$g},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I=t.data[0],W=[],R=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var z=[],j=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e=Dg(I.z,n);Dl(t)||Dl(null===(i=I.y)||void 0===i?void 0:i[n])||Dl(e)||(z.push(t),j.push(I.y[n]),Y.push(e))}));var X=Ll(z),G=Ll(j),q=Cg(z,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),U=Cg(j,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(d=I.ybins)||void 0===d?void 0:d.end,null===(f=I.ybins)||void 0===f?void 0:f.size),Z=U.map((function(){return q.map((function(){return[]}))})),K=0;z.forEach((function(t,n){var i=bg(q,t,X),e=bg(U,j[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=Mg(I.histfunc,t);return K+=n,n}))}));q.forEach((function(t,n){U.forEach((function(i,e){var r=kg(I.histnorm,J[e][n],K,X?t.length:xg(t),G?i.length:xg(i));W.push({x:X?t.join(", "):wg(t),y:G?i.join(", "):wg(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),$=Math.max($,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,d=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:d,rectText:d}),"number"==typeof d&&(R=Math.min(R,d),$=Math.max($,d))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,($+R)/2,$],nt=[Ql(Xl.color1),Ql(Xl.color2),Ql(Xl.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(M=null===(C=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===C?void 0:C.layout)||void 0===M?void 0:M.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(D=null===(V=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===V?void 0:V[0])||void 0===D?void 0:D.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(T=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===T?void 0:T.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=$<=0;R<0&&$>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*($-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},ig(t.layout)),Eg([I],t.layout))},renderer:yh},gauge:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,d,f,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,$,z,j,Y,X,G,q,U,Z,K,J,Q,tt,nt,it,et=t.data[0],rt=(null===(o=et.gauge)||void 0===o?void 0:o.steps)?et.gauge.steps.map((function(t){return t.color})):void 0,ot=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,rt,i,r),ut=(null===(c=null===(s=et.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?et.gauge.steps.map((function(t,n){var e,o,u=t.name||"Segment ".concat(n+1),a=Zp(ot,n,u,i,r);return{legend:u,size:(null===(e=t.range)||void 0===e?void 0:e[1])-(null===(o=t.range)||void 0===o?void 0:o[0]),color:a}})):[{legend:"Current",size:null!==(d=et.value)&&void 0!==d?d:0-(null!==(p=null===(h=null===(v=null===(f=et.gauge)||void 0===f?void 0:f.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:fg(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=et.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(M=null===(C=null===(w=et.gauge)||void 0===w?void 0:w.axis)||void 0===C?void 0:C.range)||void 0===M?void 0:M[1])&&void 0!==k?k:100)-(null!==(A=et.value)&&void 0!==A?A:0),color:Xl.disabled}];if(null===(S=et.delta)||void 0===S?void 0:S.reference){var at=et.value-et.delta.reference;if(at>=0){nt="▲ ".concat(at);var lt=Up(null===(D=null===(V=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===V?void 0:V.layout)||void 0===D?void 0:D.colorway,e,null===(O=null===(N=et.delta)||void 0===N?void 0:N.increasing)||void 0===O?void 0:O.color,i,r);it=Zp(lt,0,"",i,r)}else{nt="▼ ".concat(Math.abs(at));var st=Up(null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,e,null===(P=null===(B=et.delta)||void 0===B?void 0:B.decreasing)||void 0===P?void 0:P.color,i,r);it=Zp(st,0,"",i,r)}}var ct={sublabel:{fill:it}},dt=ig(t.layout).chartTitle;return{segments:ut,chartValue:null!==(_=et.value)&&void 0!==_?_:0,chartTitle:dt,sublabel:nt,minValue:"number"==typeof(null===(W=null===(I=null===(H=et.gauge)||void 0===H?void 0:H.axis)||void 0===I?void 0:I.range)||void 0===W?void 0:W[0])?null===(z=null===($=null===(R=et.gauge)||void 0===R?void 0:R.axis)||void 0===$?void 0:$.range)||void 0===z?void 0:z[0]:void 0,maxValue:"number"==typeof(null===(X=null===(Y=null===(j=et.gauge)||void 0===j?void 0:j.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[1])?null===(U=null===(q=null===(G=et.gauge)||void 0===G?void 0:G.axis)||void 0===q?void 0:q.range)||void 0===U?void 0:U[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=et.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(Z=t.layout)||void 0===Z?void 0:Z.width,height:null!==(J=null===(K=t.layout)||void 0===K?void 0:K.height)&&void 0!==J?J:220,styles:ct,variant:(null===(tt=null===(Q=et.gauge)||void 0===Q?void 0:Q.steps)||void 0===tt?void 0:tt.length)?Lp.MultipleSegments:Lp.SingleSegment,roundCorners:!0}},renderer:Gg},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],d=Vg(t.data,t.layout,n),f=d.legends,v=d.hideLegend,h=void 0;return t.data.forEach((function(n,u){var a,l,s,d,v,p,g;if(n.x){h=Jp(t.layout,n,h);var y=Up(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(d=n.marker)||void 0===d?void 0:d.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e=Dg(n.y,i);Dl(t)||Dl(e)||(m.push(t),b.push(e))}));var x=Ll(m),w=Cg(m,null===(v=n.xbins)||void 0===v?void 0:v.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),C=w.map((function(){return[]})),M=0;m.forEach((function(t,n){var i=bg(w,t,x);-1!==i&&C[i].push(b[n])}));var k=C.map((function(t){var i=Mg(n.histfunc,t);return M+=i,i}));w.forEach((function(t,e){var a,l,s,d,v,p=f[u],g=h?h(Ol(null===(a=n.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=n.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[e%(null===(d=n.marker)||void 0===d?void 0:d.color).length]:0):Zp(y,e,p,i,r),m=Kp(n,e),b=kg(n.histnorm,k[e],M,x?t.length:xg(t));c.push((0,o.Cl)({x:x?t.join(", "):wg(t),y:b,legend:p,color:null!==(v=Vo(g).copy({opacity:m}).formatHex8())&&void 0!==v?v:g},x?{}:{xAxisCalloutData:"[".concat(t.x0," - ").concat(t.x1,")")}))}))}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x)},ig(t.layout)),Eg(t.data,t.layout)),og(t.data[0],t.layout))},renderer:Ug},area:{transformer:function(t,n,i,e,r){return gg(t,n,"area",i,e,r)},renderer:Yg,preTransformOperation:ty},line:{transformer:function(t,n,i,e,r){return gg(t,n,"line",i,e,r)},renderer:zg,preTransformOperation:ty},scatter:{transformer:function(t,n,i,e,r){return gg(t,n,"scatter",i,e,r)},renderer:Zg,preTransformOperation:ty},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(c){var d={};t.data.forEach((function(n,o){var u,a,l,c,f,v,h,p,g,y,m=n.name||"Category ".concat(o+1),b=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),x=Zp(b,0,m,i,r);d[m]=x;var w=null!==(p=null!==(h=n.labels)&&void 0!==h?h:n.y)&&void 0!==p?p:n.stage,C=null!==(y=null!==(g=n.values)&&void 0!==g?g:n.x)&&void 0!==y?y:n.value;Ol(w)&&Ol(C)&&w&&Ol(w)&&w.length>0&&w.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(C[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:m,value:e,color:x}]}):s[i].subValues.push({category:m,value:e,color:x}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,d,f,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=Ll(a),s=Ll(u),c=kl(a),d=kl(u),f=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:f(u),values:f(a)}:l&&d?{categories:f(a),values:f(u)}:{categories:f(s?u:a),values:f(s?a:u)}:l&&d?{categories:f(a),values:f(u)}:s&&c?{categories:f(u),values:f(a)}:{categories:f(l?a:u),values:f(l?u:a)}}(n),h=v.categories,p=v.values;if(Ol(h)&&Ol(p)){var g=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==d?d:null===(f=n.marker)||void 0===f?void 0:f.color,i,r);h.forEach((function(t,n){var e=Zp(g,n,t,i,r),o=Number(p[n]);isNaN(o)||s.push({stage:t,value:o,color:e})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:Vp},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=Vg(t.data,t.layout,n),c=s.legends,d=s.hideLegend,f=void 0,v=t.data.map((function(n,o){var u,a,l,s,d,v;f=Jp(t.layout,n,f);var h=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),p=c[o],g="date"===(null===(v=null===(d=t.layout)||void 0===d?void 0:d.xaxis)||void 0===v?void 0:v.type)||Ml(n.x),y=function(t){return Dl(t)?0:g?+function(t){if("string"==typeof t){var n=t.match(Fg);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)}(t):+t};return n.y.map((function(t,e){var o,u,a,l,s,c,d;if(Dl(t))return null;var v=f?f(Ol(null===(o=n.marker)||void 0===o?void 0:o.color)?null===(a=null===(u=n.marker)||void 0===u?void 0:u.color)||void 0===a?void 0:a[e%(null===(l=n.marker)||void 0===l?void 0:l.color).length]:0):Zp(h,e,p,i,r),m=Kp(n,e),b=y(null===(s=n.base)||void 0===s?void 0:s[e]),x=y(null===(c=n.x)||void 0===c?void 0:c[e]);return{x:{start:g?new Date(b):b,end:g?new Date(b+x):b+x},y:t,legend:p,color:null!==(d=Vo(v).copy({opacity:m}).formatHex8())&&void 0!==d?d:v}})).filter((function(t){return null!==t}))})).flat();return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:d,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},ig(t.layout)),Eg(t.data,t.layout)),Bg(t.data,t.layout,!0))},renderer:Jg},fallback:{transformer:pg,renderer:$g}},iy=u.forwardRef((function(t,n){var i,e=Nl(t.chartSchema).plotlySchema,r=(t=>{try{Nl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let n=(t=>{try{const n=t;if(!n)throw new Error("Plotly input is null or undefined");if("object"!=typeof n)throw new Error("Plotly input is not an object. Input type: "+typeof n);if(!Ol(n.data))throw new Error("Plotly input data is not a valid array or typed array");if(0===n.data.length)throw new Error("Plotly input data is empty");return n}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{n=ml(n)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}let i=((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Pl[r]){const o=Pl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(n.data,n.layout).map((t=>{var i,e;const r=t[0],o=n.data[r];switch(o.type){case"pie":return{isValid:!0,traceIndex:r,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:r,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:r,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:r,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:r,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:r,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:r,type:"table"};case"bar":const t=o;return"h"===t.orientation?_l(t)?{isValid:!0,traceIndex:r,type:"gantt"}:{isValid:!0,traceIndex:r,type:"horizontalbar"}:Vl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:["group","overlay"].includes(null===(i=null==n?void 0:n.layout)||void 0===i?void 0:i.barmode)?kl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:r,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:r,type:"funnel"};case"scatter":case"scattergl":const u=o,a=Wl(u);return El(null!==(e=u.mode)&&void 0!==e?e:"")?{isValid:!0,traceIndex:r,type:"scatter"}:Rl(u)?{isValid:!0,traceIndex:r,type:"fallback"}:{isValid:!0,traceIndex:r,type:a?"area":"line"};default:return{isValid:!1,errorMessage:`${bl} ${o.type}`}}}));if(i.every((t=>!t.isValid)))return{isValid:!1,errorMessage:i.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};i=i.filter((t=>t.isValid));const e=i.map((t=>({index:t.traceIndex,type:t.type}))),r=i.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type)),o=i.some((t=>"line"===t.type||"fallback"===t.type));if(r&&o)return{isValid:!0,type:"fallback",validTracesInfo:e};const u=new Set(i.map((t=>t.type)));return u.size>1?{isValid:!0,type:"composite",validTracesInfo:e}:{isValid:!0,type:Array.from(u)[0],validTracesInfo:e}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(e);if(!r.isValid)throw new Error("Invalid chart schema: ".concat(r.errorMessage));var a=e;try{a=ml(a)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var l=(0,o.Cl)((0,o.Cl)({},a),{data:r.validTracesInfo.map((function(t){return a.data[t.index]}))}),s=r.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),c=e.selectedLegends,d=u.useRef(new Map),f=function(){var t=u.useContext(Pp),n=(0,Bp.m)(["theme"]).theme;return t||n||(0,pn.a)({})}(),v=null!==(i=null==f?void 0:f.isInverted)&&void 0!==i&&i,h=u.useRef(null),p=u.useRef(!1);Ol(c)||(c=[]);var g=u.useState(c),y=g[0],m=g[1],b=function(n){m(n),t.onSchemaChange&&t.onSchemaChange({plotlySchema:{plotlyInput:a,selectedLegends:n}})};u.useEffect((function(){var n=Nl(t.chartSchema).plotlySchema.selectedLegends;m(null!=n?n:[])}),[t.chartSchema]);var x={legendProps:{canSelectMultipleLegends:!0,onChange:b,selectedLegends:y},componentRef:h,calloutProps:{layerProps:{eventBubblingEnabled:!0}}},w=u.useCallback((function(t){return new Promise((function(n,i){return p.current?i(Error("Exporting multi plot charts as image is not supported")):h.current&&"function"==typeof h.current.toImage?void h.current.toImage((0,o.Cl)({background:f.semanticColors.bodyBackground,scale:5},t)).then(n).catch(i):i(Error("Chart cannot be exported as image"))}))}),[f]);if(u.useImperativeHandle(t.componentRef,(function(){return{exportAsImage:w}}),[w]),"scatterpolar"===r.type){var C=function(t){for(var n,i,e,r,u,a,l,s,c,d=(0,o.Cl)({},t),f=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Ol(p))for(var g=0;g<p.length;g++)Dl(p[g])||(f=Math.min(f,p[g]),v=Math.max(v,p[g]))}var y=f<0?-f:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Ol(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,C=function(s){var c=t.data[s];Ol(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var f=c.theta,v=c.r;if(!Ol(v)||!Ol(f))return d.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],C=!1;kl(f)||(g=Array.from(new Set(f)),C=!0);for(var M=0;M<v.length;M++)if(!Dl(null==f?void 0:f[M])&&!Dl(null==v?void 0:v[M])){var k;k=C?p+h*g.indexOf(f[M])*(2*Math.PI/g.length):p+h*(f[M]*Math.PI/180);var A=v[M]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===M&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),d.data[s]=c};for(h=0;h<t.data.length;h++)C(h);if(null!==w){for(h=0;h<d.data.length;h++)(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var M=0;M<b.length;M++)b[M]=b[M]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<d.data.length;h++){var A;(A=d.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return d.layout=(0,o.Cl)((0,o.Cl)({},d.layout),{width:S,height:S}),d.layout.__polarOriginX=null!=w?w:void 0,d}(l);l.data=C.data,l.layout=C.layout,s.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=l.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?s[n].type="line":r.includes("markers")||"text"===r?s[n].type="scatter":s[n].type="line"}}))}var M={},k=0;l.data.forEach((function(t,n){var i,e="";Tg(r.validTracesInfo[n].type)?(e="".concat(Qp).concat(k+1),k++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",M[e]||(M[e]=[]),M[e].push(n)})),p.current=Object.keys(M).length>1;var A=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var d=null==t?void 0:t.layout;if(null!=d&&Object.keys(d).length>0&&Object.keys(null!=d?d:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Og(t,"xaxis"),f=null!==(i=null===(n=d[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Og(f,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=d[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Og(t,"yaxis"),f=null!==(r=null===(e=d[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Og(f,"x"))){if(1===c&&0===p||"right"===(null===(a=d.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=d[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(Tg(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],d={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},f={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(d),u.push(f)}})),null!=d&&Object.keys(d).length>0&&(null===(e=d.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var f=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);f.has(n)||f.set(n,t)}));var v=Array.from(f.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=n>=r?"".concat(Qp).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=n>=r?"".concat(Qp).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(l,p.current,r.validTracesInfo);p.current&&A.templateRows===tg&&A.templateColumns===tg&&(Object.keys(M).forEach((function(t,n){n>0&&delete M[t]})),p.current=!1);var S,L=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,d,f,v,h,p,g,y,m,b,x,w;if("donut"===e[a].type){var C=u,M=Up(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(f=null===(d=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===d?void 0:d.layout)||void 0===f?void 0:f.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==C?void 0:C.marker)||void 0===p?void 0:p.colors,n,r);null===(g=C.labels)||void 0===g||g.forEach((function(t,i){var e="".concat(t),u=Zp(M,i,e,n,r);""!==e&&!1===o.some((function(t){return t.title===e}))&&o.push({title:e,color:u})}))}else if(!1===Tg(e[a].type)){var k=u,A=k.legendgroup,S=(null===(y=k.line)||void 0===y?void 0:y.color)||(null===(m=k.marker)||void 0===m?void 0:m.color),L=Lg(k),V=Up(null===(w=null===(x=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,i,S,n,r);void 0!==A&&""!==A&&!1===o.some((function(t){return t.title===A}))&&o.push({title:A,color:V,shape:L})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(l,d,t.colorwayType,r.validTracesInfo,v);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:A.templateRows,gridTemplateColumns:A.templateColumns}},Object.entries(M).map((function(n){var i,e,a,c=n[0],f=n[1],h=(0,o.Cl)((0,o.Cl)({},l),{data:f.map((function(t){return l.data[t]}))}),g=s.filter((function(t){return f.includes(t.index)})),y=s.some((function(t){return t.type===Qg}))||r.type===Qg?Qg:g[0].type;s.some((function(t){return"line"===t.type}))&&s.some((function(t){return"scatter"===t.type}))&&(y="line");var m=ny[y];if(m){var b=m.transformer,w=m.renderer,C=m.preTransformCondition,M=m.preTransformOperation;if(void 0===C||C(h)){var k=M?M(h):h,S=A.layout[c];return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(w,b,[k,p.current,d,t.colorwayType,v],(0,o.Cl)((0,o.Cl)({},x),{xAxisAnnotation:null==S?void 0:S.xAnnotation,yAxisAnnotation:null==S?void 0:S.yAnnotation}),null!==(i=null==S?void 0:S.row)&&void 0!==i?i:1,null!==(e=null==S?void 0:S.column)&&void 0!==e?e:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(a=h.data[0])||void 0===a?void 0:a.type))}))),p.current&&(S=L,u.createElement(zd,(0,o.Cl)({},S,{selectedLegends:y,onChange:b}))))}));iy.displayName="DeclarativeChart",iy.defaultProps={colorwayType:"default"},(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();
1
+ var FluentUIReactCharting;!function(){"use strict";var t={40:function(t,n,i){i.d(n,{nr:function(){return s}});var e,r=i(823),o=i(638),u="__stylesheet__",a="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),l={};try{l=window||{}}catch(t){}var s=function(){function t(t,n){var i,e,o,u,a,l;this._rules=[],this._preservedRules=[],this._counter=0,this._keyToClassName={},this._onInsertRuleCallbacks=[],this._onResetCallbacks=[],this._classNameToArgs={},this._config=(0,r.Cl)({injectionMode:"undefined"==typeof document?0:1,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=null!==(i=null==n?void 0:n.classNameToArgs)&&void 0!==i?i:this._classNameToArgs,this._counter=null!==(e=null==n?void 0:n.counter)&&void 0!==e?e:this._counter,this._keyToClassName=null!==(u=null!==(o=this._config.classNameCache)&&void 0!==o?o:null==n?void 0:n.keyToClassName)&&void 0!==u?u:this._keyToClassName,this._preservedRules=null!==(a=null==n?void 0:n.preservedRules)&&void 0!==a?a:this._preservedRules,this._rules=null!==(l=null==n?void 0:n.rules)&&void 0!==l?l:this._rules}return t.getInstance=function(n){if(e=l[u],l[o.Se])return l[o.Se].getInstance(n);if(!e||e._lastStyleElement&&e._lastStyleElement.ownerDocument!==document){var i=(null==l?void 0:l.FabricConfig)||{},r=new t(i.mergeStyles,i.serializedStylesheet);e=r,l[u]=r}return e},t.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},t.prototype.setConfig=function(t){this._config=(0,r.Cl)((0,r.Cl)({},this._config),t)},t.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter((function(n){return n!==t}))}},t.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter((function(n){return n!==t}))}},t.prototype.getClassName=function(t){var n=this._config.namespace,i=t||this._config.defaultPrefix;return"".concat(n?n+"-":"").concat(i,"-").concat(this._counter++)},t.prototype.cacheClassName=function(t,n,i,e){this._keyToClassName[this._getCacheKey(n)]=t,this._classNameToArgs[t]={args:i,rules:e}},t.prototype.classNameFromKey=function(t){return this._keyToClassName[this._getCacheKey(t)]},t.prototype.getClassNameCache=function(){return this._keyToClassName},t.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},t.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},t.prototype.insertRule=function(t,n,i){void 0===i&&(i=o.P6);var e=this._config.injectionMode,r=0!==e?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),r)switch(e){case 1:this._insertRuleIntoSheet(r.sheet,t);break;case 2:r.appendChild(document.createTextNode(t))}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach((function(n){return n({key:i,sheet:r?r.sheet:void 0,rule:t})}))},t.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},t.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(t){return t()}))},t.prototype.resetKeys=function(){this._keyToClassName={}},t.prototype._createStyleElement=function(){var t,n=(null===(t=this._config.window)||void 0===t?void 0:t.document)||document,i=n.head,e=n.createElement("style"),r=null;e.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&e.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var u=this._findPlaceholderStyleTag();r=u?u.nextElementSibling:i.childNodes[0]}return i.insertBefore(e,i.contains(r)?r:null),this._lastStyleElement=e,e},t.prototype._insertRuleIntoSheet=function(t,n){if(!t)return!1;try{return t.insertRule(n,t.cssRules.length),!0}catch(t){}return!1},t.prototype._getCacheKey=function(t){return t},t.prototype._getStyleElement=function(){var t=this;return this._styleElement||(this._styleElement=this._createStyleElement(),a||(this._config.window||window).requestAnimationFrame((function(){t._styleElement=void 0}))),this._styleElement},t.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},t}()},41:function(t,n,i){var e,r,o,u,a;i.d(n,{BO:function(){return u},Dn:function(){return e},bi:function(){return r},s:function(){return o}}),function(t){t.Arabic="Segoe UI Web (Arabic)",t.Cyrillic="Segoe UI Web (Cyrillic)",t.EastEuropean="Segoe UI Web (East European)",t.Greek="Segoe UI Web (Greek)",t.Hebrew="Segoe UI Web (Hebrew)",t.Thai="Leelawadee UI Web",t.Vietnamese="Segoe UI Web (Vietnamese)",t.WestEuropean="Segoe UI Web (West European)",t.Selawik="Selawik Web",t.Armenian="Segoe UI Web (Armenian)",t.Georgian="Segoe UI Web (Georgian)"}(e||(e={})),function(t){t.Arabic="'".concat(e.Arabic,"'"),t.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",t.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",t.Cyrillic="'".concat(e.Cyrillic,"'"),t.EastEuropean="'".concat(e.EastEuropean,"'"),t.Greek="'".concat(e.Greek,"'"),t.Hebrew="'".concat(e.Hebrew,"'"),t.Hindi="'Nirmala UI'",t.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",t.Korean="'Malgun Gothic', Gulim",t.Selawik="'".concat(e.Selawik,"'"),t.Thai="'Leelawadee UI Web', 'Kmer UI'",t.Vietnamese="'".concat(e.Vietnamese,"'"),t.WestEuropean="'".concat(e.WestEuropean,"'"),t.Armenian="'".concat(e.Armenian,"'"),t.Georgian="'".concat(e.Georgian,"'")}(r||(r={})),function(t){t.size10="10px",t.size12="12px",t.size14="14px",t.size16="16px",t.size18="18px",t.size20="20px",t.size24="24px",t.size28="28px",t.size32="32px",t.size42="42px",t.size68="68px",t.mini="10px",t.xSmall="10px",t.small="12px",t.smallPlus="12px",t.medium="14px",t.mediumPlus="16px",t.icon="16px",t.large="18px",t.xLarge="20px",t.xLargePlus="24px",t.xxLarge="28px",t.xxLargePlus="32px",t.superLarge="42px",t.mega="68px"}(o||(o={})),function(t){t.light=100,t.semilight=300,t.regular=400,t.semibold=600,t.bold=700}(u||(u={})),function(t){t.xSmall="10px",t.small="12px",t.medium="16px",t.large="20px"}(a||(a={}))},61:function(t,n,i){function e(t){const n=Math.round(t);return Math.abs(t-n)<1e-6?n:t}i.d(n,{Di:function(){return e},Yn:function(){return u},c$:function(){return r},c2:function(){return a}});const r=(t,n,i)=>{if(null==t||""===t||Number.isNaN(t))return t;if(n=n||void 0,"number"==typeof t){const i=Math.abs(t)>=1e4;return e(t).toLocaleString(n,{useGrouping:i})}if("string"==typeof t&&!window.isNaN(Number(t))){const i=Number(t),r=Math.abs(i)>=1e4;return e(i).toLocaleString(n,{useGrouping:r})}return t instanceof Date?u(t,n,!!i):t},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u=(t,n,i,e=!0,r)=>(n=n||void 0,r=r||o,i&&(r={...r,timeZone:"UTC"}),e&&(r={...r,timeZoneName:"short"}),t.toLocaleString(n,r));function a(t,n){const i={second:"2-digit"},e={minute:"2-digit",second:"2-digit"},r={hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0},u={weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},a={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},l={hour:"2-digit",minute:"2-digit",hour12:!0},s={month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},c={month:"short",day:"2-digit",hour:"2-digit",hour12:!0},f={month:"short",day:"2-digit"},d={year:"numeric",month:"2-digit",day:"2-digit"},v=[[i,i,e,r,u,a,a,o],[o,i,e,r,u,a,a,o],[o,o,l,l,{weekday:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0},s,s,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}],[o,o,o,{hour:"2-digit",hour12:!0},{weekday:"short",day:"2-digit",hour:"2-digit",hour12:!0},c,c,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hour12:!0}],[o,o,o,o,{weekday:"short",day:"2-digit"},f,f,d],[o,o,o,o,o,f,f,d],[o,o,o,o,o,o,{month:"long"},{month:"short",year:"numeric"}],[o,o,o,o,o,o,o,{year:"numeric"}]];return void 0===t||t<0||t>=v.length?o:void 0===n||n<t?v[t][t]:n>=v[t].length?v[t][v[t].length-1]:v[t][n]}},143:function(t,n,i){i.d(n,{a:function(){return D}});var e,r=i(302);!function(t){t.depth0="0 0 0 0 transparent",t.depth4="0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",t.depth8="0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",t.depth16="0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",t.depth64="0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)"}(e||(e={}));var o={elevation4:e.depth4,elevation8:e.depth8,elevation16:e.depth16,elevation64:e.depth64,roundedCorner2:"2px",roundedCorner4:"4px",roundedCorner6:"6px"},u=i(800),a=i(40),l=i(289),s=i(41),c="'Segoe UI', '".concat(s.Dn.WestEuropean,"'"),f={ar:s.bi.Arabic,bg:s.bi.Cyrillic,cs:s.bi.EastEuropean,el:s.bi.Greek,et:s.bi.EastEuropean,he:s.bi.Hebrew,hi:s.bi.Hindi,hr:s.bi.EastEuropean,hu:s.bi.EastEuropean,ja:s.bi.Japanese,kk:s.bi.EastEuropean,ko:s.bi.Korean,lt:s.bi.EastEuropean,lv:s.bi.EastEuropean,pl:s.bi.EastEuropean,ru:s.bi.Cyrillic,sk:s.bi.EastEuropean,"sr-latn":s.bi.EastEuropean,th:s.bi.Thai,tr:s.bi.EastEuropean,uk:s.bi.Cyrillic,vi:s.bi.Vietnamese,"zh-hans":s.bi.ChineseSimplified,"zh-hant":s.bi.ChineseTraditional,hy:s.bi.Armenian,ka:s.bi.Georgian};function d(t,n,i){return{fontFamily:i,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:t,fontWeight:n}}var v,h,p,g=i(543),y=i(338),m=i(468),b="language",x=(h=function(t){for(var n in f)if(f.hasOwnProperty(n)&&t&&0===n.indexOf(t))return f[n];return c}(function(t){if(void 0===t&&(t="sessionStorage"),void 0===v){var n=(0,g.Y)(),i="localStorage"===t?function(t){var n=null;try{var i=(0,y.z)();n=i?i.localStorage.getItem(t):null}catch(t){}return n}(b):"sessionStorage"===t?m.G(b):void 0;i&&(v=i),void 0===v&&n&&(v=n.documentElement.getAttribute("lang")),void 0===v&&(v="en")}return v}()),p="".concat(h,", ").concat("'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif"),{tiny:d(s.s.mini,s.BO.regular,p),xSmall:d(s.s.xSmall,s.BO.regular,p),small:d(s.s.small,s.BO.regular,p),smallPlus:d(s.s.smallPlus,s.BO.regular,p),medium:d(s.s.medium,s.BO.regular,p),mediumPlus:d(s.s.mediumPlus,s.BO.regular,p),large:d(s.s.large,s.BO.regular,p),xLarge:d(s.s.xLarge,s.BO.semibold,p),xLargePlus:d(s.s.xLargePlus,s.BO.semibold,p),xxLarge:d(s.s.xxLarge,s.BO.semibold,p),xxLargePlus:d(s.s.xxLargePlus,s.BO.semibold,p),superLarge:d(s.s.superLarge,s.BO.semibold,p),mega:d(s.s.mega,s.BO.semibold,p)});function w(t,n,i,e){!function(t){var n=a.nr.getInstance(),i=(0,l.bz)((0,u.Iy)(),t);if(!n.classNameFromKey(i)){var e=n.getClassName();n.insertRule("@font-face{".concat(i,"}"),!0),n.cacheClassName(e,i,[],["font-face",i])}}({fontFamily:t="'".concat(t,"'"),src:(void 0!==e?"local('".concat(e,"'),"):"")+"url('".concat(n,".woff2') format('woff2'),")+"url('".concat(n,".woff') format('woff')"),fontWeight:i,fontStyle:"normal",fontDisplay:"swap"})}function C(t,n,i,e,r){void 0===e&&(e="segoeui");var o="".concat(t,"/").concat(i,"/").concat(e);w(n,o+"-light",s.BO.light,r&&r+" Light"),w(n,o+"-semilight",s.BO.semilight,r&&r+" SemiLight"),w(n,o+"-regular",s.BO.regular,r),w(n,o+"-semibold",s.BO.semibold,r&&r+" SemiBold"),w(n,o+"-bold",s.BO.bold,r&&r+" Bold")}function M(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=0,r=n;e<r.length;e++)k(t||{},r[e]);return t}function k(t,n,i){for(var e in void 0===i&&(i=[]),i.push(n),n)if(n.hasOwnProperty(e)&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var r=n[e];if("object"!=typeof r||null===r||Array.isArray(r))t[e]=r;else{var o=i.indexOf(r)>-1;t[e]=o?r:k(t[e]||{},r,i)}}return i.pop(),t}!function(t){if(t){var n="".concat(t,"/fonts");C(n,s.Dn.Thai,"leelawadeeui-thai","leelawadeeui"),C(n,s.Dn.Arabic,"segoeui-arabic"),C(n,s.Dn.Cyrillic,"segoeui-cyrillic"),C(n,s.Dn.EastEuropean,"segoeui-easteuropean"),C(n,s.Dn.Greek,"segoeui-greek"),C(n,s.Dn.Hebrew,"segoeui-hebrew"),C(n,s.Dn.Vietnamese,"segoeui-vietnamese"),C(n,s.Dn.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),C(n,s.bi.Selawik,"selawik","selawik"),C(n,s.Dn.Armenian,"segoeui-armenian"),C(n,s.Dn.Georgian,"segoeui-georgian"),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-semilight"),s.BO.light),w("Leelawadee UI Web","".concat(n,"/leelawadeeui-thai/leelawadeeui-bold"),s.BO.semibold)}}(function(){var t,n,i=null===(t=(0,y.z)())||void 0===t?void 0:t.FabricConfig;return null!==(n=null==i?void 0:i.fontBaseUrl)&&void 0!==n?n:"https://res-1.cdn.office.net/files/fabric-cdn-prod_20230815.002/assets"}());var A=i(823);function S(t,n,i,e,r){return void 0===r&&(r=!1),function(t,n){var i="";return!0===n&&(i=" /* @deprecated */"),t.listTextColor=t.listText+i,t.menuItemBackgroundChecked+=i,t.warningHighlight+=i,t.warningText=t.messageText+i,t.successText+=i,t}(L(t,n,(0,A.Cl)({primaryButtonBorder:"transparent",errorText:e?"#F1707B":"#a4262c",messageText:e?"#F3F2F1":"#323130",messageLink:e?"#6CB8F6":"#005A9E",messageLinkHovered:e?"#82C7FF":"#004578",infoIcon:e?"#C8C6C4":"#605e5c",errorIcon:e?"#F1707B":"#A80000",blockingIcon:e?"#442726":"#FDE7E9",warningIcon:e?"#C8C6C4":"#797775",severeWarningIcon:e?"#FCE100":"#D83B01",successIcon:e?"#92C353":"#107C10",infoBackground:e?"#323130":"#f3f2f1",errorBackground:e?"#442726":"#FDE7E9",blockingBackground:e?"#442726":"#FDE7E9",warningBackground:e?"#433519":"#FFF4CE",severeWarningBackground:e?"#4F2A0F":"#FED9CC",successBackground:e?"#393D1B":"#DFF6DD",warningHighlight:e?"#fff100":"#ffb900",successText:e?"#92c353":"#107C10"},i),e),r)}function L(t,n,i,e,r){void 0===r&&(r=!1);var o={},u=t||{},a=u.white,l=u.black,s=u.themePrimary,c=u.themeDark,f=u.themeDarker,d=u.themeDarkAlt,v=u.themeLighter,h=u.neutralLight,p=u.neutralLighter,g=u.neutralDark,y=u.neutralQuaternary,m=u.neutralQuaternaryAlt,b=u.neutralPrimary,x=u.neutralSecondary,w=u.neutralSecondaryAlt,C=u.neutralTertiary,M=u.neutralTertiaryAlt,k=u.neutralLighterAlt,S=u.accent;return a&&(o.bodyBackground=a,o.bodyFrameBackground=a,o.accentButtonText=a,o.buttonBackground=a,o.primaryButtonText=a,o.primaryButtonTextHovered=a,o.primaryButtonTextPressed=a,o.inputBackground=a,o.inputForegroundChecked=a,o.listBackground=a,o.menuBackground=a,o.cardStandoutBackground=a),l&&(o.bodyTextChecked=l,o.buttonTextCheckedHovered=l),s&&(o.link=s,o.primaryButtonBackground=s,o.inputBackgroundChecked=s,o.inputIcon=s,o.inputFocusBorderAlt=s,o.menuIcon=s,o.menuHeader=s,o.accentButtonBackground=s),c&&(o.primaryButtonBackgroundPressed=c,o.inputBackgroundCheckedHovered=c,o.inputIconHovered=c),f&&(o.linkHovered=f),d&&(o.primaryButtonBackgroundHovered=d),v&&(o.inputPlaceholderBackgroundChecked=v),h&&(o.bodyBackgroundChecked=h,o.bodyFrameDivider=h,o.bodyDivider=h,o.variantBorder=h,o.buttonBackgroundCheckedHovered=h,o.buttonBackgroundPressed=h,o.listItemBackgroundChecked=h,o.listHeaderBackgroundPressed=h,o.menuItemBackgroundPressed=h,o.menuItemBackgroundChecked=h),p&&(o.bodyBackgroundHovered=p,o.buttonBackgroundHovered=p,o.buttonBackgroundDisabled=p,o.buttonBorderDisabled=p,o.primaryButtonBackgroundDisabled=p,o.disabledBackground=p,o.listItemBackgroundHovered=p,o.listHeaderBackgroundHovered=p,o.menuItemBackgroundHovered=p),y&&(o.primaryButtonTextDisabled=y,o.disabledSubtext=y),m&&(o.listItemBackgroundCheckedHovered=m),C&&(o.disabledBodyText=C,o.variantBorderHovered=(null==i?void 0:i.variantBorderHovered)||C,o.buttonTextDisabled=C,o.inputIconDisabled=C,o.disabledText=C),b&&(o.bodyText=b,o.actionLink=b,o.buttonText=b,o.inputBorderHovered=b,o.inputText=b,o.listText=b,o.menuItemText=b),k&&(o.bodyStandoutBackground=k,o.defaultStateBackground=k),g&&(o.actionLinkHovered=g,o.buttonTextHovered=g,o.buttonTextChecked=g,o.buttonTextPressed=g,o.inputTextHovered=g,o.menuItemTextHovered=g),x&&(o.bodySubtext=x,o.focusBorder=x,o.inputBorder=x,o.smallInputBorder=x,o.inputPlaceholderText=x),w&&(o.buttonBorder=w),M&&(o.disabledBodySubtext=M,o.disabledBorder=M,o.buttonBackgroundChecked=M,o.menuDivider=M),S&&(o.accentButtonBackground=S),(null==n?void 0:n.elevation4)&&(o.cardShadow=n.elevation4),!e&&(null==n?void 0:n.elevation8)?o.cardShadowHovered=n.elevation8:o.variantBorderHovered&&(o.cardShadowHovered="0 0 1px "+o.variantBorderHovered),(0,A.Cl)((0,A.Cl)({},o),i)}var V={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"};function D(t,n){void 0===t&&(t={}),void 0===n&&(n=!1);var i=!!t.isInverted;return function(t,n){var i,e,r;void 0===n&&(n={});var o=M({},t,n,{semanticColors:L(n.palette,n.effects,n.semanticColors,void 0===n.isInverted?t.isInverted:n.isInverted)});if((null===(i=n.palette)||void 0===i?void 0:i.themePrimary)&&!(null===(e=n.palette)||void 0===e?void 0:e.accent)&&(o.palette.accent=n.palette.themePrimary),n.defaultFontStyle)for(var u=0,a=Object.keys(o.fonts);u<a.length;u++){var l=a[u];o.fonts[l]=M(o.fonts[l],n.defaultFontStyle,null===(r=null==n?void 0:n.fonts)||void 0===r?void 0:r[l])}return o}({palette:r.b,effects:o,fonts:x,spacing:V,isInverted:i,disableGlobalClassNames:!1,semanticColors:S(r.b,o,void 0,i,n),rtl:void 0},t)}},259:function(t,n,i){i.d(n,{jI:function(){return l}});var e,r=i(543),o=i(468),u=i(800),a="isRTL";function l(t){if(void 0===t&&(t={}),void 0!==t.rtl)return t.rtl;if(void 0===e){var n=(0,o.G)(a);null!==n&&function(t,n){void 0===n&&(n=!1);var i=(0,r.Y)();i&&i.documentElement.setAttribute("dir",t?"rtl":"ltr"),n&&(0,o.S)(a,t?"1":"0"),e=t,(0,u.DU)(e)}(e="1"===n);var i=(0,r.Y)();void 0===e&&i&&(e="rtl"===(i.body&&i.body.getAttribute("dir")||i.documentElement.getAttribute("dir")),(0,u.DU)(e))}return!!e}},263:function(t,n,i){i.d(n,{J:function(){return r}});var e=i(419),r=function(t){var n,i,r,o=t.color,u=t.XValue,a=t.theme,l=t.isRatioPresent,s=void 0!==l&&l;return{calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:a.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[a.fonts.small,{lineHeight:"16px",opacity:"0.85",color:a.semanticColors.bodySubtext}],calloutBlockContainer:[a.fonts.xxLarge,{marginTop:u?"13px":"unset",paddingLeft:"8px",lineHeight:"22px",color:a.semanticColors.bodyText,borderLeft:"4px solid ".concat(o),selectors:(n={},n[e.up]={forcedColorAdjust:"none"},n)}],calloutlegendText:[a.fonts.small,{lineHeight:"16px",color:a.semanticColors.bodyText,selectors:(i={},i[e.up]={color:"CanvasText"},i)}],calloutContentY:[a.fonts.xxLarge,{color:o||a.semanticColors.bodyText,fontWeight:"bold",lineHeight:"36px",selectors:(r={},r[e.up]={color:"CanvasText"},r)}],calloutInfoContainer:[s&&{display:"flex",alignItems:"flex-end"}],ratio:[a.fonts.small,{marginLeft:"6px",color:a.semanticColors.bodyText}],numerator:{fontWeight:e.BO.bold},denominator:{fontWeight:e.BO.semibold},descriptionMessage:[a.fonts.small,{color:a.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(a.semanticColors.menuDivider)}]}}},289:function(t,n,i){i.d(n,{Ae:function(){return L},bz:function(){return A},kG:function(){return V},GJ:function(){return S}});var e,r=i(823),o=i(40),u={},a={"user-select":1};function l(t,n){var i=function(){var t;if(!e){var n="undefined"!=typeof document?document:void 0,i="undefined"!=typeof navigator?navigator:void 0,r=null===(t=null==i?void 0:i.userAgent)||void 0===t?void 0:t.toLowerCase();e=n?{isWebkit:!(!n||!("WebkitAppearance"in n.documentElement.style)),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!i||!/rv:11.0/i.test(i.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return e}(),r=t[n];if(a[r]){var o=t[n+1];a[r]&&(i.isWebkit&&t.push("-webkit-"+r,o),i.isMoz&&t.push("-moz-"+r,o),i.isMs&&t.push("-ms-"+r,o),i.isOpera&&t.push("-o-"+r,o))}}var s,c=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function f(t,n){var i=t[n],e=t[n+1];if("number"==typeof e){var r=c.indexOf(i)>-1,o=i.indexOf("--")>-1,u=r||o?"":"px";t[n+1]="".concat(e).concat(u)}}var d="left",v="right",h="@noflip",p=((s={})[d]=v,s[v]=d,s),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function y(t,n,i){if(t.rtl){var e=n[i];if(!e)return;var r=n[i+1];if("string"==typeof r&&r.indexOf(h)>=0)n[i+1]=r.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(e.indexOf(d)>=0)n[i]=e.replace(d,v);else if(e.indexOf(v)>=0)n[i]=e.replace(v,d);else if(String(r).indexOf(d)>=0)n[i+1]=r.replace(d,v);else if(String(r).indexOf(v)>=0)n[i+1]=r.replace(v,d);else if(p[e])n[i]=p[e];else if(g[r])n[i+1]=g[r];else switch(e){case"margin":case"padding":n[i+1]=function(t){if("string"==typeof t){var n=t.split(" ");if(4===n.length)return"".concat(n[0]," ").concat(n[3]," ").concat(n[2]," ").concat(n[1])}return t}(r);break;case"box-shadow":n[i+1]=function(t){var n=t.split(" "),i=parseInt(n[0],10);return n[0]=n[0].replace(String(i),String(-1*i)),n.join(" ")}(r)}}}var m="displayName",b=/\:global\((.+?)\)/g;function x(t,n){return t.indexOf(":global(")>=0?t.replace(b,"$1"):0===t.indexOf(":host(")?t:0===t.indexOf(":")?n+t:t.indexOf("&")<0?n+" "+t:t}function w(t,n,i,e,r){void 0===n&&(n={__order:[]}),0===i.indexOf("@")?C([e],n,i=i+"{"+t,r):i.indexOf(",")>-1?function(t){if(!b.test(t))return t;for(var n=[],i=/\:global\((.+?)\)/g,e=null;e=i.exec(t);)e[1].indexOf(",")>-1&&n.push([e.index,e.index+e[0].length,e[1].split(",").map((function(t){return":global(".concat(t.trim(),")")})).join(", ")]);return n.reverse().reduce((function(t,n){var i=n[0],e=n[1],r=n[2];return t.slice(0,i)+r+t.slice(e)}),t)}(i).split(",").map((function(t){return t.trim()})).forEach((function(i){return C([e],n,x(i,t),r)})):C([e],n,x(i,t),r)}function C(t,n,i,e){void 0===n&&(n={__order:[]}),void 0===i&&(i="&");var r,o=n[i];o||(o={},n[i]=o,n.__order.push(i));for(var u=0,a=t;u<a.length;u++){var l=a[u];if("string"==typeof l){var s=e.argsFromClassName(l);s&&C(s,n,i,e)}else if(Array.isArray(l))C(l,n,i,e);else for(var c in l)if(l.hasOwnProperty(c)){var f=l[c];if("selectors"===c){var d=l.selectors;for(var v in d)d.hasOwnProperty(v)&&w(i,n,v,d[v],e)}else"object"==typeof f||(r=c).indexOf(":global(")>=0||0===r.indexOf(":")?null!=f&&w(i,n,c,f,e):void 0!==f&&("margin"===c||"padding"===c?M(o,c,f):o[c]=f)}}return n}function M(t,n,i){var e="string"==typeof i?function(t){for(var n=[],i=0,e=0,r=0;r<t.length;r++)switch(t[r]){case"(":e++;break;case")":e&&e--;break;case"\t":case" ":e||(r>i&&n.push(t.substring(i,r)),i=r+1)}return i<t.length&&n.push(t.substring(i)),n}(i):[i];0===e.length&&e.push(i),"!important"===e[e.length-1]&&(e=e.slice(0,-1).map((function(t){return t+" !important"}))),t[n+"Top"]=e[0],t[n+"Right"]=e[1]||e[0],t[n+"Bottom"]=e[2]||e[0],t[n+"Left"]=e[3]||e[1]||e[0]}function k(t,n){return n<=0?"":1===n?t:t+k(t,n-1)}function A(t,n){if(!n)return"";var i,e,r,o=[];for(var a in n)n.hasOwnProperty(a)&&a!==m&&void 0!==n[a]&&o.push(a,n[a]);for(var s=0;s<o.length;s+=2)r=void 0,"-"!==(r=(i=o)[e=s]).charAt(0)&&(i[e]=u[r]=u[r]||r.replace(/([A-Z])/g,"-$1").toLowerCase()),f(o,s),y(t,o,s),l(o,s);for(s=1;s<o.length;s+=4)o.splice(s,1,":",o[s],";");return o.join("")}function S(t){for(var n,i=[],e=1;e<arguments.length;e++)i[e-1]=arguments[e];var r=null!==(n=t.stylesheet)&&void 0!==n?n:o.nr.getInstance(t.shadowConfig),u=C(i,void 0,void 0,r),a=function(t,n){for(var i=[t.rtl?"rtl":"ltr"],e=!1,r=0,o=n.__order;r<o.length;r++){var u=o[r];i.push(u);var a=n[u];for(var l in a)a.hasOwnProperty(l)&&void 0!==a[l]&&(e=!0,i.push(l,a[l]))}return e?i.join(""):void 0}(t,u);if(a){var l={className:r.classNameFromKey(a),key:a,args:i};if(!l.className){l.className=r.getClassName(function(t){var n=t&&t["&"];return n?n.displayName:void 0}(u));for(var s=[],c=0,f=u.__order;c<f.length;c++){var d=f[c];s.push(d,A(t,u[d]))}l.rulesToInsert=s}return l}}function L(t,n,i,e){void 0===n&&(n=1);var r=null!=e?e:o.nr.getInstance(i),u=t.className,a=t.key,l=t.args,s=t.rulesToInsert;if(s){for(var c=0;c<s.length;c+=2){var f=s[c+1];if(f){var d=s[c];d=d.replace(/&/g,k(".".concat(t.className),n));var v="".concat(d,"{").concat(f,"}").concat(0===d.indexOf("@")?"}":"");r.insertRule(v)}}r.cacheClassName(u,a,l,s)}}function V(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=S.apply(void 0,(0,r.fX)([t],n,!1));return e?(L(e,t.specificityMultiplier,t.shadowConfig,t.stylesheet),e.className):""}},302:function(t,n,i){i.d(n,{b:function(){return e}});var e={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"}},338:function(t,n,i){i.d(n,{z:function(){return o}});var e=i(921),r=void 0;try{r=window}catch(t){}function o(t){if((0,e.S)()&&void 0!==r){var n=t;return n&&n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView:r}}},357:function(t,n,i){i.r(n),i.d(n,{ChartHoverCard:function(){return f}});var e=i(566),r=i(823),o=i(594),u=i(873),a=i(61),l=(0,u.Z)(),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.color,i=t.Legend,e=t.XValue,r=t.YValue,u=t.styles,s=t.theme,c=t.ratio,f=t.descriptionMessage,d=t.culture;return this._classNames=l(u,{theme:s,color:n,XValue:e,isRatioPresent:!!c}),o.createElement("div",{className:this._classNames.calloutContentRoot},o.createElement("div",{className:this._classNames.calloutDateTimeContainer},o.createElement("div",{className:this._classNames.calloutContentX},e," ")),o.createElement("div",{className:this._classNames.calloutInfoContainer},o.createElement("div",{className:this._classNames.calloutBlockContainer},o.createElement("div",{className:this._classNames.calloutlegendText},(0,a.c$)(i,d)),o.createElement("div",{className:this._classNames.calloutContentY},(0,a.c$)(r,d))),!!c&&o.createElement("div",{className:this._classNames.ratio},o.createElement(o.Fragment,null,o.createElement("span",{className:this._classNames.numerator},(0,a.c$)(c[0],d)),"/",o.createElement("span",{className:this._classNames.denominator},(0,a.c$)(c[1],d))))),!!f&&o.createElement("div",{className:this._classNames.descriptionMessage},f))},n}(o.Component),c=i(263),f=(0,e.I)(s,c.J)},419:function(t,n,i){i.d(n,{lw:function(){return K},bp:function(){return Mt.b},s:function(){return kt.s},BO:function(){return kt.BO},up:function(){return it},nA:function(){return nt},QN:function(){return ot},gm:function(){return rt},Km:function(){return tt},O4:function(){return Ct},dX:function(){return J}});var e=i(916),r=i(800),o=i(40),u=i(289);function a(t){var n=o.nr.getInstance(),i=[];for(var e in t)t.hasOwnProperty(e)&&i.push(e,"{",(0,u.bz)((0,r.Iy)(),t[e]),"}");var a=i.join(""),l=n.classNameFromKey(a);if(l)return l;var s=n.getClassName();return n.insertRule("@keyframes ".concat(s,"{").concat(a,"}"),!0),n.cacheClassName(s,a,[],["keyframes",a]),s}var l="cubic-bezier(.1,.9,.2,1)",s="cubic-bezier(.1,.25,.75,.9)",c="0.167s",f="0.267s",d="0.367s",v="0.467s",h=a({from:{opacity:0},to:{opacity:1}}),p=a({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),g=G(-10),y=G(-20),m=G(-40),b=G(-400),x=G(10),w=G(20),C=G(40),M=G(400),k=q(10),A=q(20),S=q(-10),L=q(-20),V=U(10),D=U(20),N=U(40),O=U(400),T=U(-10),E=U(-20),F=U(-40),B=U(-400),P=Z(-10),_=Z(-20),H=Z(10),I=Z(20),W=a({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),R=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),$=a({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),z=a({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),j=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),Y=a({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}});function X(t,n,i){return{animationName:t,animationDuration:n,animationTimingFunction:i,animationFillMode:"both"}}function G(t){return a({from:{transform:"translate3d(".concat(t,"px,0,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function q(t){return a({from:{transform:"translate3d(0,".concat(t,"px,0)"),pointerEvents:"none"},to:{transform:"translate3d(0,0,0)",pointerEvents:"auto"}})}function U(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(".concat(t,"px,0,0)")}})}function Z(t){return a({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,".concat(t,"px,0)")}})}var K=function(t){var n={},i=function(i){var r;t.hasOwnProperty(i)&&Object.defineProperty(n,i,{get:function(){return void 0===r&&(r=(0,e.Z)(t[i]).toString()),r},enumerable:!0,configurable:!0})};for(var r in t)i(r);return n}({slideRightIn10:X("".concat(h,",").concat(g),d,l),slideRightIn20:X("".concat(h,",").concat(y),d,l),slideRightIn40:X("".concat(h,",").concat(m),d,l),slideRightIn400:X("".concat(h,",").concat(b),d,l),slideLeftIn10:X("".concat(h,",").concat(x),d,l),slideLeftIn20:X("".concat(h,",").concat(w),d,l),slideLeftIn40:X("".concat(h,",").concat(C),d,l),slideLeftIn400:X("".concat(h,",").concat(M),d,l),slideUpIn10:X("".concat(h,",").concat(k),d,l),slideUpIn20:X("".concat(h,",").concat(A),d,l),slideDownIn10:X("".concat(h,",").concat(S),d,l),slideDownIn20:X("".concat(h,",").concat(L),d,l),slideRightOut10:X("".concat(p,",").concat(V),d,l),slideRightOut20:X("".concat(p,",").concat(D),d,l),slideRightOut40:X("".concat(p,",").concat(N),d,l),slideRightOut400:X("".concat(p,",").concat(O),d,l),slideLeftOut10:X("".concat(p,",").concat(T),d,l),slideLeftOut20:X("".concat(p,",").concat(E),d,l),slideLeftOut40:X("".concat(p,",").concat(F),d,l),slideLeftOut400:X("".concat(p,",").concat(B),d,l),slideUpOut10:X("".concat(p,",").concat(P),d,l),slideUpOut20:X("".concat(p,",").concat(_),d,l),slideDownOut10:X("".concat(p,",").concat(H),d,l),slideDownOut20:X("".concat(p,",").concat(I),d,l),scaleUpIn100:X("".concat(h,",").concat(W),d,l),scaleDownIn100:X("".concat(h,",").concat($),d,l),scaleUpOut103:X("".concat(p,",").concat(z),c,s),scaleDownOut98:X("".concat(p,",").concat(R),c,s),fadeIn100:X(h,c,s),fadeIn200:X(h,f,s),fadeIn400:X(h,d,s),fadeIn500:X(h,v,s),fadeOut100:X(p,c,s),fadeOut200:X(p,f,s),fadeOut400:X(p,d,s),fadeOut500:X(p,v,s),rotate90deg:X(j,"0.1s",s),rotateN90deg:X(Y,"0.1s",s)}),J={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",whiteSpace:"nowrap"},Q=(0,i(753).J9)((function(t,n){var i=o.nr.getInstance();return n?Object.keys(t).reduce((function(n,e){return n[e]=i.getClassName(t[e]),n}),{}):t}));function tt(t,n,i){return Q(t,void 0!==i?i:n.disableGlobalClassNames)}var nt,it="@media screen and (-ms-high-contrast: active), screen and (forced-colors: active)",et=i(517);function rt(t,n,i,e,r,o,u,a){return function(t,n){var i,e;void 0===n&&(n={});var r=n.borderRadius,o=n.inset,u=void 0===o?0:o,a=n.width,l=void 0===a?1:a,s=n.position,c=void 0===s?"relative":s,f=n.highContrastStyle,d=n.borderColor,v=void 0===d?t.palette.white:d,h=n.outlineColor,p=void 0===h?t.palette.neutralSecondary:h,g=n.isFocusedOnly,y=void 0===g||g,m=n.pointerEvents;return{outline:"transparent",position:c,selectors:(i={"::-moz-focus-inner":{border:"0"}},i[".".concat(et.Y2," &").concat(y?":focus":"",":after, :host(.").concat(et.Y2,") &").concat(y?":focus":"",":after")]={content:'""',position:"absolute",pointerEvents:m,left:u+1,top:u+1,bottom:u+1,right:u+1,border:"".concat(l,"px solid ").concat(v),outline:"".concat(l,"px solid ").concat(p),zIndex:nt.FocusStyle,borderRadius:r,selectors:(e={},e[it]=f,e)},i)}}(t,"number"!=typeof n&&n?n:{inset:n,position:i,highContrastStyle:e,borderColor:r,outlineColor:o,isFocusedOnly:u,borderRadius:a})}function ot(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(t){t.Nav=1,t.ScrollablePane=1,t.FocusStyle=1,t.Coachmark=1e3,t.Layer=1e6,t.KeytipLayer=1000001}(nt||(nt={}));var ut,at=i(823),lt=i(338),st=i(540),ct=function(){return ct=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},ct.apply(this,arguments)},ft="undefined"==typeof window?i.g:window,dt=ft&&ft.CSPSettings&&ft.CSPSettings.nonce,vt=((ut=ft.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]}).runState||(ut=ct({},ut,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),ut.registeredThemableStyles||(ut=ct({},ut,{registeredThemableStyles:[]})),ft.__themeState__=ut,ut);function ht(t){vt.theme=t,function(){if(vt.theme){for(var t=[],n=0,i=vt.registeredThemableStyles;n<i.length;n++){var e=i[n];t.push(e.themableStyle)}t.length>0&&(void 0===(o=1)&&(o=3),3!==o&&2!==o||(pt(vt.registeredStyles),vt.registeredStyles=[]),3!==o&&1!==o||(pt(vt.registeredThemableStyles),vt.registeredThemableStyles=[]),r=[].concat.apply([],t),vt.loadStyles?vt.loadStyles(gt(r).styleString,r):function(t){if("undefined"!=typeof document){var n=document.getElementsByTagName("head")[0],i=document.createElement("style"),e=gt(t),r=e.styleString,o=e.themable;i.setAttribute("data-load-themed-styles","true"),i.type="text/css",dt&&i.setAttribute("nonce",dt),i.appendChild(document.createTextNode(r)),vt.perf.count++,n.appendChild(i);var u=document.createEvent("HTMLEvents");u.initEvent("styleinsert",!0,!1),u.args={newStyle:i},document.dispatchEvent(u);var a={styleElement:i,themableStyle:t};o?vt.registeredThemableStyles.push(a):vt.registeredStyles.push(a)}}(r))}var r,o}()}function pt(t){t.forEach((function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)}))}function gt(t){var n=vt.theme,i=!1;return{styleString:(t||[]).map((function(t){var e=t.theme;if(e){i=!0;var r=n?n[e]:void 0,o=t.defaultValue||"inherit";return n&&!r&&console&&!(e in n)&&"undefined"!=typeof DEBUG&&DEBUG&&console.warn('Theming value not provided for "'+e+'". Falling back to "'+o+'".'),r||o}return t.rawString})).join(""),themable:i}}var yt=i(143),mt=(0,yt.a)({}),bt=[],xt="theme";function wt(){var t,n,i,e=(0,lt.z)();(null===(n=null==e?void 0:e.FabricConfig)||void 0===n?void 0:n.legacyTheme)?function(t,n){var i;void 0===n&&(n=!1),mt=(0,yt.a)(t,n),ht((0,at.Cl)((0,at.Cl)((0,at.Cl)((0,at.Cl)({},mt.palette),mt.semanticColors),mt.effects),function(t){for(var n={},i=0,e=Object.keys(t.fonts);i<e.length;i++)for(var r=e[i],o=t.fonts[r],u=0,a=Object.keys(o);u<a.length;u++){var l=a[u],s=r+l.charAt(0).toUpperCase()+l.slice(1),c=o[l];"fontSize"===l&&"number"==typeof c&&(c+="px"),n[s]=c}return n}(mt))),st.X.applySettings(((i={})[xt]=mt,i)),bt.forEach((function(t){try{t(mt)}catch(t){}}))}(e.FabricConfig.legacyTheme):st.X.getSettings([xt]).theme||((null===(i=null==e?void 0:e.FabricConfig)||void 0===i?void 0:i.theme)&&(mt=(0,yt.a)(e.FabricConfig.theme)),st.X.applySettings(((t={})[xt]=mt,t)))}function Ct(t){return void 0===t&&(t=!1),!0===t&&(mt=(0,yt.a)({},t)),mt}wt();var Mt=i(302),kt=i(41);(0,i(887).v)("@fluentui/style-utilities","8.12.3"),wt()},468:function(t,n,i){i.d(n,{G:function(){return r},S:function(){return o}});var e=i(338);function r(t){var n=null;try{var i=(0,e.z)();n=i?i.sessionStorage.getItem(t):null}catch(t){}return n}function o(t,n){var i;try{null===(i=(0,e.z)())||void 0===i||i.sessionStorage.setItem(t,n)}catch(t){}}},506:function(t,n,i){i.d(n,{T:function(){return o}});var e=i(823),r=i(638);function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t&&1===t.length&&t[0]&&!t[0].subComponentStyles&&!(0,r.db)(t[0]))return t[0];for(var i={},u={},a=0,l=t;a<l.length;a++){var s=l[a];if(s&&!(0,r.db)(s))for(var c in s)if(s.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==s.subComponentStyles){var f=s.subComponentStyles;for(var d in f)f.hasOwnProperty(d)&&(u.hasOwnProperty(d)?u[d].push(f[d]):u[d]=[f[d]]);continue}var v=i[c],h=s[c];i[c]=void 0===v?h:(0,e.fX)((0,e.fX)([],Array.isArray(v)?v:[v],!0),Array.isArray(h)?h:[h],!0)}}if(Object.keys(u).length>0){i.subComponentStyles={};var p=i.subComponentStyles,g=function(t){if(u.hasOwnProperty(t)){var n=u[t];p[t]=function(t){return o.apply(void 0,n.map((function(n){return"function"==typeof n?n(t):n})))}}};for(var d in u)g(d)}return i}},517:function(t,n,i){i.d(n,{Y2:function(){return e}});var e="ms-Fabric--isFocusVisible"},540:function(t,n,i){i.d(n,{X:function(){return h}});var e=i(823),r=i(338),o="__globalSettings__",u="__callbacks__",a=0,l=function(){function t(){}return t.getValue=function(t,n){var i=s();return void 0===i[t]&&(i[t]="function"==typeof n?n():n),i[t]},t.setValue=function(t,n){var i=s(),e=i[u],r=i[t];if(n!==r){i[t]=n;var o={oldValue:r,value:n,key:t};for(var a in e)e.hasOwnProperty(a)&&e[a](o)}return n},t.addChangeListener=function(t){var n=t.__id__,i=c();n||(n=t.__id__=String(a++)),i[n]=t},t.removeChangeListener=function(t){delete c()[t.__id__]},t}();function s(){var t,n=(0,r.z)()||{};return n[o]||(n[o]=((t={})[u]={},t)),n[o]}function c(){return s()[u]}var f={settings:{},scopedSettings:{},inCustomizerContext:!1},d=l.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),v=[],h=function(){function t(){}return t.reset=function(){d.settings={},d.scopedSettings={}},t.applySettings=function(n){d.settings=(0,e.Cl)((0,e.Cl)({},d.settings),n),t._raiseChange()},t.applyScopedSettings=function(n,i){d.scopedSettings[n]=(0,e.Cl)((0,e.Cl)({},d.scopedSettings[n]),i),t._raiseChange()},t.getSettings=function(t,n,i){void 0===i&&(i=f);for(var e={},r=n&&i.scopedSettings[n]||{},o=n&&d.scopedSettings[n]||{},u=0,a=t;u<a.length;u++){var l=a[u];e[l]=r[l]||i.settings[l]||o[l]||d.settings[l]}return e},t.applyBatchedUpdates=function(n,i){t._suppressUpdates=!0;try{n()}catch(t){}t._suppressUpdates=!1,i||t._raiseChange()},t.observe=function(t){v.push(t)},t.unobserve=function(t){v=v.filter((function(n){return n!==t}))},t._raiseChange=function(){t._suppressUpdates||v.forEach((function(t){return t()}))},t}()},543:function(t,n,i){i.d(n,{Y:function(){return r}});var e=i(921);function r(t){if((0,e.S)()&&"undefined"!=typeof document){var n=t;return n&&n.ownerDocument?n.ownerDocument:document}}},566:function(t,n,i){i.d(n,{I:function(){return v}});var e=i(823),r=i(594),o=i(506),u=i(638),a=function(){return!1},l=function(){},s=r.createContext({stylesheets:new Map,useAdoptedStylesheetEx:a,useAdoptedStylesheet:a,useShadowConfig:function(){return u.ou},useMergeStylesShadowRootContext:l,useHasMergeStylesShadowRootContext:a,useMergeStylesRootStylesheets:function(){return new Map},useWindow:l,useStyled:l}),c=function(){var t=r.useContext(s);return{useAdoptedStylesheet:t.useAdoptedStylesheet,useAdoptedStylesheetEx:t.useAdoptedStylesheetEx,useShadowConfig:t.useShadowConfig,useMergeStylesShadowRootContext:t.useMergeStylesShadowRootContext,useHasMergeStylesShadowRootContext:t.useHasMergeStylesShadowRootContext,useMergeStylesRootStylesheets:t.useMergeStylesRootStylesheets,useWindow:t.useWindow,useStyled:t.useStyled}},f=i(927),d=["theme","styles"];function v(t,n,i,u,a){var l=(u=u||{scope:"",fields:void 0}).scope,s=u.fields,v=void 0===s?d:s,h=r.forwardRef((function(u,a){var s=r.useRef(),d=(0,f.m)(v,l),h=d.styles,p=(d.dir,(0,e.Tt)(d,["styles","dir"])),g=i?i(u):void 0,y=c().useStyled,m=s.current&&s.current.__cachedInputs__||[],b=u.styles;if(!s.current||h!==m[1]||b!==m[2]){var x=function(t){return function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var e=[],r=0,u=n;r<u.length;r++){var a=u[r];a&&e.push("function"==typeof a?a(t):a)}return 1===e.length?e[0]:e.length?o.T.apply(void 0,e):{}}(t,n,h,b)};x.__cachedInputs__=[n,h,b],x.__noStyleOverride__=!h&&!b,s.current=x}return s.current.__shadowConfig__=y(l),r.createElement(t,(0,e.Cl)({ref:a},p,g,u,{styles:s.current}))}));h.displayName="Styled".concat(t.displayName||t.name);var p=a?r.memo(h):h;return h.displayName&&(p.displayName=h.displayName),p}},594:function(t){t.exports=React},638:function(t,n,i){i.d(n,{P6:function(){return e},Se:function(){return r},db:function(){return u},ou:function(){return o}});var e="__global__",r="__shadow_dom_stylesheet__",o={stylesheetKey:e,inShadow:!1,window:void 0,__isShadowConfig__:!0},u=function(t){return!(!t||!function(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}(t))&&!0===t.__isShadowConfig__}},753:function(t,n,i){i.d(n,{J5:function(){return f},J9:function(){return c}});var e=i(40),r=!1,o=0,u={empty:!0},a={},l="undefined"==typeof WeakMap?null:WeakMap;function s(){o++}function c(t,n,i){if(void 0===n&&(n=100),void 0===i&&(i=!1),!l)return t;if(!r){var c=e.nr.getInstance();c&&c.onReset&&e.nr.getInstance().onReset(s),r=!0}var f,v=0,h=o;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var l,s=f;(void 0===f||h!==o||n>0&&v>n)&&(f=d(),v=0,h=o),s=f;for(var c=0;c<e.length;c++){var p=(l=e[c])?"object"==typeof l||"function"==typeof l?l:(a[l]||(a[l]={val:l}),a[l]):u;s.map.has(p)||s.map.set(p,d()),s=s.map.get(p)}return s.hasOwnProperty("value")||(s.value=t.apply(void 0,e),v++),!i||null!==s.value&&void 0!==s.value||(s.value=t.apply(void 0,e)),s.value}}function f(t){if(!l)return t;var n=new l;return function(i){if(!i||"function"!=typeof i&&"object"!=typeof i)return t(i);if(n.has(i))return n.get(i);var e=t(i);return n.set(i,e),e}}function d(){return{map:l?new l:null}}},770:function(t,n,i){i.d(n,{z:function(){return e}});var e=i(594).createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},800:function(t,n,i){i.d(n,{DU:function(){return o},Iy:function(){return a}});var e,r=i(638);function o(t){e!==t&&(e=t)}function u(){return void 0===e&&(e="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),e}function a(){return{rtl:u(),shadowConfig:r.ou}}e=u()},823:function(t,n,i){i.d(n,{C6:function(){return r},Cl:function(){return o},Tt:function(){return u},fX:function(){return a}});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var o=function(){return o=Object.assign||function(t){for(var n,i=1,e=arguments.length;i<e;i++)for(var r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},o.apply(this,arguments)};function u(t,n){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(i[e[r]]=t[e[r]])}return i}function a(t,n,i){if(i||2===arguments.length)for(var e,r=0,o=n.length;r<o;r++)!e&&r in n||(e||(e=Array.prototype.slice.call(n,0,r)),e[r]=n[r]);return t.concat(e||Array.prototype.slice.call(n))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},873:function(t,n,i){i.d(n,{Z:function(){return g}});var e=i(40),r=i(823),o=i(506),u=i(962),a=i(289),l=i(638);var s=i(259),c=i(338),f=50,d=5,v=0,h=e.nr.getInstance();h&&h.onReset&&h.onReset((function(){return v++}));var p="__retval__";function g(t){void 0===t&&(t={});var n=new Map,i=0,h=0,g=v;return function(y,b){var x;if(void 0===b&&(b={}),t.useStaticStyles&&"function"==typeof y&&y.__noStyleOverride__)return y(b);h++;var w=y?y.__shadowConfig__:void 0,C=w&&w.window?w.window:"__default__";n.has(C)||n.set(C,new Map);var M=n.get(C),k=b.theme,A=k&&void 0!==k.rtl?k.rtl:(0,s.jI)(),S=t.disableCaching;if(g!==v&&(g=v,n.set(C,new Map),M=n.get(C),i=0),t.disableCaching||(M=m(n.get(C),y),M=m(M,b)),!S&&M[p]||(M[p]=void 0===y?{}:function(t,n){var i,s={subComponentStyles:{}},c=void 0;(0,l.db)(t[0])?(c=t[0],i=t[1]):i=t[0],null!=c||(c=null==n?void 0:n.shadowConfig);var f=(0,r.Cl)((0,r.Cl)({},n),{shadowConfig:c});if(!i&&t.length<=1)return{subComponentStyles:{}};var d=e.nr.getInstance(c);f.stylesheet=d;var v=o.T.apply(void 0,t),h=[];for(var p in v)if(v.hasOwnProperty(p)){if("subComponentStyles"===p){s.subComponentStyles=v.subComponentStyles||{};continue}if("__shadowConfig__"===p)continue;var g=v[p],y=(0,u.h)(d,g),m=y.classes,b=y.objects;(null==b?void 0:b.length)?(C=(0,a.GJ)(f||{},{displayName:p},b))&&(h.push(C),s[p]=m.concat([C.className]).join(" ")):s[p]=m.join(" ")}for(var x=0,w=h;x<w.length;x++){var C;(C=w[x])&&(0,a.Ae)(C,null==n?void 0:n.specificityMultiplier,c)}return s}(["function"==typeof y?y(b):y],{shadowConfig:y.__shadowConfig__,rtl:!!A,specificityMultiplier:t.useStaticStyles?d:void 0}),S||i++),i>(t.cacheSize||f)){var L=(0,c.z)();(null===(x=null==L?void 0:L.FabricConfig)||void 0===x?void 0:x.enableClassNameCacheFullWarning)&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(i,"/").concat(h,".")),console.trace()),n.get(C).clear(),i=0,t.disableCaching=!0}return M[p]}}function y(t,n){return n=function(t){switch(t){case void 0:return"__undefined__";case null:return"__null__";default:return t}}(n),t.has(n)||t.set(n,new Map),t.get(n)}function m(t,n){if("function"==typeof n)if(n.__cachedInputs__)for(var i=0,e=n.__cachedInputs__;i<e.length;i++)t=y(t,e[i]);else t=y(t,n);else if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&(t=y(t,n[r]));return t}},887:function(t,n,i){i.d(n,{v:function(){return o}});var e={},r=void 0;try{r=window}catch(t){}function o(t,n){if(void 0!==r){var i=r.__packages__=r.__packages__||{};i[t]&&e[t]||(e[t]=n,(i[t]=i[t]||[]).push(n))}}o("@fluentui/set-version","6.0.0")},916:function(t,n,i){i.d(n,{Z:function(){return l}});var e=i(962),r=i(638),o=i(800),u=i(40),a=i(289);function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(t,n){var i=t instanceof Array?t:[t],o=n||{};(0,r.db)(i[0])&&(o.shadowConfig=i[0]),o.stylesheet=u.nr.getInstance(o.shadowConfig);var l=(0,e.h)(o.stylesheet,i),s=l.classes,c=l.objects;return c.length&&s.push((0,a.kG)(o,c)),s.join(" ")}(t,(0,o.Iy)())}},921:function(t,n,i){function e(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}i.d(n,{S:function(){return e}})},927:function(t,n,i){i.d(n,{m:function(){return u}});var e=i(594),r=i(540),o=i(770);function u(t,n){var i,u=(i=e.useState(0)[1],function(){return i((function(t){return++t}))}),a=e.useContext(o.z).customizations,l=a.inCustomizerContext;return e.useEffect((function(){return l||r.X.observe(u),function(){l||r.X.unobserve(u)}}),[l]),r.X.getSettings(t,n,a)}},962:function(t,n,i){i.d(n,{h:function(){return r}});var e=i(638);function r(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=[],o=[],u=t;return function t(n){for(var i=0,a=n;i<a.length;i++){var l=a[i];if(l&&!(0,e.db)(l))if("string"==typeof l)if(l.indexOf(" ")>=0)t(l.split(" "));else{var s=u.argsFromClassName(l);s?t(s):-1===r.indexOf(l)&&r.push(l)}else Array.isArray(l)?t(l):"object"==typeof l&&o.push(l)}}(n),{classes:r,objects:o}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,{a:n}),n},i.d=function(t,n){for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};i.r(e),i.d(e,{AreaChart:function(){return Bv},CartesianChart:function(){return qd},ChartHoverCard:function(){return Js.ChartHoverCard},ChartTable:function(){return bp},DataVizGradientPalette:function(){return Qs},DataVizPalette:function(){return Xl},DeclarativeChart:function(){return ey},DonutChart:function(){return _d},FunnelChart:function(){return Vp},GanttChart:function(){return Wg},GaugeChart:function(){return Fp},GaugeChartVariant:function(){return Lp},GaugeValueFormat:function(){return Sp},GroupedVerticalBarChart:function(){return vh},HeatMapChart:function(){return yh},HorizontalBarChart:function(){return jc},HorizontalBarChartVariant:function(){return v},HorizontalBarChartWithAxis:function(){return Cp},Legends:function(){return jf},LineChart:function(){return pv},MultiStackedBarChart:function(){return qv},MultiStackedBarChartVariant:function(){return Wv},NodesComposition:function(){return jh},PieChart:function(){return jv},ResponsiveContainer:function(){return _g},SankeyChart:function(){return qh},ScatterChart:function(){return mv},Shape:function(){return Bf},Sparkline:function(){return pp},StackedBarChart:function(){return Kv},Textbox:function(){return av},TreeChart:function(){return fp},TreeTraverse:function(){return Yh},VerticalBarChart:function(){return uh},VerticalStackedBarChart:function(){return sh},getChartHoverCardStyles:function(){return hh.J},getColorFromToken:function(){return Ql},getGradientFromToken:function(){return uc},getNextColor:function(){return Jl},getNextGradient:function(){return oc},withResponsiveContainer:function(){return Hg}});var r=i(566),o=i(823),u=i(594),a=i(873),l=i(259),s=i(338),c=i(40),f="__currentId__",d=(0,s.z)()||{};void 0===d[f]&&(d[f]=0);var v,h=!1;function p(t){if(!h){var n=c.nr.getInstance();n&&n.onReset&&n.onReset(g),h=!0}return(void 0===t?"id__":t)+d[f]++}function g(t){void 0===t&&(t=0),d[f]=t}function y(t,n,i){void 0===i&&(i=0);for(var e=-1,r=i;t&&r<t.length;r++)if(n(t[r],r)){e=r;break}return e}function m(t,n){var i=y(t,n);if(!(i<0))return t[i]}!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(v||(v={}));function b(t,n){var i,e;if(void 0===n&&(n=!0),!t)return null;var r=n&&function(t){var n,i;return t&&(i=t)&&i._virtual&&(n=t._virtual.parent),n}(t);return r||("function"!=typeof t.assignedElements&&(null===(i=t.assignedSlot)||void 0===i?void 0:i.parentNode)?t.assignedSlot:11===(null===(e=t.parentNode)||void 0===e?void 0:e.nodeType)?t.parentNode.host:t.parentNode)}function x(t,n,i){return null!=i||(i=document),!t||t===i.body||t instanceof Document?null:n(t)?t:x(b(t),n)}function w(t,n,i){void 0===i&&(i=!0);var e=!1;if(t&&n)if(i)if(t===n)e=!0;else for(e=!1;n;){var r=b(n);if(r===t){e=!0;break}n=r}else t.contains&&(e=t.contains(n));return e}var C=i(543);function M(t,n,i){var e=A(t,t,!0,!1,!1,!0,void 0,void 0,n,i);return!!e&&(T(e),!0)}function k(t,n,i,e,r,o,u,a,l){var s;if(!n||!u&&n===t)return null;var c=S(n);if(r&&c&&(o||!D(n)&&!N(n))){var f=k(t,n.lastElementChild||l&&(null===(s=n.shadowRoot)||void 0===s?void 0:s.lastElementChild),!0,!0,!0,o,u,a,l);if(f){if(a&&V(f,!0,l)||!a)return f;var d=k(t,f.previousElementSibling,!0,!0,!0,o,u,a,l);if(d)return d;for(var v=f.parentElement;v&&v!==n;){var h=k(t,v.previousElementSibling,!0,!0,!0,o,u,a,l);if(h)return h;v=v.parentElement}}}return i&&c&&V(n,a,l)?n:k(t,n.previousElementSibling,!0,!0,!0,o,u,a,l)||(e?null:k(t,n.parentElement,!0,!1,!1,o,u,a,l))}function A(t,n,i,e,r,o,u,a,l,s){var c;if(!n||n===t&&r&&!u)return null;var f=(l?L:S)(n);if(i&&f&&V(n,a,s))return n;if(!r&&f&&(o||!D(n)&&!N(n))){var d=A(t,n.firstElementChild||s&&(null===(c=n.shadowRoot)||void 0===c?void 0:c.firstElementChild),!0,!0,!1,o,u,a,l,s);if(d)return d}return n===t?null:A(t,n.nextElementSibling,!0,!0,!1,o,u,a,l,s)||(e?null:A(t,n.parentElement,!1,!1,!0,o,u,a,l,s))}function S(t){if(!t||!t.getAttribute)return!1;var n=t.getAttribute("data-is-visible");return null!=n?"true"===n:0!==t.offsetHeight||null!==t.offsetParent||!0===t.isVisible}function L(t,n){var i=null!=n?n:(0,s.z)();return!!t&&S(t)&&!t.hidden&&"hidden"!==i.getComputedStyle(t).visibility}function V(t,n,i){if(void 0===i&&(i=!0),!t||t.disabled)return!1;var e=0,r=null;t&&t.getAttribute&&(r=t.getAttribute("tabIndex"))&&(e=parseInt(r,10));var o=t.getAttribute?t.getAttribute("data-is-focusable"):null,u=null!==r&&e>=0,a=!(!i||!t.shadowRoot||!t.shadowRoot.delegatesFocus),l=!!t&&"false"!==o&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||"true"===o||u||a);return n?-1!==e&&l:l}function D(t){return!!(t&&t.getAttribute&&t.getAttribute("data-focuszone-id"))}function N(t){return!(!t||!t.getAttribute||"true"!==t.getAttribute("data-is-sub-focuszone"))}var O=void 0;function T(t){if(t){var n=(0,s.z)(t);n&&(void 0!==O&&n.cancelAnimationFrame(O),O=n.requestAnimationFrame((function(){t&&t.focus(),O=void 0})))}}function E(t,n,i,e){return t.addEventListener(n,i,e),function(){return t.removeEventListener(n,i,e)}}function F(t,n){for(var i=(0,o.Cl)({},n),e=0,r=Object.keys(t);e<r.length;e++){var u=r[e];void 0===i[u]&&(i[u]=t[u])}return i}var B=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i={},e=0,r=t;e<r.length;e++)for(var o=r[e],u=0,a=Array.isArray(o)?o:Object.keys(o);u<a.length;u++)i[a[u]]=1;return i},P=B(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),_=B(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),H=B(_,P),I=(B(H,["form"]),B(H,["height","loop","muted","preload","src","width"])),W=(B(I,["poster"]),B(H,["start"]),B(H,["value"]),B(H,["download","href","hrefLang","media","rel","target","type"]),B(H,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"])),R=(B(W,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),B(W,["autoCapitalize","cols","dirname","form","maxLength","minLength","placeholder","readOnly","required","rows","wrap"]),B(W,["form","multiple","required"]),B(H,["selected","value"]),B(H,["cellPadding","cellSpacing"]),B(H,["rowSpan","scope"]),B(H,["colSpan","headers","rowSpan","scope"]),B(H,["span"]),B(H,["span"]),B(H,["acceptCharset","action","encType","encType","method","noValidate","target"]),B(H,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),B(H,["alt","crossOrigin","height","src","srcSet","useMap","width"]),H);function $(t,n,i){for(var e=Array.isArray(n),r={},o=0,u=Object.keys(t);o<u.length;o++){var a=u[o];!(!e&&n[a]||e&&n.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||i&&-1!==(null==i?void 0:i.indexOf(a))||(r[a]=t[a])}return r}function z(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=[],e=0,r=t;e<r.length;e++){var o=r[e];if(o)if("string"==typeof o)i.push(o);else if(o.hasOwnProperty("toString")&&"function"==typeof o.toString)i.push(o.toString());else for(var u in o)o[u]&&i.push(u)}return i.join(" ")}function j(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return Y.apply(this,[null,t].concat(n))}function Y(t,n){for(var i=[],e=2;e<arguments.length;e++)i[e-2]=arguments[e];n=n||{};for(var r=0,o=i;r<o.length;r++){var u=o[r];if(u)for(var a in u)!u.hasOwnProperty(a)||t&&!t(a)||(n[a]=u[a])}return n}var X,G,q,U=i(916),Z=((0,U.Z)({overflow:"hidden !important"}),"data-is-scrollable");function K(t){for(var n=t,i=(0,C.Y)(t);n&&n!==i.body;){if("true"===n.getAttribute(Z))return n;n=n.parentElement}for(n=t;n&&n!==i.body;){if("false"!==n.getAttribute(Z)){var e=getComputedStyle(n),r=e?e.getPropertyValue("overflow-y"):"";if(r&&("scroll"===r||"auto"===r))return n}n=n.parentElement}return n&&n!==i.body||(n=(0,s.z)(t)),n}!function(t){t[t.top=1]="top",t[t.bottom=-1]="bottom",t[t.left=2]="left",t[t.right=-2]="right"}(G||(G={})),function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.start=2]="start",t[t.end=3]="end"}(q||(q={}));var J,Q=function(){function t(t,n,i,e){void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===e&&(e=0),this.top=i,this.bottom=e,this.left=t,this.right=n}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),t.prototype.equals=function(t){return parseFloat(this.top.toFixed(4))===parseFloat(t.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(t.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(t.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(t.right.toFixed(4))},t}();function tt(t,n,i){return{targetEdge:t,alignmentEdge:n,isAuto:i}}var nt=((J={})[0]=tt(G.top,G.left),J[1]=tt(G.top),J[2]=tt(G.top,G.right),J[3]=tt(G.top,void 0,!0),J[4]=tt(G.bottom,G.left),J[5]=tt(G.bottom),J[6]=tt(G.bottom,G.right),J[7]=tt(G.bottom,void 0,!0),J[8]=tt(G.left,G.top),J[9]=tt(G.left),J[10]=tt(G.left,G.bottom),J[11]=tt(G.right,G.top),J[12]=tt(G.right),J[13]=tt(G.right,G.bottom),J);function it(t,n){return!(t.top<n.top||t.bottom>n.bottom||t.left<n.left||t.right>n.right)}function et(t,n){var i=[];return t.top<n.top&&i.push(G.top),t.bottom>n.bottom&&i.push(G.bottom),t.left<n.left&&i.push(G.left),t.right>n.right&&i.push(G.right),i}function rt(t,n){return t[G[n]]}function ot(t,n,i){return t[G[n]]=i,t}function ut(t,n){var i=mt(n);return(rt(t,i.positiveEdge)+rt(t,i.negativeEdge))/2}function at(t,n){return t>0?n:-1*n}function lt(t,n){return at(t,rt(n,t))}function st(t,n,i){return at(i,rt(t,i)-rt(n,i))}function ct(t,n,i,e){void 0===e&&(e=!0);var r=rt(t,n)-i,o=ot(t,n,i);return e&&(o=ot(t,-1*n,rt(t,-1*n)-r)),o}function ft(t,n,i,e){return void 0===e&&(e=0),ct(t,i,rt(n,i)+at(i,e))}function dt(t,n,i){return lt(i,t)>lt(i,n)}function vt(t,n){for(var i=0,e=0,r=et(t,n);e<r.length;e++){var o=r[e];i+=Math.pow(st(t,n,o),2)}return i}function ht(t,n,i,e){return void 0===e&&(e=200),(i===G.bottom||i===G.top)&&st(t,n,i)>=e}function pt(t,n,i,e){for(var r=0,o=t;r<o.length;r++){var u=o[r],a=void 0;e&&e===-1*u?(a=ct(n.elementRectangle,u,rt(i,u),!1),n.forcedInBounds=!0):dt(a=ft(n.elementRectangle,i,u),i,-1*u)||(a=ct(a,-1*u,rt(i,-1*u),!1),n.forcedInBounds=!0),n.elementRectangle=a}return n}function gt(t,n,i){var e=mt(n).positiveEdge;return ct(t,e,i-(ut(t,n)-rt(t,e)))}function yt(t,n,i,e,r){void 0===e&&(e=0);var o=new Q(t.left,t.right,t.top,t.bottom),u=i.alignmentEdge,a=i.targetEdge,l=r?a:-1*a;return o=r?ft(o,n,a,e):function(t,n,i,e){void 0===e&&(e=0);var r=at(-1*i,e);return ct(t,-1*i,rt(n,i)+r)}(o,n,a,e),o=u?ft(o,n,u):gt(o,l,ut(n,a))}function mt(t){return t===G.top||t===G.bottom?{positiveEdge:G.left,negativeEdge:G.right}:{positiveEdge:G.top,negativeEdge:G.bottom}}function bt(t,n,i){return i&&Math.abs(st(t,i,n))>Math.abs(st(t,i,-1*n))?-1*n:n}function xt(t,n,i,e,r,o,u,a){var l,s={},c=Mt(n),f=o?i:-1*i,d=r||mt(i).positiveEdge;return u&&!function(t,n,i){return void 0!==i&&rt(t,n)===rt(i,n)}(t,(l=d,-1*l),e)||(d=bt(t,d,e)),s[G[f]]=st(t,c,f),s[G[d]]=st(t,c,d),a&&(s[G[-1*f]]=st(t,c,-1*f),s[G[-1*d]]=st(t,c,-1*d)),s}function wt(t,n,i){var e=ut(n,t),r=ut(i,t),o=mt(t),u=o.positiveEdge,a=o.negativeEdge;return e<=r?u:a}function Ct(t,n,i,e,r,o,u,a,s){void 0===o&&(o=!1);var c=yt(t,n,e,r,s);return it(c,i)?{elementRectangle:c,targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}:function(t,n,i,e,r,o,u,a,s){void 0===r&&(r=!1),void 0===u&&(u=0);var c=e.alignmentEdge,f=e.alignTargetEdge,d={elementRectangle:t,targetEdge:e.targetEdge,alignmentEdge:c};a||s||(d=function(t,n,i,e,r,o,u){void 0===r&&(r=!1),void 0===u&&(u=0);var a=[G.left,G.right,G.bottom,G.top];(0,l.jI)()&&(a[0]*=-1,a[1]*=-1);for(var s,c=t,f=e.targetEdge,d=e.alignmentEdge,v=f,h=d,p=0;p<4;p++){if(dt(c,i,f))return{elementRectangle:c,targetEdge:f,alignmentEdge:d};if(r&&ht(n,i,f,o)){switch(f){case G.bottom:c.bottom=i.bottom;break;case G.top:c.top=i.top}return{elementRectangle:c,targetEdge:f,alignmentEdge:d,forcedInBounds:!0}}var g=vt(c,i);(!s||g<s)&&(s=g,v=f,h=d),a.splice(a.indexOf(f),1),a.length>0&&(a.indexOf(-1*f)>-1?f*=-1:(d=f,f=a.slice(-1)[0]),c=yt(t,n,{targetEdge:f,alignmentEdge:d},u))}return{elementRectangle:c=yt(t,n,{targetEdge:v,alignmentEdge:h},u),targetEdge:v,alignmentEdge:h}}(t,n,i,e,r,o,u));var v=et(d.elementRectangle,i),h=a?-d.targetEdge:void 0;if(v.length>0)if(f)if(d.alignmentEdge&&v.indexOf(-1*d.alignmentEdge)>-1){var p=function(t,n,i,e){var r=t.alignmentEdge,o=t.targetEdge,u=-1*r;return{elementRectangle:yt(t.elementRectangle,n,{targetEdge:o,alignmentEdge:u},i,e),targetEdge:o,alignmentEdge:u}}(d,n,u,s);if(it(p.elementRectangle,i))return p;d=pt(et(p.elementRectangle,i),d,i,h)}else d=pt(v,d,i,h);else d=pt(v,d,i,h);return d}(c,n,i,e,o,u,r,a,s)}function Mt(t){var n=t.getBoundingClientRect();return new Q(n.left,n.right,n.top,n.bottom)}function kt(t,n,i,e,r,u){void 0===r&&(r=!1);var a=t.gapSpace?t.gapSpace:0,s=function(t,n){var i;if(n){if(n.preventDefault){var e=n;i=new Q(e.clientX,e.clientX,e.clientY,e.clientY)}else if(n.getBoundingClientRect)i=Mt(n);else{var r=n,o=r.left||r.x,u=r.top||r.y,a=r.right||o,l=r.bottom||u;i=new Q(o,a,u,l)}if(!it(i,t))for(var s=0,c=et(i,t);s<c.length;s++){var f=c[s];i[G[f]]=t[G[f]]}}else i=new Q(0,0,0,0);return i}(i,t.target),c=function(t,n,i,e,r){return t.isAuto&&(t.alignmentEdge=wt(t.targetEdge,n,i)),t.alignTargetEdge=r,t}(function(t,n,i){if(void 0===t&&(t=7),i)return{alignmentEdge:i.alignmentEdge,isAuto:i.isAuto,targetEdge:i.targetEdge};var e=(0,o.Cl)({},nt[t]);return(0,l.jI)()?(e.alignmentEdge&&e.alignmentEdge%2==0&&(e.alignmentEdge=-1*e.alignmentEdge),void 0!==n?nt[n]:e):e}(t.directionalHint,t.directionalHintForRTL,e),s,i,t.coverTarget,t.alignTargetEdge),f=Ct(Mt(n),s,i,c,a,r,u,t.directionalHintFixed,t.coverTarget);return(0,o.Cl)((0,o.Cl)({},f),{targetRectangle:s})}function At(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=0),function(t){return Math.sqrt(t*t*2)}(t?n:0)/2+i}function St(t,n,i,e,r,u,a,l){void 0===r&&(r=!1);var c=null!=l?l:(0,s.z)(),f=t.isBeakVisible&&t.beakWidth||0,d=At(t.isBeakVisible,t.beakWidth,t.gapSpace),v=t;v.gapSpace=d;var h,p,g,y,m,b,x,w,M,k=t.bounds?(M=t.bounds,new Q(M.left,M.right,M.top,M.bottom)):new Q(0,c.innerWidth-function(){if(void 0===X){var t=(0,C.Y)(),n=t.createElement("div");n.style.setProperty("width","100px"),n.style.setProperty("height","100px"),n.style.setProperty("overflow","scroll"),n.style.setProperty("position","absolute"),n.style.setProperty("top","-9999px"),t.body.appendChild(n),X=n.offsetWidth-n.clientWidth,t.body.removeChild(n)}return X}(),0,c.innerHeight),A=kt(v,i,k,e,r,u),S=(h=A,p=function(t,n){var i=n.targetRectangle,e=mt(n.targetEdge),r=e.positiveEdge,o=e.negativeEdge,u=ut(i,n.targetEdge),a=new Q(t/2,n.elementRectangle.width-t/2,t/2,n.elementRectangle.height-t/2),l=new Q(0,t,0,t);return dt(l=gt(l=ct(l,-1*n.targetEdge,-t/2),-1*n.targetEdge,u-lt(r,n.elementRectangle)),a,r)?dt(l,a,o)||(l=ft(l,a,o)):l=ft(l,a,r),l}(f,A),g=k,y=-1*h.targetEdge,m=new Q(0,h.elementRectangle.width,0,h.elementRectangle.height),b={},x=bt(h.elementRectangle,h.alignmentEdge?h.alignmentEdge:mt(y).positiveEdge,g),w=st(h.elementRectangle,h.targetRectangle,y)>Math.abs(rt(p,y)),b[G[y]]=rt(p,y),b[G[x]]=st(p,m,x),{elementPosition:(0,o.Cl)({},b),closestEdge:wt(h.targetEdge,p,m),targetEdge:y,hideBeak:!w});return(0,o.Cl)((0,o.Cl)({},function(t,n,i,e,r){return{elementPosition:xt(t.elementRectangle,n,t.targetEdge,i,t.alignmentEdge,e,r,t.forcedInBounds),targetEdge:t.targetEdge,alignmentEdge:t.alignmentEdge}}(A,n,k,t.coverTarget,a)),{beakPosition:S})}var Lt=["TEMPLATE","STYLE","SCRIPT"];function Vt(t){var n=(0,C.Y)(t);if(!n)return function(){};for(var i=[];t!==n.body&&t.parentElement;){for(var e=0,r=t.parentElement.children;e<r.length;e++){var o=r[e],u=o.getAttribute("aria-hidden");o!==t&&"true"!==(null==u?void 0:u.toLowerCase())&&-1===Lt.indexOf(o.tagName)&&i.push([o,u])}t=t.parentElement}return i.forEach((function(t){t[0].setAttribute("aria-hidden","true")})),function(){!function(t){t.forEach((function(t){var n=t[0],i=t[1];i?n.setAttribute("aria-hidden",i):n.removeAttribute("aria-hidden")}))}(i),i=[]}}var Dt=27,Nt=function(){function t(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return t.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},t.prototype.setTimeout=function(t,n){var i=this,e=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),e=setTimeout((function(){try{i._timeoutIds&&delete i._timeoutIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._timeoutIds[e]=!0),e},t.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},t.prototype.setImmediate=function(t,n){var i=this,e=0,r=(0,s.z)(n);return this._isDisposed||(this._immediateIds||(this._immediateIds={}),e=r.setTimeout((function(){try{i._immediateIds&&delete i._immediateIds[e],t.apply(i._parent)}catch(t){i._logError(t)}}),0),this._immediateIds[e]=!0),e},t.prototype.clearImmediate=function(t,n){var i=(0,s.z)(n);this._immediateIds&&this._immediateIds[t]&&(i.clearTimeout(t),delete this._immediateIds[t])},t.prototype.setInterval=function(t,n){var i=this,e=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),e=setInterval((function(){try{t.apply(i._parent)}catch(t){i._logError(t)}}),n),this._intervalIds[e]=!0),e},t.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},t.prototype.throttle=function(t,n,i){var e=this;if(this._isDisposed)return this._noop;var r,o,u=n||0,a=!0,l=!0,s=0,c=null;i&&"boolean"==typeof i.leading&&(a=i.leading),i&&"boolean"==typeof i.trailing&&(l=i.trailing);var f=function(n){var i=Date.now(),d=i-s,v=a?u-d:u;return d>=u&&(!n||a)?(s=i,c&&(e.clearTimeout(c),c=null),r=t.apply(e._parent,o)):null===c&&l&&(c=e.setTimeout(f,v)),r};return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return o=t,f(!0)}},t.prototype.debounce=function(t,n,i){var e=this;if(this._isDisposed){var r=function(){};return r.cancel=function(){},r.flush=function(){return null},r.pending=function(){return!1},r}var o,u,a=n||0,l=!1,s=!0,c=null,f=0,d=Date.now(),v=null;i&&"boolean"==typeof i.leading&&(l=i.leading),i&&"boolean"==typeof i.trailing&&(s=i.trailing),i&&"number"==typeof i.maxWait&&!isNaN(i.maxWait)&&(c=i.maxWait);var h=function(t){v&&(e.clearTimeout(v),v=null),d=t},p=function(n){h(n),o=t.apply(e._parent,u)},g=function(t){var n=Date.now(),i=!1;t&&(l&&n-f>=a&&(i=!0),f=n);var r=n-f,u=a-r,h=n-d,y=!1;return null!==c&&(h>=c&&v?y=!0:u=Math.min(u,c-h)),r>=a||y||i?p(n):null!==v&&t||!s||(v=e.setTimeout(g,u)),o},y=function(){return!!v},m=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return u=t,g(!0)};return m.cancel=function(){y()&&h(Date.now())},m.flush=function(){return y()&&p(Date.now()),o},m.pending=y,m},t.prototype.requestAnimationFrame=function(t,n){var i=this,e=0,r=(0,s.z)(n);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{i._animationFrameIds&&delete i._animationFrameIds[e],t.apply(i._parent)}catch(t){i._logError(t)}};e=r.requestAnimationFrame?r.requestAnimationFrame(o):r.setTimeout(o,0),this._animationFrameIds[e]=!0}return e},t.prototype.cancelAnimationFrame=function(t,n){var i=(0,s.z)(n);this._animationFrameIds&&this._animationFrameIds[t]&&(i.cancelAnimationFrame?i.cancelAnimationFrame(t):i.clearTimeout(t),delete this._animationFrameIds[t])},t.prototype._logError=function(t){this._onErrorHandler&&this._onErrorHandler(t)},t}();function Ot(){var t=u.useRef();return t.current||(t.current=new Nt),u.useEffect((function(){return function(){var n;null===(n=t.current)||void 0===n||n.dispose(),t.current=void 0}}),[]),t.current}function Tt(t,n,i,e){var r=u.useRef(i);r.current=i,u.useEffect((function(){var i=t&&"current"in t?t.current:t;if(i&&i.addEventListener)return E(i,n,(function(t){return r.current(t)}),e)}),[t,n,e])}function Et(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=u.useCallback((function(n){i.current=n;for(var e=0,r=t;e<r.length;e++){var o=r[e];"function"==typeof o?o(n):o&&(o.current=n)}}),(0,o.fX)([],t,!0));return i}var Ft=u.createContext({window:"object"==typeof window?window:void 0}),Bt=function(){return u.useContext(Ft).window},Pt=function(){var t;return null===(t=u.useContext(Ft).window)||void 0===t?void 0:t.document};function _t(t){var n=t.originalElement,i=t.containsFocus;n&&i&&n!==(0,s.z)()&&setTimeout((function(){var t;null===(t=n.focus)||void 0===t||t.call(n)}),0)}var Ht=u.forwardRef((function(t,n){var i=F({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},t),e=u.useRef(),r=Et(e,n);!function(t,n){var i="true"===String(t["aria-modal"]).toLowerCase()&&t.enableAriaHiddenSiblings;u.useEffect((function(){if(i&&n.current)return Vt(n.current)}),[n,i])}(i,e),function(t,n){var i=t.onRestoreFocus,e=void 0===i?_t:i,r=u.useRef(),o=u.useRef(!1);u.useEffect((function(){var t,i,u;return r.current=(0,C.Y)().activeElement,t=n.current,(u=(i=(0,C.Y)(t))&&i.activeElement)&&w(t,u)&&(o.current=!0),function(){var t;null==e||e({originalElement:r.current,containsFocus:o.current,documentContainsFocus:(null===(t=(0,C.Y)())||void 0===t?void 0:t.hasFocus())||!1}),r.current=void 0}}),[]),Tt(n,"focus",u.useCallback((function(){o.current=!0}),[]),!0),Tt(n,"blur",u.useCallback((function(t){n.current&&t.relatedTarget&&!n.current.contains(t.relatedTarget)&&(o.current=!1)}),[]),!0)}(i,e);var a=i.role,l=i.className,s=i.ariaLabel,c=i.ariaLabelledBy,f=i.ariaDescribedBy,d=i.style,v=i.children,h=i.onDismiss,p=function(t,n){var i=Ot(),e=u.useState(!1),r=e[0],o=e[1];return u.useEffect((function(){return i.requestAnimationFrame((function(){var i;if(!t.style||!t.style.overflowY){var e=!1;if(n&&n.current&&(null===(i=n.current)||void 0===i?void 0:i.firstElementChild)){var u=n.current.clientHeight,a=n.current.firstElementChild.clientHeight;u>0&&a>u&&(e=a-u>1)}r!==e&&o(e)}})),function(){return i.dispose()}})),r}(i,e),g=u.useCallback((function(t){t.which===Dt&&h&&(h(t),t.preventDefault(),t.stopPropagation())}),[h]);return Tt(Bt(),"keydown",g),u.createElement("div",(0,o.Cl)({ref:r},$(i,R),{className:l,role:a,"aria-label":s,"aria-labelledby":c,"aria-describedby":f,onKeyDown:g,style:(0,o.Cl)({overflowY:p?"scroll":void 0,outline:"none"},d)}),v)}));Ht.displayName="Popup";var It=i(419);function Wt(t){var n=u.useRef();return void 0===n.current&&(n.current={value:"function"==typeof t?t():t}),n.current.value}var Rt,$t=function(){var t;return null!==(t=Bt())&&void 0!==t?t:"undefined"!=typeof window?window:void 0},zt=function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.window)||void 0===n?void 0:n.document)&&void 0!==i?i:"undefined"!=typeof document?document:void 0},jt=((Rt={})[G.top]=It.lw.slideUpIn10,Rt[G.bottom]=It.lw.slideDownIn10,Rt[G.left]=It.lw.slideLeftIn10,Rt[G.right]=It.lw.slideRightIn10,Rt),Yt={opacity:0,filter:"opacity(0)",pointerEvents:"none"},Xt=["role","aria-roledescription"],Gt={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:7},qt=(0,a.Z)({disableCaching:!0});function Ut(t,n,i,e){var r,o=t.calloutMaxHeight,a=t.finalHeight,l=t.directionalHint,s=t.directionalHintFixed,c=t.hidden,f=t.gapSpace,d=t.beakWidth,v=t.isBeakVisible,h=t.coverTarget,p=u.useState(),g=p[0],y=p[1],m=null!==(r=null==e?void 0:e.elementPosition)&&void 0!==r?r:{},b=m.top,x=m.bottom,w=(null==i?void 0:i.current)?function(t){var n,i,e,r,o=t,u=t,a=t,l=null!==(n=a.left)&&void 0!==n?n:a.x,s=null!==(i=a.top)&&void 0!==i?i:a.y,c=null!==(e=a.right)&&void 0!==e?e:l,f=null!==(r=a.bottom)&&void 0!==r?r:s;return o.stopPropagation?new Q(o.clientX,o.clientX,o.clientY,o.clientY):void 0!==l&&void 0!==s?new Q(l,c,s,f):Mt(u)}(i.current):void 0;return u.useEffect((function(){var t,i,r=null!==(t=n())&&void 0!==t?t:{},u=r.top,a=r.bottom;(null==e?void 0:e.targetEdge)===G.top&&(null==w?void 0:w.top)&&!h&&(a=w.top-function(t,n,i){return At(t,n,i)}(v,d,f)),"number"==typeof b&&a?i=a-b:"number"==typeof x&&"number"==typeof u&&a&&(i=a-u-x),y(!o&&!c||o&&i&&o>i?i:o||void 0)}),[x,o,a,l,s,n,c,e,b,f,d,v,w,h]),g}function Zt(t,n,i,e,r,a){var l,c=u.useState(),f=c[0],d=c[1],v=u.useRef(0),h=u.useRef(),p=Ot(),g=t.hidden,y=t.target,m=t.finalHeight,b=t.calloutMaxHeight,x=t.onPositioned,w=t.directionalHint,C=t.hideOverflow,M=t.preferScrollResizePositioning,k=$t(),A=u.useRef();A.current!==a.current&&(A.current=a.current,l=a.current?null==k?void 0:k.getComputedStyle(a.current):void 0);var S=null==l?void 0:l.overflowY;return u.useEffect((function(){if(!g){var u=p.requestAnimationFrame((function(){var u,a,l,c;if(n.current&&i){var p=(0,o.Cl)((0,o.Cl)({},t),{target:e.current,bounds:r()}),g=i.cloneNode(!0);g.style.maxHeight=b?"".concat(b):"",g.style.visibility="hidden",null===(u=i.parentElement)||void 0===u||u.appendChild(g);var w=h.current===y?f:void 0,A=M&&!(C||"clip"===S||"hidden"===S),L=m?function(t,n,i,e,r){return function(t,n,i,e,r){return St(t,n,i,e,!1,void 0,!0,null!=r?r:(0,s.z)())}(t,n,i,e,r)}(p,n.current,g,w,k):function(t,n,i,e,r,o,u){return St(t,n,i,e,r,void 0,void 0,u)}(p,n.current,g,w,A,0,k);null===(a=i.parentElement)||void 0===a||a.removeChild(g),!f&&L||f&&L&&(c=L,!Qt((l=f).elementPosition,c.elementPosition)||!Qt(l.beakPosition.elementPosition,c.beakPosition.elementPosition))&&v.current<5?(v.current++,d(L)):v.current>0&&(v.current=0,null==x||x(f))}}),i);return h.current=y,function(){p.cancelAnimationFrame(u),h.current=void 0}}d(void 0),v.current=0}),[g,w,p,i,b,n,e,m,r,x,f,t,y,C,M,S,k]),f}var Kt=u.memo(u.forwardRef((function(t,n){var i=F(Gt,t),e=i.styles,r=i.style,a=i.ariaLabel,l=i.ariaDescribedBy,s=i.ariaLabelledBy,c=i.className,f=i.isBeakVisible,d=i.children,v=i.beakWidth,h=i.calloutWidth,p=i.calloutMaxWidth,g=i.calloutMinWidth,y=i.doNotLayer,m=i.finalHeight,b=i.hideOverflow,x=void 0===b?!!m:b,k=i.backgroundColor,A=i.calloutMaxHeight,S=i.onScroll,L=i.shouldRestoreFocus,V=void 0===L||L,D=i.target,N=i.hidden,O=i.onLayerMounted,T=i.popupProps,B=u.useRef(null),P=Et(u.useRef(null),null==T?void 0:T.ref),_=u.useState(null),H=_[0],I=_[1],W=u.useCallback((function(t){I(t)}),[]),j=Et(B,n),Y=function(t,n){var i,e,r,o=u.useRef(),a=u.useRef(null),l=Bt();if(!t||t!==o.current||"string"==typeof t){var s=null==n?void 0:n.current;if(t)if("string"==typeof t)if(null===(i=null==s?void 0:s.getRootNode())||void 0===i?void 0:i.host)a.current=null!==(r=null===(e=null==s?void 0:s.getRootNode())||void 0===e?void 0:e.querySelector(t))&&void 0!==r?r:null;else{var c=(0,C.Y)(s);a.current=c?c.querySelector(t):null}else a.current="stopPropagation"in t||"getBoundingClientRect"in t?t:"current"in t?t.current:t;o.current=t}return[a,l]}(i.target,{current:H}),X=Y[0],G=Y[1],q=function(t,n,i){var e=t.bounds,r=t.minPagePadding,o=void 0===r?Gt.minPagePadding:r,a=t.target,l=u.useState(!1),s=l[0],c=l[1],f=u.useRef(),d=u.useCallback((function(){if(!f.current||s){var t="function"==typeof e?i?e(a,i):void 0:e;!t&&i&&(t=function(t,n){return function(t,n){var i=void 0;if(n.getWindowSegments&&(i=n.getWindowSegments()),void 0===i||i.length<=1)return{top:0,left:0,right:n.innerWidth,bottom:n.innerHeight,width:n.innerWidth,height:n.innerHeight};var e=0,r=0;if(null!==t&&t.getBoundingClientRect){var o=t.getBoundingClientRect();e=(o.left+o.right)/2,r=(o.top+o.bottom)/2}else null!==t&&(e=t.left||t.x,r=t.top||t.y);for(var u={top:0,left:0,right:0,bottom:0,width:0,height:0},a=0,l=i;a<l.length;a++){var s=l[a];e&&s.left<=e&&s.right>=e&&r&&s.top<=r&&s.bottom>=r&&(u={top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})}return u}(t,n)}(n.current,i),t={top:t.top+o,left:t.left+o,right:t.right-o,bottom:t.bottom-o,width:t.width-2*o,height:t.height-2*o}),f.current=t,s&&c(!1)}return f.current}),[e,o,a,n,i,s]),v=Ot();return Tt(i,"resize",v.debounce((function(){c(!0)}),500,{leading:!0})),d}(i,X,G),U=Zt(i,B,H,X,q,P),Z=Ut(i,q,X,U),K=function(t,n,i,e,r){var o=t.hidden,a=t.onDismiss,l=t.preventDismissOnScroll,s=t.preventDismissOnResize,c=t.preventDismissOnLostFocus,f=t.dismissOnTargetClick,d=t.shouldDismissOnWindowFocus,v=t.preventDismissOnEvent,h=u.useRef(!1),p=Ot(),g=Wt([function(){h.current=!0},function(){h.current=!1}]),y=!!n;return u.useEffect((function(){var t=function(t){y&&!l&&g(t)},n=function(t){s||v&&v(t)||null==a||a(t)},u=function(t){c||g(t)},g=function(t){var n=t.composedPath?t.composedPath():[],o=n.length>0?n[0]:t.target,u=i.current&&!w(i.current,o);if(u&&h.current)h.current=!1;else if(!e.current&&u||t.target!==r&&u&&(!e.current||"stopPropagation"in e.current||f||o!==e.current&&!w(e.current,o))){if(v&&v(t))return;null==a||a(t)}},m=function(t){d&&((!v||v(t))&&(v||c)||(null==r?void 0:r.document.hasFocus())||null!==t.relatedTarget||null==a||a(t))},b=new Promise((function(i){p.setTimeout((function(){if(!o&&r){var e=[E(r,"scroll",t,!0),E(r,"resize",n,!0),E(r.document.documentElement,"focus",u,!0),E(r.document.documentElement,"click",u,!0),E(r,"blur",m,!0)];i((function(){e.forEach((function(t){return t()}))}))}}),0)}));return function(){b.then((function(t){return t()}))}}),[o,p,i,e,r,a,d,f,c,s,l,y,v]),g}(i,U,B,X,G),J=K[0],Q=K[1],tt=(null==U?void 0:U.elementPosition.top)&&(null==U?void 0:U.elementPosition.bottom),nt=(0,o.Cl)((0,o.Cl)({},null==U?void 0:U.elementPosition),{maxHeight:Z});if(tt&&(nt.bottom=void 0),function(t,n,i){var e=t.hidden,r=t.setInitialFocus,o=Ot(),a=!!n;u.useEffect((function(){if(!e&&r&&a&&i){var t=o.requestAnimationFrame((function(){return M(i)}),i);return function(){return o.cancelAnimationFrame(t)}}}),[e,a,o,i,r])}(i,U,H),u.useEffect((function(){N||null==O||O()}),[N]),!G)return null;var it=x,et=f&&!!D,rt=qt(e,{theme:i.theme,className:c,overflowYHidden:it,calloutWidth:h,positions:U,beakWidth:v,backgroundColor:k,calloutMaxWidth:p,calloutMinWidth:g,doNotLayer:y}),ot=(0,o.Cl)((0,o.Cl)({maxHeight:A||"100%"},r),it&&{overflowY:"hidden"}),ut=i.hidden?{visibility:"hidden"}:void 0;return u.createElement("div",{ref:j,className:rt.container,style:ut},u.createElement("div",(0,o.Cl)({},$(i,R,Xt),{className:z(rt.root,U&&U.targetEdge&&jt[U.targetEdge]),style:U?(0,o.Cl)({},nt):Yt,tabIndex:-1,ref:W}),et&&u.createElement("div",{className:rt.beak,style:Jt(U)}),et&&u.createElement("div",{className:rt.beakCurtain}),u.createElement(Ht,(0,o.Cl)({role:i.role,"aria-roledescription":i["aria-roledescription"],ariaDescribedBy:l,ariaLabel:a,ariaLabelledBy:s,className:rt.calloutMain,onDismiss:i.onDismiss,onMouseDown:J,onMouseUp:Q,onRestoreFocus:i.onRestoreFocus,onScroll:S,shouldRestoreFocus:V,style:ot},T,{ref:P}),d)))})),(function(t,n){return!(n.shouldUpdateWhenHidden||!t.hidden||!n.hidden)||function(t,n){if(!t||!n)return!t&&!n;for(var i in t)if(t.hasOwnProperty(i)&&(!n.hasOwnProperty(i)||n[i]!==t[i]))return!1;for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))return!1;return!0}(t,n)}));function Jt(t){var n,i,e=(0,o.Cl)((0,o.Cl)({},null===(n=null==t?void 0:t.beakPosition)||void 0===n?void 0:n.elementPosition),{display:(null===(i=null==t?void 0:t.beakPosition)||void 0===i?void 0:i.hideBeak)?"none":void 0});return e.top||e.bottom||e.left||e.right||(e.left=0,e.top=0),e}function Qt(t,n){for(var i in n)if(n.hasOwnProperty(i)){var e=t[i],r=n[i];if(void 0===e||void 0===r)return!1;if(e.toFixed(2)!==r.toFixed(2))return!1}return!0}function tn(t){return{height:t,width:t}}Kt.displayName="CalloutContentBase";var nn={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},en=(0,r.I)(Kt,(function(t){var n,i=t.theme,e=t.className,r=t.overflowYHidden,o=t.calloutWidth,u=t.beakWidth,a=t.backgroundColor,l=t.calloutMaxWidth,s=t.calloutMinWidth,c=t.doNotLayer,f=(0,It.Km)(nn,i),d=i.semanticColors,v=i.effects;return{container:[f.container,{position:"relative"}],root:[f.root,i.fonts.medium,{position:"absolute",display:"flex",zIndex:c?It.nA.Layer:void 0,boxSizing:"border-box",borderRadius:v.roundedCorner2,boxShadow:v.elevation16,selectors:(n={},n[It.up]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},n)},(0,It.QN)(),e,!!o&&{width:o},!!l&&{maxWidth:l},!!s&&{minWidth:s}],beak:[f.beak,{position:"absolute",backgroundColor:d.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},tn(u),a&&{backgroundColor:a}],beakCurtain:[f.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:d.menuBackground,borderRadius:v.roundedCorner2}],calloutMain:[f.calloutMain,{backgroundColor:d.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:v.roundedCorner2},r&&{overflowY:"hidden"},a&&{backgroundColor:a}]}}),void 0,{scope:"CalloutContent"}),rn=u.createContext(void 0),on=function(){return function(){}};rn.Provider;var un=ReactDOM,an=i(753);new WeakMap,new WeakMap;var ln=u.createContext(void 0),sn=function(t){var n=t.providerRef,i=t.layerRoot,e=u.useState([])[0],r=u.useContext(ln),o=void 0!==r&&!i,a=u.useMemo((function(){return o?void 0:{providerRef:n,registeredProviders:e,registerProvider:function(t){e.push(t),null==r||r.registerProvider(t)},unregisterProvider:function(t){null==r||r.unregisterProvider(t);var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}),[n,e,r,o]);return u.useEffect((function(){if(a)return a.registerProvider(a.providerRef),function(){return a.unregisterProvider(a.providerRef)}}),[a]),a?u.createElement(ln.Provider,{value:a},t.children):u.createElement(u.Fragment,null,t.children)},cn=i(540),fn=i(770);function dn(t,n){void 0===t&&(t={});var i=vn(n)?n:function(t){return function(n){return t?(0,o.Cl)((0,o.Cl)({},n),t):n}}(n);return i(t)}function vn(t){return"function"==typeof t}var hn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onCustomizationChange=function(){return n.forceUpdate()},n}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){cn.X.observe(this._onCustomizationChange)},n.prototype.componentWillUnmount=function(){cn.X.unobserve(this._onCustomizationChange)},n.prototype.render=function(){var t=this,n=this.props.contextTransform;return u.createElement(fn.z.Consumer,null,(function(i){var e=function(t,n){var i,e,r,u=(n||{}).customizations,a=void 0===u?{settings:{},scopedSettings:{}}:u;return{customizations:{settings:dn(a.settings,t.settings),scopedSettings:(i=a.scopedSettings,e=t.scopedSettings,void 0===i&&(i={}),(vn(e)?e:(void 0===(r=e)&&(r={}),function(t){var n=(0,o.Cl)({},t);for(var i in r)r.hasOwnProperty(i)&&(n[i]=(0,o.Cl)((0,o.Cl)({},t[i]),r[i]));return n}))(i)),inCustomizerContext:!0}}}(t.props,i);return n&&(e=n(e)),u.createElement(fn.z.Provider,{value:e},t.props.children)}))},n}(u.Component),pn=i(143),gn=(0,a.Z)(),yn=(0,an.J9)((function(t,n){return(0,pn.a)((0,o.Cl)((0,o.Cl)({},t),{rtl:n}))})),mn=u.forwardRef((function(t,n){var i=t.className,e=t.theme,r=t.applyTheme,a=t.applyThemeToBody,s=t.styles,c=gn(s,{theme:e,applyTheme:r,className:i}),f=u.useRef(null);return function(t,n,i){var e=n.bodyThemed;u.useEffect((function(){if(t){var n=(0,C.Y)(i.current);if(n)return n.body.classList.add(e),function(){n.body.classList.remove(e)}}}),[e,t,i])}(a,c,f),u.createElement(u.Fragment,null,function(t,n,i,e){var r=n.root,a=t.as,s=void 0===a?"div":a,c=t.dir,f=t.theme,d=$(t,R,["dir"]),v=function(t){var n=t.theme,i=t.dir,e=(0,l.jI)(n)?"rtl":"ltr",r=(0,l.jI)()?"rtl":"ltr",o=i||e;return{rootDir:o!==e||o!==r?o:i,needsTheme:o!==e}}(t),h=v.rootDir,p=v.needsTheme,g=u.createElement(sn,{providerRef:i},u.createElement(s,(0,o.Cl)({dir:h},d,{className:r,ref:Et(i,e)})));return p&&(g=u.createElement(hn,{settings:{theme:yn(f,"rtl"===c)}},g)),g}(t,c,f,n))}));mn.displayName="FabricBase";var bn,xn={fontFamily:"inherit"},wn={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},Cn=(0,r.I)(mn,(function(t){var n=t.applyTheme,i=t.className,e=t.preventBlanketFontInheritance,r=t.theme;return{root:[(0,It.Km)(wn,r).root,r.fonts.medium,{color:r.palette.neutralPrimary},!e&&{"& button":xn,"& input":xn,"& textarea":xn},n&&{color:r.semanticColors.bodyText,backgroundColor:r.semanticColors.bodyBackground},i],bodyThemed:[{backgroundColor:r.semanticColors.bodyBackground}]}}),void 0,{scope:"Fabric"}),Mn=i(517),kn="data-portal-element",An={},Sn={},Ln="fluent-default-layer-host",Vn="#".concat(Ln),Dn=i(921),Nn=(0,Dn.S)()?u.useLayoutEffect:u.useEffect,On=(0,a.Z)(),Tn=u.forwardRef((function(t,n){var i,e=null!==(i=u.useContext(rn))&&void 0!==i?i:on,r=u.useRef(null),a=Et(r,n),l=u.useRef(),s=u.useRef(null),c=u.useContext(ln),f=u.useState(!1),d=f[0],v=f[1],h=u.useCallback((function(t){var n,i=!!(null==(n=null==c?void 0:c.providerRef)?void 0:n.current)&&n.current.classList.contains(Mn.Y2);t&&i&&t.classList.add(Mn.Y2)}),[c]),p=t.children,g=t.className,y=t.eventBubblingEnabled,m=t.fabricProps,b=t.hostId,x=t.insertFirst,w=t.onLayerDidMount,M=void 0===w?function(){}:w,k=t.onLayerMounted,A=void 0===k?function(){}:k,S=t.onLayerWillUnmount,L=t.styles,V=t.theme,D=Et(s,null==m?void 0:m.ref,h),N=On(L,{theme:V,className:g,isNotHost:!b}),O=function(){null==S||S();var t=l.current;l.current=void 0,t&&t.parentNode&&t.parentNode.removeChild(t)},T=function(){var t,n,i,e,o=(0,C.Y)(r.current),u=(null===(n=null===(t=r.current)||void 0===t?void 0:t.getRootNode())||void 0===n?void 0:n.host)?null===(i=null==r?void 0:r.current)||void 0===i?void 0:i.getRootNode():void 0;if(o&&(o||u)){var a=function(t,n){var i,e;void 0===n&&(n=null);var r=null!=n?n:t;if(b){var o=function(t){var n=Sn[t];return n&&n[0]||void 0}(b);return o?null!==(i=o.rootRef.current)&&void 0!==i?i:null:null!==(e=r.getElementById(b))&&void 0!==e?e:null}var u=Vn,a=u?r.querySelector(u):null;return a||(a=function(t,n){void 0===n&&(n=null);var i=t.createElement("div");return i.setAttribute("id",Ln),i.style.cssText="position:fixed;z-index:1000000",n?n.appendChild(i):null==t||t.body.appendChild(i),i}(t,n)),a}(o,u);if(a){a.__tabsterElementFlags||(a.__tabsterElementFlags={}),a.__tabsterElementFlags.noDirectAriaHidden=!0,O();var s=(null!==(e=a.ownerDocument)&&void 0!==e?e:o).createElement("div");s.className=N.root,s.setAttribute(kn,"true"),function(t,n){var i=t,e=n;i._virtual||(i._virtual={children:[]});var r=i._virtual.parent;if(r&&r!==n){var o=r._virtual.children.indexOf(i);o>-1&&r._virtual.children.splice(o,1)}i._virtual.parent=e||void 0,e&&(e._virtual||(e._virtual={children:[]}),e._virtual.children.push(i))}(s,r.current),x?a.insertBefore(s,a.firstChild):a.appendChild(s),l.current=s,v(!0)}}};return Nn((function(){T(),b&&function(t,n){An[t]||(An[t]=[]),An[t].push(n);var i=Sn[t];if(i)for(var e=0,r=i;e<r.length;e++)r[e].notifyLayersChanged()}(b,T);var t=l.current?e(l.current):void 0;return function(){t&&t(),O(),b&&function(t,n){var i=An[t];if(i){var e=i.indexOf(n);e>=0&&(i.splice(e,1),0===i.length&&delete An[t])}var r=Sn[t];if(r)for(var o=0,u=r;o<u.length;o++)u[o].notifyLayersChanged()}(b,T)}}),[b]),u.useEffect((function(){l.current&&d&&(null==A||A(),null==M||M(),v(!1))}),[d,A,M]),u.createElement("span",{className:"ms-layer",ref:a},l.current&&un.createPortal(u.createElement(sn,{layerRoot:!0,providerRef:D},u.createElement(Cn,(0,o.Cl)({},!y&&(bn||(bn={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(t){return bn[t]=En}))),bn),m,{className:z(N.content,null==m?void 0:m.className),ref:D}),p)),l.current))}));Tn.displayName="LayerBase";var En=function(t){t.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==t.type&&"mouseleave"!==t.type&&"touchstart"!==t.type&&"touchend"!==t.type&&t.stopPropagation()},Fn={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"},Bn=(0,r.I)(Tn,(function(t){var n=t.className,i=t.isNotHost,e=t.theme,r=(0,It.Km)(Fn,e);return{root:[r.root,e.fonts.medium,i&&[r.rootNoHost,{position:"fixed",zIndex:It.nA.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],n],content:[r.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]}),Pn=u.forwardRef((function(t,n){var i=t.layerProps,e=t.doNotLayer,r=(0,o.Tt)(t,["layerProps","doNotLayer"]),a=u.createElement(en,(0,o.Cl)({},r,{doNotLayer:e,ref:n}));return e?a:u.createElement(Bn,(0,o.Cl)({},i),a)}));Pn.displayName="Callout";var _n=i(61);function Hn(t){return t}var In=1e-6;function Wn(t){return"translate("+t+",0)"}function Rn(t){return"translate(0,"+t+")"}function $n(t){return n=>+t(n)}function zn(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),i=>+t(i)+n}function jn(){return!this.__axis}function Yn(t,n){var i=[],e=null,r=null,o=6,u=6,a=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,s=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",f=1===t||3===t?Wn:Rn;function d(d){var v=null==e?n.ticks?n.ticks.apply(n,i):n.domain():e,h=null==r?n.tickFormat?n.tickFormat.apply(n,i):Hn:r,p=Math.max(o,0)+a,g=n.range(),y=+g[0]+l,m=+g[g.length-1]+l,b=(n.bandwidth?zn:$n)(n.copy(),l),x=d.selection?d.selection():d,w=x.selectAll(".domain").data([null]),C=x.selectAll(".tick").data(v,n).order(),M=C.exit(),k=C.enter().append("g").attr("class","tick"),A=C.select("line"),S=C.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(k),A=A.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",s*o)),S=S.merge(k.append("text").attr("fill","currentColor").attr(c,s*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==x&&(w=w.transition(d),C=C.transition(d),A=A.transition(d),S=S.transition(d),M=M.transition(d).attr("opacity",In).attr("transform",(function(t){return isFinite(t=b(t))?f(t+l):this.getAttribute("transform")})),k.attr("opacity",In).attr("transform",(function(t){var n=this.parentNode.__axis;return f((n&&isFinite(n=n(t))?n:b(t))+l)}))),M.remove(),w.attr("d",4===t||2===t?u?"M"+s*u+","+y+"H"+l+"V"+m+"H"+s*u:"M"+l+","+y+"V"+m:u?"M"+y+","+s*u+"V"+l+"H"+m+"V"+s*u:"M"+y+","+l+"H"+m),C.attr("opacity",1).attr("transform",(function(t){return f(b(t)+l)})),A.attr(c+"2",s*o),S.attr(c,s*p).text(h),x.filter(jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each((function(){this.__axis=b}))}return d.scale=function(t){return arguments.length?(n=t,d):n},d.ticks=function(){return i=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),d):i.slice()},d.tickValues=function(t){return arguments.length?(e=null==t?null:Array.from(t),d):e&&e.slice()},d.tickFormat=function(t){return arguments.length?(r=t,d):r},d.tickSize=function(t){return arguments.length?(o=u=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(u=+t,d):u},d.tickPadding=function(t){return arguments.length?(a=+t,d):a},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Xn(t){return Yn(2,t)}function Gn(t){return Yn(3,t)}function qn(t){return Yn(4,t)}const Un=Math.sqrt(50),Zn=Math.sqrt(10),Kn=Math.sqrt(2);function Jn(t,n,i){const e=(n-t)/Math.max(0,i),r=Math.floor(Math.log10(e)),o=e/Math.pow(10,r),u=o>=Un?10:o>=Zn?5:o>=Kn?2:1;let a,l,s;return r<0?(s=Math.pow(10,-r)/u,a=Math.round(t*s),l=Math.round(n*s),a/s<t&&++a,l/s>n&&--l,s=-s):(s=Math.pow(10,r)*u,a=Math.round(t/s),l=Math.round(n/s),a*s<t&&++a,l*s>n&&--l),l<a&&.5<=i&&i<2?Jn(t,n,2*i):[a,l,s]}function Qn(t,n,i){if(!((i=+i)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[r,o,u]=e?Jn(n,t,i):Jn(t,n,i);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(e)if(u<0)for(let t=0;t<a;++t)l[t]=(o-t)/-u;else for(let t=0;t<a;++t)l[t]=(o-t)*u;else if(u<0)for(let t=0;t<a;++t)l[t]=(r+t)/-u;else for(let t=0;t<a;++t)l[t]=(r+t)*u;return l}function ti(t,n,i){return Jn(t=+t,n=+n,i=+i)[2]}function ni(t,n,i){i=+i;const e=(n=+n)<(t=+t),r=e?ti(n,t,i):ti(t,n,i);return(e?-1:1)*(r<0?1/-r:r)}function ii(t,n,i){let e;for(;;){const r=ti(t,n,i);if(r===e||0===r||!isFinite(r))return[t,n];r>0?(t=Math.floor(t/r)*r,n=Math.ceil(n/r)*r):r<0&&(t=Math.ceil(t*r)/r,n=Math.floor(n*r)/r),e=r}}function ei(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}function ri(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function oi(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function ui(t,n){let i=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++i,e+=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&(++i,e+=o)}if(i)return e/i}function ai(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function li(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function si(t,n,i=0,e=1/0,r){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),e=Math.floor(Math.min(t.length-1,e)),!(i<=n&&n<=e))return t;for(r=void 0===r?li:function(t=ai){if(t===ai)return li;if("function"!=typeof t)throw new TypeError("compare is not a function");return(n,i)=>{const e=t(n,i);return e||0===e?e:(0===t(i,i))-(0===t(n,n))}}(r);e>i;){if(e-i>600){const o=e-i+1,u=n-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o)*(u-o/2<0?-1:1);si(t,n,Math.max(i,Math.floor(n-u*l/o+s)),Math.min(e,Math.floor(n+(o-u)*l/o+s)),r)}const o=t[n];let u=i,a=e;for(ci(t,i,n),r(t[e],o)>0&&ci(t,i,e);u<a;){for(ci(t,u,a),++u,--a;r(t[u],o)<0;)++u;for(;r(t[a],o)>0;)--a}0===r(t[i],o)?ci(t,i,a):(++a,ci(t,a,e)),a<=n&&(i=a+1),n<=a&&(e=a-1)}return t}function ci(t,n,i){const e=t[n];t[n]=t[i],t[i]=e}function fi(t,n){return function(t,n,i){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let i=-1;for(let e of t)null!=(e=n(e,++i,t))&&(e=+e)>=e&&(yield e)}}(t,i)),(e=t.length)&&!isNaN(n=+n)){if(n<=0||e<2)return ei(t);if(n>=1)return ri(t);var e,r=(e-1)*n,o=Math.floor(r),u=ri(si(t,o).subarray(0,o+1));return u+(ei(t.subarray(o+1))-u)*(r-o)}}(t,.5,n)}function di(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function vi(t){let n,i,e;function r(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length?(n=ai,i=(n,i)=>ai(t(n),i),e=(n,i)=>t(n)-i):(n=t===ai||t===di?t:hi,i=t,e=t),{left:r,center:function(t,n,i=0,o=t.length){const u=r(t,n,i,o-1);return u>i&&e(t[u-1],n)>-e(t[u],n)?u-1:u},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}function hi(){return 0}const pi=1e3,gi=6e4,yi=36e5,mi=864e5,bi=6048e5,xi=31536e6,wi=new Date,Ci=new Date;function Mi(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=i=>(t(i=new Date(i-1)),n(i,1),t(i),i),r.round=t=>{const n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=(t,i)=>(n(t=new Date(+t),null==i?1:Math.floor(i)),t),r.range=(i,e,o)=>{const u=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return u;let a;do{u.push(a=new Date(+i)),n(i,o),t(i)}while(a<i&&i<e);return u},r.filter=i=>Mi((n=>{if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),((t,e)=>{if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););})),i&&(r.count=(n,e)=>(wi.setTime(+n),Ci.setTime(+e),t(wi),t(Ci),Math.floor(i(wi,Ci))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?n=>e(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const ki=Mi((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));ki.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Mi((n=>{n.setTime(Math.floor(n/t)*t)}),((n,i)=>{n.setTime(+n+i*t)}),((n,i)=>(i-n)/t)):ki:null),ki.range;const Ai=Mi((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*pi)}),((t,n)=>(n-t)/pi),(t=>t.getUTCSeconds())),Si=(Ai.range,Mi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi)}),((t,n)=>{t.setTime(+t+n*gi)}),((t,n)=>(n-t)/gi),(t=>t.getMinutes()))),Li=(Si.range,Mi((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*gi)}),((t,n)=>(n-t)/gi),(t=>t.getUTCMinutes()))),Vi=(Li.range,Mi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pi-t.getMinutes()*gi)}),((t,n)=>{t.setTime(+t+n*yi)}),((t,n)=>(n-t)/yi),(t=>t.getHours()))),Di=(Vi.range,Mi((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*yi)}),((t,n)=>(n-t)/yi),(t=>t.getUTCHours()))),Ni=(Di.range,Mi((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gi)/mi),(t=>t.getDate()-1))),Oi=(Ni.range,Mi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/mi),(t=>t.getUTCDate()-1))),Ti=(Oi.range,Mi((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/mi),(t=>Math.floor(t/mi))));function Ei(t){return Mi((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gi)/bi))}Ti.range;const Fi=Ei(0),Bi=Ei(1),Pi=Ei(2),_i=Ei(3),Hi=Ei(4),Ii=Ei(5),Wi=Ei(6);function Ri(t){return Mi((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/bi))}Fi.range,Bi.range,Pi.range,_i.range,Hi.range,Ii.range,Wi.range;const $i=Ri(0),zi=Ri(1),ji=Ri(2),Yi=Ri(3),Xi=Ri(4),Gi=Ri(5),qi=Ri(6),Ui=($i.range,zi.range,ji.range,Yi.range,Xi.range,Gi.range,qi.range,Mi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Zi=(Ui.range,Mi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Ki=(Zi.range,Mi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Ki.every=t=>isFinite(t=Math.floor(t))&&t>0?Mi((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,i)=>{n.setFullYear(n.getFullYear()+i*t)})):null,Ki.range;const Ji=Mi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Qi(t,n,i,e,r,o){const u=[[Ai,1,pi],[Ai,5,5e3],[Ai,15,15e3],[Ai,30,3e4],[o,1,gi],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,yi],[r,3,108e5],[r,6,216e5],[r,12,432e5],[e,1,mi],[e,2,1728e5],[i,1,bi],[n,1,2592e6],[n,3,7776e6],[t,1,xi]];function a(n,i,e){const r=Math.abs(i-n)/e,o=vi((([,,t])=>t)).right(u,r);if(o===u.length)return t.every(ni(n/xi,i/xi,e));if(0===o)return ki.every(Math.max(ni(n,i,e),1));const[a,l]=u[r/u[o-1][2]<u[o][2]/r?o-1:o];return a.every(l)}return[function(t,n,i){const e=n<t;e&&([t,n]=[n,t]);const r=i&&"function"==typeof i.range?i:a(t,n,i),o=r?r.range(t,+n+1):[];return e?o.reverse():o},a]}Ji.every=t=>isFinite(t=Math.floor(t))&&t>0?Mi((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null,Ji.range;const[te,ne]=Qi(Ji,Zi,$i,Ti,Di,Li),[ie,ee]=Qi(Ki,Ui,Fi,Ni,Vi,Si);var re=new Date,oe=new Date;function ue(t,n,i,e){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=function(n){return t(n=new Date(+n)),n},r.ceil=function(i){return t(i=new Date(i-1)),n(i,1),t(i),i},r.round=function(t){var n=r(t),i=r.ceil(t);return t-n<i-t?n:i},r.offset=function(t,i){return n(t=new Date(+t),null==i?1:Math.floor(i)),t},r.range=function(i,e,o){var u,a=[];if(i=r.ceil(i),o=null==o?1:Math.floor(o),!(i<e&&o>0))return a;do{a.push(u=new Date(+i)),n(i,o),t(i)}while(u<i&&i<e);return a},r.filter=function(i){return ue((function(n){if(n>=n)for(;t(n),!i(n);)n.setTime(n-1)}),(function(t,e){if(t>=t)if(e<0)for(;++e<=0;)for(;n(t,-1),!i(t););else for(;--e>=0;)for(;n(t,1),!i(t););}))},i&&(r.count=function(n,e){return re.setTime(+n),oe.setTime(+e),t(re),t(oe),Math.floor(i(re,oe))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(e?function(n){return e(n)%t===0}:function(n){return r.count(0,n)%t===0}):r:null}),r}const ae=864e5,le=6048e5;function se(t){return ue((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/le}))}var ce=se(0),fe=se(1),de=se(2),ve=se(3),he=se(4),pe=se(5),ge=se(6),ye=(ce.range,fe.range,de.range,ve.range,he.range,pe.range,ge.range,ue((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/ae}),(function(t){return t.getUTCDate()-1}))),me=ye;function be(t){return ue((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/le}))}ye.range;var xe=be(0),we=be(1),Ce=be(2),Me=be(3),ke=be(4),Ae=be(5),Se=be(6),Le=(xe.range,we.range,Ce.range,Me.range,ke.range,Ae.range,Se.range,ue((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/ae),(t=>t.getDate()-1))),Ve=Le,De=(Le.range,ue((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));De.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ue((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,i){n.setFullYear(n.getFullYear()+i*t)})):null};var Ne=De,Oe=(De.range,ue((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Oe.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ue((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,i){n.setUTCFullYear(n.getUTCFullYear()+i*t)})):null};var Te=Oe;function Ee(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fe(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Be(t,n,i){return{y:t,m:n,d:i,H:0,M:0,S:0,L:0}}function Pe(t){var n=t.dateTime,i=t.date,e=t.time,r=t.periods,o=t.days,u=t.shortDays,a=t.months,l=t.shortMonths,s=Xe(r),c=Ge(r),f=Xe(o),d=Ge(o),v=Xe(u),h=Ge(u),p=Xe(a),g=Ge(a),y=Xe(l),m=Ge(l),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:hr,e:hr,f:br,g:Nr,G:Tr,H:pr,I:gr,j:yr,L:mr,m:xr,M:wr,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:no,s:io,S:Cr,u:Mr,U:kr,V:Sr,w:Lr,W:Vr,x:null,X:null,y:Dr,Y:Or,Z:Er,"%":to},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Fr,e:Fr,f:Ir,g:Zr,G:Jr,H:Br,I:Pr,j:_r,L:Hr,m:Wr,M:Rr,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:no,s:io,S:$r,u:zr,U:jr,V:Xr,w:Gr,W:qr,x:null,X:null,y:Ur,Y:Kr,Z:Qr,"%":to},w={a:function(t,n,i){var e=v.exec(n.slice(i));return e?(t.w=h.get(e[0].toLowerCase()),i+e[0].length):-1},A:function(t,n,i){var e=f.exec(n.slice(i));return e?(t.w=d.get(e[0].toLowerCase()),i+e[0].length):-1},b:function(t,n,i){var e=y.exec(n.slice(i));return e?(t.m=m.get(e[0].toLowerCase()),i+e[0].length):-1},B:function(t,n,i){var e=p.exec(n.slice(i));return e?(t.m=g.get(e[0].toLowerCase()),i+e[0].length):-1},c:function(t,i,e){return k(t,n,i,e)},d:rr,e:rr,f:cr,g:tr,G:Qe,H:ur,I:ur,j:or,L:sr,m:er,M:ar,p:function(t,n,i){var e=s.exec(n.slice(i));return e?(t.p=c.get(e[0].toLowerCase()),i+e[0].length):-1},q:ir,Q:dr,s:vr,S:lr,u:Ue,U:Ze,V:Ke,w:qe,W:Je,x:function(t,n,e){return k(t,i,n,e)},X:function(t,n,i){return k(t,e,n,i)},y:tr,Y:Qe,Z:nr,"%":fr};function C(t,n){return function(i){var e,r,o,u=[],a=-1,l=0,s=t.length;for(i instanceof Date||(i=new Date(+i));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(l,a)),null!=(r=We[e=t.charAt(++a)])?e=t.charAt(++a):r="e"===e?" ":"0",(o=n[e])&&(e=o(i,r)),u.push(e),l=a+1);return u.push(t.slice(l,a)),u.join("")}}function M(t,n){return function(i){var e,r,o=Be(1900,void 0,1);if(k(o,t,i+="",0)!=i.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(e=Fe(Be(o.y,0,1))).getUTCDay(),e=r>4||0===r?fe.ceil(e):fe(e),e=me.offset(e,7*(o.V-1)),o.y=e.getUTCFullYear(),o.m=e.getUTCMonth(),o.d=e.getUTCDate()+(o.w+6)%7):(r=(e=Ee(Be(o.y,0,1))).getDay(),e=r>4||0===r?we.ceil(e):we(e),e=Ve.offset(e,7*(o.V-1)),o.y=e.getFullYear(),o.m=e.getMonth(),o.d=e.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?Fe(Be(o.y,0,1)).getUTCDay():Ee(Be(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Fe(o)):Ee(o)}}function k(t,n,i,e){for(var r,o,u=0,a=n.length,l=i.length;u<a;){if(e>=l)return-1;if(37===(r=n.charCodeAt(u++))){if(r=n.charAt(u++),!(o=w[r in We?n.charAt(u++):r])||(e=o(t,i,e))<0)return-1}else if(r!=i.charCodeAt(e++))return-1}return e}return b.x=C(i,b),b.X=C(e,b),b.c=C(n,b),x.x=C(i,x),x.X=C(e,x),x.c=C(n,x),{format:function(t){var n=C(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=C(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}Oe.range;var _e,He,Ie,We={"-":"",_:" ",0:"0"},Re=/^\s*\d+/,$e=/^%/,ze=/[\\^$*+?|[\]().{}]/g;function je(t,n,i){var e=t<0?"-":"",r=(e?-t:t)+"",o=r.length;return e+(o<i?new Array(i-o+1).join(n)+r:r)}function Ye(t){return t.replace(ze,"\\$&")}function Xe(t){return new RegExp("^(?:"+t.map(Ye).join("|")+")","i")}function Ge(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function qe(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.w=+e[0],i+e[0].length):-1}function Ue(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.u=+e[0],i+e[0].length):-1}function Ze(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.U=+e[0],i+e[0].length):-1}function Ke(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.V=+e[0],i+e[0].length):-1}function Je(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.W=+e[0],i+e[0].length):-1}function Qe(t,n,i){var e=Re.exec(n.slice(i,i+4));return e?(t.y=+e[0],i+e[0].length):-1}function tr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.y=+e[0]+(+e[0]>68?1900:2e3),i+e[0].length):-1}function nr(t,n,i){var e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return e?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),i+e[0].length):-1}function ir(t,n,i){var e=Re.exec(n.slice(i,i+1));return e?(t.q=3*e[0]-3,i+e[0].length):-1}function er(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.m=e[0]-1,i+e[0].length):-1}function rr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.d=+e[0],i+e[0].length):-1}function or(t,n,i){var e=Re.exec(n.slice(i,i+3));return e?(t.m=0,t.d=+e[0],i+e[0].length):-1}function ur(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.H=+e[0],i+e[0].length):-1}function ar(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.M=+e[0],i+e[0].length):-1}function lr(t,n,i){var e=Re.exec(n.slice(i,i+2));return e?(t.S=+e[0],i+e[0].length):-1}function sr(t,n,i){var e=Re.exec(n.slice(i,i+3));return e?(t.L=+e[0],i+e[0].length):-1}function cr(t,n,i){var e=Re.exec(n.slice(i,i+6));return e?(t.L=Math.floor(e[0]/1e3),i+e[0].length):-1}function fr(t,n,i){var e=$e.exec(n.slice(i,i+1));return e?i+e[0].length:-1}function dr(t,n,i){var e=Re.exec(n.slice(i));return e?(t.Q=+e[0],i+e[0].length):-1}function vr(t,n,i){var e=Re.exec(n.slice(i));return e?(t.s=+e[0],i+e[0].length):-1}function hr(t,n){return je(t.getDate(),n,2)}function pr(t,n){return je(t.getHours(),n,2)}function gr(t,n){return je(t.getHours()%12||12,n,2)}function yr(t,n){return je(1+Ve.count(Ne(t),t),n,3)}function mr(t,n){return je(t.getMilliseconds(),n,3)}function br(t,n){return mr(t,n)+"000"}function xr(t,n){return je(t.getMonth()+1,n,2)}function wr(t,n){return je(t.getMinutes(),n,2)}function Cr(t,n){return je(t.getSeconds(),n,2)}function Mr(t){var n=t.getDay();return 0===n?7:n}function kr(t,n){return je(xe.count(Ne(t)-1,t),n,2)}function Ar(t){var n=t.getDay();return n>=4||0===n?ke(t):ke.ceil(t)}function Sr(t,n){return t=Ar(t),je(ke.count(Ne(t),t)+(4===Ne(t).getDay()),n,2)}function Lr(t){return t.getDay()}function Vr(t,n){return je(we.count(Ne(t)-1,t),n,2)}function Dr(t,n){return je(t.getFullYear()%100,n,2)}function Nr(t,n){return je((t=Ar(t)).getFullYear()%100,n,2)}function Or(t,n){return je(t.getFullYear()%1e4,n,4)}function Tr(t,n){var i=t.getDay();return je((t=i>=4||0===i?ke(t):ke.ceil(t)).getFullYear()%1e4,n,4)}function Er(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+je(n/60|0,"0",2)+je(n%60,"0",2)}function Fr(t,n){return je(t.getUTCDate(),n,2)}function Br(t,n){return je(t.getUTCHours(),n,2)}function Pr(t,n){return je(t.getUTCHours()%12||12,n,2)}function _r(t,n){return je(1+me.count(Te(t),t),n,3)}function Hr(t,n){return je(t.getUTCMilliseconds(),n,3)}function Ir(t,n){return Hr(t,n)+"000"}function Wr(t,n){return je(t.getUTCMonth()+1,n,2)}function Rr(t,n){return je(t.getUTCMinutes(),n,2)}function $r(t,n){return je(t.getUTCSeconds(),n,2)}function zr(t){var n=t.getUTCDay();return 0===n?7:n}function jr(t,n){return je(ce.count(Te(t)-1,t),n,2)}function Yr(t){var n=t.getUTCDay();return n>=4||0===n?he(t):he.ceil(t)}function Xr(t,n){return t=Yr(t),je(he.count(Te(t),t)+(4===Te(t).getUTCDay()),n,2)}function Gr(t){return t.getUTCDay()}function qr(t,n){return je(fe.count(Te(t)-1,t),n,2)}function Ur(t,n){return je(t.getUTCFullYear()%100,n,2)}function Zr(t,n){return je((t=Yr(t)).getUTCFullYear()%100,n,2)}function Kr(t,n){return je(t.getUTCFullYear()%1e4,n,4)}function Jr(t,n){var i=t.getUTCDay();return je((t=i>=4||0===i?he(t):he.ceil(t)).getUTCFullYear()%1e4,n,4)}function Qr(){return"+0000"}function to(){return"%"}function no(t){return+t}function io(t){return Math.floor(+t/1e3)}_e=Pe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),He=_e.format,_e.parse,Ie=_e.utcFormat,_e.utcParse;const eo=vi(ai),ro=eo.right;eo.left,vi((function(t){return null===t?NaN:+t})).center;var oo=ro;function uo(t,n,i){t.prototype=n.prototype=i,i.constructor=t}function ao(t,n){var i=Object.create(t.prototype);for(var e in n)i[e]=n[e];return i}function lo(){}var so=.7,co=1/so,fo="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",po=/^#([0-9a-f]{3,8})$/,go=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),yo=new RegExp(`^rgb\\(${ho},${ho},${ho}\\)$`),mo=new RegExp(`^rgba\\(${fo},${fo},${fo},${vo}\\)$`),bo=new RegExp(`^rgba\\(${ho},${ho},${ho},${vo}\\)$`),xo=new RegExp(`^hsl\\(${vo},${ho},${ho}\\)$`),wo=new RegExp(`^hsla\\(${vo},${ho},${ho},${vo}\\)$`),Co={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Mo(){return this.rgb().formatHex()}function ko(){return this.rgb().formatRgb()}function Ao(t){var n,i;return t=(t+"").trim().toLowerCase(),(n=po.exec(t))?(i=n[1].length,n=parseInt(n[1],16),6===i?So(n):3===i?new Do(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===i?Lo(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===i?Lo(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=go.exec(t))?new Do(n[1],n[2],n[3],1):(n=yo.exec(t))?new Do(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=mo.exec(t))?Lo(n[1],n[2],n[3],n[4]):(n=bo.exec(t))?Lo(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=xo.exec(t))?Bo(n[1],n[2]/100,n[3]/100,1):(n=wo.exec(t))?Bo(n[1],n[2]/100,n[3]/100,n[4]):Co.hasOwnProperty(t)?So(Co[t]):"transparent"===t?new Do(NaN,NaN,NaN,0):null}function So(t){return new Do(t>>16&255,t>>8&255,255&t,1)}function Lo(t,n,i,e){return e<=0&&(t=n=i=NaN),new Do(t,n,i,e)}function Vo(t,n,i,e){return 1===arguments.length?((r=t)instanceof lo||(r=Ao(r)),r?new Do((r=r.rgb()).r,r.g,r.b,r.opacity):new Do):new Do(t,n,i,null==e?1:e);var r}function Do(t,n,i,e){this.r=+t,this.g=+n,this.b=+i,this.opacity=+e}function No(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}`}function Oo(){const t=To(this.opacity);return`${1===t?"rgb(":"rgba("}${Eo(this.r)}, ${Eo(this.g)}, ${Eo(this.b)}${1===t?")":`, ${t})`}`}function To(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fo(t){return((t=Eo(t))<16?"0":"")+t.toString(16)}function Bo(t,n,i,e){return e<=0?t=n=i=NaN:i<=0||i>=1?t=n=NaN:n<=0&&(t=NaN),new _o(t,n,i,e)}function Po(t){if(t instanceof _o)return new _o(t.h,t.s,t.l,t.opacity);if(t instanceof lo||(t=Ao(t)),!t)return new _o;if(t instanceof _o)return t;var n=(t=t.rgb()).r/255,i=t.g/255,e=t.b/255,r=Math.min(n,i,e),o=Math.max(n,i,e),u=NaN,a=o-r,l=(o+r)/2;return a?(u=n===o?(i-e)/a+6*(i<e):i===o?(e-n)/a+2:(n-i)/a+4,a/=l<.5?o+r:2-o-r,u*=60):a=l>0&&l<1?0:u,new _o(u,a,l,t.opacity)}function _o(t,n,i,e){this.h=+t,this.s=+n,this.l=+i,this.opacity=+e}function Ho(t){return(t=(t||0)%360)<0?t+360:t}function Io(t){return Math.max(0,Math.min(1,t||0))}function Wo(t,n,i){return 255*(t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n)}function Ro(t,n,i,e,r){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*i+(1+3*t+3*o-3*u)*e+u*r)/6}uo(lo,Ao,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Mo,formatHex:Mo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Po(this).formatHsl()},formatRgb:ko,toString:ko}),uo(Do,Vo,ao(lo,{brighter(t){return t=null==t?co:Math.pow(co,t),new Do(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?so:Math.pow(so,t),new Do(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Do(Eo(this.r),Eo(this.g),Eo(this.b),To(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:No,formatHex:No,formatHex8:function(){return`#${Fo(this.r)}${Fo(this.g)}${Fo(this.b)}${Fo(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Oo,toString:Oo})),uo(_o,(function(t,n,i,e){return 1===arguments.length?Po(t):new _o(t,n,i,null==e?1:e)}),ao(lo,{brighter(t){return t=null==t?co:Math.pow(co,t),new _o(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?so:Math.pow(so,t),new _o(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,e=i+(i<.5?i:1-i)*n,r=2*i-e;return new Do(Wo(t>=240?t-240:t+120,r,e),Wo(t,r,e),Wo(t<120?t+240:t-120,r,e),this.opacity)},clamp(){return new _o(Ho(this.h),Io(this.s),Io(this.l),To(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=To(this.opacity);return`${1===t?"hsl(":"hsla("}${Ho(this.h)}, ${100*Io(this.s)}%, ${100*Io(this.l)}%${1===t?")":`, ${t})`}`}}));var $o=t=>()=>t;function zo(t,n){var i=n-t;return i?function(t,n){return function(i){return t+i*n}}(t,i):$o(isNaN(t)?n:t)}var jo=function t(n){var i=function(t){return 1===(t=+t)?zo:function(n,i){return i-n?function(t,n,i){return t=Math.pow(t,i),n=Math.pow(n,i)-t,i=1/i,function(e){return Math.pow(t+e*n,i)}}(n,i,t):$o(isNaN(n)?i:n)}}(n);function e(t,n){var e=i((t=Vo(t)).r,(n=Vo(n)).r),r=i(t.g,n.g),o=i(t.b,n.b),u=zo(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=r(n),t.b=o(n),t.opacity=u(n),t+""}}return e.gamma=t,e}(1);function Yo(t){return function(n){var i,e,r=n.length,o=new Array(r),u=new Array(r),a=new Array(r);for(i=0;i<r;++i)e=Vo(n[i]),o[i]=e.r||0,u[i]=e.g||0,a[i]=e.b||0;return o=t(o),u=t(u),a=t(a),e.opacity=1,function(t){return e.r=o(t),e.g=u(t),e.b=a(t),e+""}}}function Xo(t,n){var i,e=n?n.length:0,r=t?Math.min(e,t.length):0,o=new Array(r),u=new Array(e);for(i=0;i<r;++i)o[i]=tu(t[i],n[i]);for(;i<e;++i)u[i]=n[i];return function(t){for(i=0;i<r;++i)u[i]=o[i](t);return u}}function Go(t,n){var i=new Date;return t=+t,n=+n,function(e){return i.setTime(t*(1-e)+n*e),i}}function qo(t,n){return t=+t,n=+n,function(i){return t*(1-i)+n*i}}function Uo(t,n){var i,e={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)i in t?e[i]=tu(t[i],n[i]):r[i]=n[i];return function(t){for(i in e)r[i]=e[i](t);return r}}Yo((function(t){var n=t.length-1;return function(i){var e=i<=0?i=0:i>=1?(i=1,n-1):Math.floor(i*n),r=t[e],o=t[e+1],u=e>0?t[e-1]:2*r-o,a=e<n-1?t[e+2]:2*o-r;return Ro((i-e/n)*n,u,r,o,a)}})),Yo((function(t){var n=t.length;return function(i){var e=Math.floor(((i%=1)<0?++i:i)*n),r=t[(e+n-1)%n],o=t[e%n],u=t[(e+1)%n],a=t[(e+2)%n];return Ro((i-e/n)*n,r,o,u,a)}}));var Zo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ko=new RegExp(Zo.source,"g");function Jo(t,n){var i,e,r,o=Zo.lastIndex=Ko.lastIndex=0,u=-1,a=[],l=[];for(t+="",n+="";(i=Zo.exec(t))&&(e=Ko.exec(n));)(r=e.index)>o&&(r=n.slice(o,r),a[u]?a[u]+=r:a[++u]=r),(i=i[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:qo(i,e)})),o=Ko.lastIndex;return o<n.length&&(r=n.slice(o),a[u]?a[u]+=r:a[++u]=r),a.length<2?l[0]?function(t){return function(n){return t(n)+""}}(l[0].x):function(t){return function(){return t}}(n):(n=l.length,function(t){for(var i,e=0;e<n;++e)a[(i=l[e]).i]=i.x(t);return a.join("")})}function Qo(t,n){n||(n=[]);var i,e=t?Math.min(n.length,t.length):0,r=n.slice();return function(o){for(i=0;i<e;++i)r[i]=t[i]*(1-o)+n[i]*o;return r}}function tu(t,n){var i,e,r=typeof n;return null==n||"boolean"===r?$o(n):("number"===r?qo:"string"===r?(i=Ao(n))?(n=i,jo):Jo:n instanceof Ao?jo:n instanceof Date?Go:(e=n,!ArrayBuffer.isView(e)||e instanceof DataView?Array.isArray(n)?Xo:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Uo:qo:Qo))(t,n)}function nu(t,n){return t=+t,n=+n,function(i){return Math.round(t*(1-i)+n*i)}}function iu(t){return+t}var eu=[0,1];function ru(t){return t}function ou(t,n){return(n-=t=+t)?function(i){return(i-t)/n}:(i=isNaN(n)?NaN:.5,function(){return i});var i}function uu(t,n,i){var e=t[0],r=t[1],o=n[0],u=n[1];return r<e?(e=ou(r,e),o=i(u,o)):(e=ou(e,r),o=i(o,u)),function(t){return o(e(t))}}function au(t,n,i){var e=Math.min(t.length,n.length)-1,r=new Array(e),o=new Array(e),u=-1;for(t[e]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<e;)r[u]=ou(t[u],t[u+1]),o[u]=i(n[u],n[u+1]);return function(n){var i=oo(t,n,1,e)-1;return o[i](r[i](n))}}function lu(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function su(){var t,n,i,e,r,o,u=eu,a=eu,l=tu,s=ru;function c(){var t,n,i,l=Math.min(u.length,a.length);return s!==ru&&(t=u[0],n=u[l-1],t>n&&(i=t,t=n,n=i),s=function(i){return Math.max(t,Math.min(n,i))}),e=l>2?au:uu,r=o=null,f}function f(n){return null==n||isNaN(n=+n)?i:(r||(r=e(u.map(t),a,l)))(t(s(n)))}return f.invert=function(i){return s(n((o||(o=e(a,u.map(t),qo)))(i)))},f.domain=function(t){return arguments.length?(u=Array.from(t,iu),c()):u.slice()},f.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},f.rangeRound=function(t){return a=Array.from(t),l=nu,c()},f.clamp=function(t){return arguments.length?(s=!!t||ru,c()):s!==ru},f.interpolate=function(t){return arguments.length?(l=t,c()):l},f.unknown=function(t){return arguments.length?(i=t,f):i},function(i,e){return t=i,n=e,c()}}function cu(){return su()(ru,ru)}function fu(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function du(t,n){var i,e=0,r=(t=t.slice()).length-1,o=t[e],u=t[r];return u<o&&(i=e,e=r,r=i,i=o,o=u,u=i),t[e]=n.floor(o),t[r]=n.ceil(u),t}function vu(t){return new Date(t)}function hu(t){return t instanceof Date?+t:+new Date(+t)}function pu(t,n,i,e,r,o,u,a,l,s){var c=cu(),f=c.invert,d=c.domain,v=s(".%L"),h=s(":%S"),p=s("%I:%M"),g=s("%I %p"),y=s("%a %d"),m=s("%b %d"),b=s("%B"),x=s("%Y");function w(t){return(l(t)<t?v:a(t)<t?h:u(t)<t?p:o(t)<t?g:e(t)<t?r(t)<t?y:m:i(t)<t?b:x)(t)}return c.invert=function(t){return new Date(f(t))},c.domain=function(t){return arguments.length?d(Array.from(t,hu)):d().map(vu)},c.ticks=function(n){var i=d();return t(i[0],i[i.length-1],null==n?10:n)},c.tickFormat=function(t,n){return null==n?w:s(n)},c.nice=function(t){var i=d();return t&&"function"==typeof t.range||(t=n(i[0],i[i.length-1],null==t?10:t)),t?d(du(i,t)):c},c.copy=function(){return lu(c,pu(t,n,i,e,r,o,u,a,l,s))},c}function gu(){return fu.apply(pu(ie,ee,Ki,Ui,Fi,Ni,Vi,Si,Ai,He).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function yu(){return fu.apply(pu(te,ne,Ji,Zi,$i,Oi,Di,Li,Ai,Ie).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function mu(t,n,i){t=+t,n=+n,i=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+i;for(var e=-1,r=0|Math.max(0,Math.ceil((n-t)/i)),o=new Array(r);++e<r;)o[e]=t+e*i;return o}class bu extends Map{constructor(t,n=wu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(xu(this,t))}has(t){return super.has(xu(this,t))}set(t,n){return super.set(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):(t.set(e,i),i)}(this,t),n)}delete(t){return super.delete(function({_intern:t,_key:n},i){const e=n(i);return t.has(e)&&(i=t.get(i),t.delete(e)),i}(this,t))}}function xu({_intern:t,_key:n},i){const e=n(i);return t.has(e)?t.get(e):i}function wu(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const Cu=Symbol("implicit");function Mu(){var t=new bu,n=[],i=[],e=Cu;function r(r){let o=t.get(r);if(void 0===o){if(e!==Cu)return e;t.set(r,o=n.push(r)-1)}return i[o%i.length]}return r.domain=function(i){if(!arguments.length)return n.slice();n=[],t=new bu;for(const e of i)t.has(e)||t.set(e,n.push(e)-1);return r},r.range=function(t){return arguments.length?(i=Array.from(t),r):i.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Mu(n,i).unknown(e)},fu.apply(r,arguments),r}function ku(){var t,n,i=Mu().unknown(void 0),e=i.domain,r=i.range,o=0,u=1,a=!1,l=0,s=0,c=.5;function f(){var i=e().length,f=u<o,d=f?u:o,v=f?o:u;t=(v-d)/Math.max(1,i-l+2*s),a&&(t=Math.floor(t)),d+=(v-d-t*(i-l))*c,n=t*(1-l),a&&(d=Math.round(d),n=Math.round(n));var h=mu(i).map((function(n){return d+t*n}));return r(f?h.reverse():h)}return delete i.unknown,i.domain=function(t){return arguments.length?(e(t),f()):e()},i.range=function(t){return arguments.length?([o,u]=t,o=+o,u=+u,f()):[o,u]},i.rangeRound=function(t){return[o,u]=t,o=+o,u=+u,a=!0,f()},i.bandwidth=function(){return n},i.step=function(){return t},i.round=function(t){return arguments.length?(a=!!t,f()):a},i.padding=function(t){return arguments.length?(l=Math.min(1,s=+t),f()):l},i.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),f()):l},i.paddingOuter=function(t){return arguments.length?(s=+t,f()):s},i.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),f()):c},i.copy=function(){return ku(e(),[o,u]).round(a).paddingInner(l).paddingOuter(s).align(c)},fu.apply(f(),arguments)}var Au,Su=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lu(t){if(!(n=Su.exec(t)))throw new Error("invalid format: "+t);var n;return new Vu({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Vu(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Du(t,n){if((i=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var i,e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function Nu(t){return(t=Du(Math.abs(t)))?t[1]:NaN}function Ou(t,n){var i=Du(t,n);if(!i)return t+"";var e=i[0],r=i[1];return r<0?"0."+new Array(-r).join("0")+e:e.length>r+1?e.slice(0,r+1)+"."+e.slice(r+1):e+new Array(r-e.length+2).join("0")}Lu.prototype=Vu.prototype,Vu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Tu={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Ou(100*t,n),r:Ou,s:function(t,n){var i=Du(t,n);if(!i)return t+"";var e=i[0],r=i[1],o=r-(Au=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,u=e.length;return o===u?e:o>u?e+new Array(o-u+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+Du(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Eu(t){return t}var Fu,Bu,Pu,_u=Array.prototype.map,Hu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Iu(){var t=cu();return t.copy=function(){return lu(t,Iu())},fu.apply(t,arguments),function(t){var n=t.domain;return t.ticks=function(t){var i=n();return Qn(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,i){var e=n();return function(t,n,i,e){var r,o=ni(t,n,i);switch((e=Lu(null==e?",f":e)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=e.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Nu(n)/3)))-Nu(Math.abs(t)))}(o,u))||(e.precision=r),Pu(e,u);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Nu(n)-Nu(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(e.precision=r-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(r=function(t){return Math.max(0,-Nu(Math.abs(t)))}(o))||(e.precision=r-2*("%"===e.type))}return Bu(e)}(e[0],e[e.length-1],null==t?10:t,i)},t.nice=function(i){null==i&&(i=10);var e,r,o=n(),u=0,a=o.length-1,l=o[u],s=o[a],c=10;for(s<l&&(r=l,l=s,s=r,r=u,u=a,a=r);c-- >0;){if((r=ti(l,s,i))===e)return o[u]=l,o[a]=s,n(o);if(r>0)l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r}e=r}return t},t}(t)}function Wu(t){return Math.log(t)}function Ru(t){return Math.exp(t)}function $u(t){return-Math.log(-t)}function zu(t){return-Math.exp(-t)}function ju(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Yu(t){return(n,i)=>-t(-n,i)}function Xu(){const t=function(t){const n=t(Wu,Ru),i=n.domain;let e,r,o=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(o),r=function(t){return 10===t?ju:t===Math.E?Math.exp:n=>Math.pow(t,n)}(o),i()[0]<0?(e=Yu(e),r=Yu(r),t($u,zu)):t(Wu,Ru),n}return n.base=function(t){return arguments.length?(o=+t,u()):o},n.domain=function(t){return arguments.length?(i(t),u()):i()},n.ticks=t=>{const n=i();let u=n[0],a=n[n.length-1];const l=a<u;l&&([u,a]=[a,u]);let s,c,f=e(u),d=e(a);const v=null==t?10:+t;let h=[];if(!(o%1)&&d-f<v){if(f=Math.floor(f),d=Math.ceil(d),u>0){for(;f<=d;++f)for(s=1;s<o;++s)if(c=f<0?s/r(-f):s*r(f),!(c<u)){if(c>a)break;h.push(c)}}else for(;f<=d;++f)for(s=o-1;s>=1;--s)if(c=f>0?s/r(-f):s*r(f),!(c<u)){if(c>a)break;h.push(c)}2*h.length<v&&(h=Qn(u,a,v))}else h=Qn(f,d,Math.min(d-f,v)).map(r);return l?h.reverse():h},n.tickFormat=(t,i)=>{if(null==t&&(t=10),null==i&&(i=10===o?"s":","),"function"!=typeof i&&(o%1||null!=(i=Lu(i)).precision||(i.trim=!0),i=Bu(i)),t===1/0)return i;const u=Math.max(1,o*t/n.ticks().length);return t=>{let n=t/r(Math.round(e(t)));return n*o<o-.5&&(n*=o),n<=u?i(t):""}},n.nice=()=>i(du(i(),{floor:t=>r(Math.floor(e(t))),ceil:t=>r(Math.ceil(e(t)))})),n}(su()).domain([1,10]);return t.copy=()=>lu(t,Xu()).base(t.base()),fu.apply(t,arguments),t}function Gu(){}function qu(t){return null==t?Gu:function(){return this.querySelector(t)}}function Uu(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Zu(){return[]}function Ku(t){return function(n){return n.matches(t)}}Fu=function(t){var n,i,e=void 0===t.grouping||void 0===t.thousands?Eu:(n=_u.call(t.grouping,Number),i=t.thousands+"",function(t,e){for(var r=t.length,o=[],u=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),o.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=n[u=(u+1)%n.length];return o.reverse().join(i)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Eu:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(_u.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=Lu(t)).fill,i=t.align,f=t.sign,d=t.symbol,v=t.zero,h=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type;"n"===m?(p=!0,m="g"):Tu[m]||(void 0===g&&(g=12),y=!0,m="g"),(v||"0"===n&&"="===i)&&(v=!0,n="0",i="=");var b="$"===d?r:"#"===d&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===d?o:/[%p]/.test(m)?l:"",w=Tu[m],C=/[defgprs%]/.test(m);function M(t){var r,o,l,d=b,M=x;if("c"===m)M=w(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),g),y&&(t=function(t){t:for(var n,i=t.length,e=1,r=-1;e<i;++e)switch(t[e]){case".":r=n=e;break;case"0":0===r&&(r=e),n=e;break;default:if(!+t[e])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),k&&0===+t&&"+"!==f&&(k=!1),d=(k?"("===f?f:s:"-"===f||"("===f?"":f)+d,M=("s"===m?Hu[8+Au/3]:"")+M+(k&&"("===f?")":""),C)for(r=-1,o=t.length;++r<o;)if(48>(l=t.charCodeAt(r))||l>57){M=(46===l?u+t.slice(r+1):t.slice(r))+M,t=t.slice(0,r);break}}p&&!v&&(t=e(t,1/0));var A=d.length+t.length+M.length,S=A<h?new Array(h-A+1).join(n):"";switch(p&&v&&(t=e(S+t,S.length?h-M.length:1/0),S=""),i){case"<":t=d+t+M+S;break;case"=":t=d+S+t+M;break;case"^":t=S.slice(0,A=S.length>>1)+d+t+M+S.slice(A);break;default:t=S+d+t+M}return a(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:f,formatPrefix:function(t,n){var i=f(((t=Lu(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(Nu(n)/3))),r=Math.pow(10,-e),o=Hu[8+e/3];return function(t){return i(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Bu=Fu.format,Pu=Fu.formatPrefix;var Ju=Array.prototype.find;function Qu(){return this.firstElementChild}var ta=Array.prototype.filter;function na(){return Array.from(this.children)}function ia(t){return new Array(t.length)}function ea(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function ra(t,n,i,e,r,o){for(var u,a=0,l=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],e[a]=u):i[a]=new ea(t,o[a]);for(;a<l;++a)(u=n[a])&&(r[a]=u)}function oa(t,n,i,e,r,o,u){var a,l,s,c=new Map,f=n.length,d=o.length,v=new Array(f);for(a=0;a<f;++a)(l=n[a])&&(v[a]=s=u.call(l,l.__data__,a,n)+"",c.has(s)?r[a]=l:c.set(s,l));for(a=0;a<d;++a)s=u.call(t,o[a],a,o)+"",(l=c.get(s))?(e[a]=l,l.__data__=o[a],c.delete(s)):i[a]=new ea(t,o[a]);for(a=0;a<f;++a)(l=n[a])&&c.get(v[a])===l&&(r[a]=l)}function ua(t){return t.__data__}function aa(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function la(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}ea.prototype={constructor:ea,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var sa="http://www.w3.org/1999/xhtml",ca={svg:"http://www.w3.org/2000/svg",xhtml:sa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fa(t){var n=t+="",i=n.indexOf(":");return i>=0&&"xmlns"!==(n=t.slice(0,i))&&(t=t.slice(i+1)),ca.hasOwnProperty(n)?{space:ca[n],local:t}:t}function da(t){return function(){this.removeAttribute(t)}}function va(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ha(t,n){return function(){this.setAttribute(t,n)}}function pa(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function ga(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function ya(t,n){return function(){var i=n.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function ma(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ba(t){return function(){this.style.removeProperty(t)}}function xa(t,n,i){return function(){this.style.setProperty(t,n,i)}}function wa(t,n,i){return function(){var e=n.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function Ca(t){return function(){delete this[t]}}function Ma(t,n){return function(){this[t]=n}}function ka(t,n){return function(){var i=n.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function Aa(t){return t.trim().split(/^|\s+/)}function Sa(t){return t.classList||new La(t)}function La(t){this._node=t,this._names=Aa(t.getAttribute("class")||"")}function Va(t,n){for(var i=Sa(t),e=-1,r=n.length;++e<r;)i.add(n[e])}function Da(t,n){for(var i=Sa(t),e=-1,r=n.length;++e<r;)i.remove(n[e])}function Na(t){return function(){Va(this,t)}}function Oa(t){return function(){Da(this,t)}}function Ta(t,n){return function(){(n.apply(this,arguments)?Va:Da)(this,t)}}function Ea(){this.textContent=""}function Fa(t){return function(){this.textContent=t}}function Ba(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Pa(){this.innerHTML=""}function _a(t){return function(){this.innerHTML=t}}function Ha(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ia(){this.nextSibling&&this.parentNode.appendChild(this)}function Wa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ra(t){return function(){var n=this.ownerDocument,i=this.namespaceURI;return i===sa&&n.documentElement.namespaceURI===sa?n.createElement(t):n.createElementNS(i,t)}}function $a(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function za(t){var n=fa(t);return(n.local?$a:Ra)(n)}function ja(){return null}function Ya(){var t=this.parentNode;t&&t.removeChild(this)}function Xa(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Ga(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function qa(t){return function(){var n=this.__on;if(n){for(var i,e=0,r=-1,o=n.length;e<o;++e)i=n[e],t.type&&i.type!==t.type||i.name!==t.name?n[++r]=i:this.removeEventListener(i.type,i.listener,i.options);++r?n.length=r:delete this.__on}}}function Ua(t,n,i){return function(){var e,r=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(r)for(var u=0,a=r.length;u<a;++u)if((e=r[u]).type===t.type&&e.name===t.name)return this.removeEventListener(e.type,e.listener,e.options),this.addEventListener(e.type,e.listener=o,e.options=i),void(e.value=n);this.addEventListener(t.type,o,i),e={type:t.type,name:t.name,value:n,listener:o,options:i},r?r.push(e):this.__on=[e]}}function Za(t,n,i){var e=ma(t),r=e.CustomEvent;"function"==typeof r?r=new r(n,i):(r=e.document.createEvent("Event"),i?(r.initEvent(n,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}function Ka(t,n){return function(){return Za(this,t,n)}}function Ja(t,n){return function(){return Za(this,t,n.apply(this,arguments))}}La.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Qa=[null];function tl(t,n){this._groups=t,this._parents=n}function nl(t){return"string"==typeof t?new tl([[document.querySelector(t)]],[document.documentElement]):new tl([[t]],Qa)}function il(t){return"string"==typeof t?new tl([document.querySelectorAll(t)],[document.documentElement]):new tl([Uu(t)],Qa)}function el(t){this._context=t}function rl(t){return new el(t)}function ol(t){this._context=t}function ul(t){var n,i,e=t.length-1,r=new Array(e),o=new Array(e),u=new Array(e);for(r[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<e-1;++n)r[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(r[e-1]=2,o[e-1]=7,u[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=r[n]/o[n-1],o[n]-=i,u[n]-=i*u[n-1];for(r[e-1]=u[e-1]/o[e-1],n=e-2;n>=0;--n)r[n]=(u[n]-r[n+1])/o[n];for(o[e-1]=(t[e]+r[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-r[n+1];return[r,o]}function al(t){return new ol(t)}function ll(t,n){this._context=t,this._t=n}function sl(t){return new ll(t,.5)}function cl(t){return new ll(t,0)}function fl(t){return new ll(t,1)}function dl(t){const n=(4-t.length%4)%4;return t+"=".repeat(n)}function vl(t){if("string"!=typeof t)return!1;if(t.length%4!=0&&(t=dl(t)),!/^[A-Za-z0-9+/]+={0,2}$/.test(t))return!1;try{return hl(t),!0}catch{return!1}}function hl(t){if("undefined"!=typeof window&&"function"==typeof atob){const n=atob(t),i=n.length,e=new Uint8Array(i);for(let t=0;t<i;t++)e[t]=n.charCodeAt(t);return e}throw new Error("Base64 decoding is not supported in this environment.")}function pl(t,n){t=dl(t);try{const i=hl(t);switch(n){case"f8":return Array.from(new Float64Array(i.buffer));case"i8":case"i4":return Array.from(new Int32Array(i.buffer));case"u8":return Array.from(new Uint32Array(i.buffer));case"i2":return Array.from(new Int16Array(i.buffer));case"i1":return Array.from(new Int8Array(i.buffer));default:try{return i.toString()}catch(t){return i}}}catch(n){throw new Error(`Failed to decode base64 value: ${t}`)}}function gl(t){for(const[n,i]of Object.entries(t))if("object"!=typeof i||Array.isArray(i)||null===i){if("bdata"===n&&"string"==typeof i&&vl(i)){const e=t.dtype||"utf-8";t[n]=pl(i,e)}else if(Array.isArray(i))for(let t=0;t<i.length;t++)"object"==typeof i[t]&&null!==i[t]&&gl(i[t])}else gl(i)}function yl(t,n){if(1===n.length)return t;if(2===n.length){const[i,e]=n,r=[];for(let n=0;n<i;n++)r.push(t.slice(n*e,(n+1)*e));return r}const[i,...e]=n,r=t.length/i,o=[];for(let n=0;n<i;n++)o.push(yl(t.slice(n*r,(n+1)*r),e));return o}function ml(t){const n=JSON.parse(JSON.stringify(t.data));if(gl(t.data),JSON.stringify(t.data)!==JSON.stringify(n)){for(const n of t.data||[])["y","x","z","r","theta","values"].forEach((t=>{if(n[t]&&"object"==typeof n[t]&&"bdata"in n[t]){const i=n[t].bdata;let e=n[t].shape;if("string"==typeof e){let t;try{t=JSON.parse(e),Ol(t)||(t=void 0)}catch(n){const i=e.split(",").map((t=>Number(t.trim())));i.every((t=>!isNaN(t)))?t=i:e=void 0}e=t}void 0!==e&&Ol(e)?n[t]=yl(i,e):n[t]=i}}));return t}return t.data=n,t}tl.prototype=function(){return new tl([[document.documentElement]],Qa)}.prototype={constructor:tl,select:function(t){"function"!=typeof t&&(t=qu(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u,a=n[r],l=a.length,s=e[r]=new Array(l),c=0;c<l;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),s[c]=u);return new tl(e,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Uu(t.apply(this,arguments))}}(t):function(t){return null==t?Zu:function(){return this.querySelectorAll(t)}}(t);for(var n=this._groups,i=n.length,e=[],r=[],o=0;o<i;++o)for(var u,a=n[o],l=a.length,s=0;s<l;++s)(u=a[s])&&(e.push(t.call(u,u.__data__,s,a)),r.push(u));return new tl(e,r)},selectChild:function(t){return this.select(null==t?Qu:function(t){return function(){return Ju.call(this.children,t)}}("function"==typeof t?t:Ku(t)))},selectChildren:function(t){return this.selectAll(null==t?na:function(t){return function(){return ta.call(this.children,t)}}("function"==typeof t?t:Ku(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var n=this._groups,i=n.length,e=new Array(i),r=0;r<i;++r)for(var o,u=n[r],a=u.length,l=e[r]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&l.push(o);return new tl(e,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,ua);var i,e=n?oa:ra,r=this._parents,o=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var u=o.length,a=new Array(u),l=new Array(u),s=new Array(u),c=0;c<u;++c){var f=r[c],d=o[c],v=d.length,h=aa(t.call(f,f&&f.__data__,c,r)),p=h.length,g=l[c]=new Array(p),y=a[c]=new Array(p);e(f,d,g,y,s[c]=new Array(v),h,n);for(var m,b,x=0,w=0;x<p;++x)if(m=g[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<p;);m._next=b||null}}return(a=new tl(a,r))._enter=l,a._exit=s,a},enter:function(){return new tl(this._enter||this._groups.map(ia),this._parents)},exit:function(){return new tl(this._exit||this._groups.map(ia),this._parents)},join:function(t,n,i){var e=this.enter(),r=this,o=this.exit();return"function"==typeof t?(e=t(e))&&(e=e.selection()):e=e.append(t+""),null!=n&&(r=n(r))&&(r=r.selection()),null==i?o.remove():i(o),e&&r?e.merge(r).order():r},merge:function(t){for(var n=t.selection?t.selection():t,i=this._groups,e=n._groups,r=i.length,o=e.length,u=Math.min(r,o),a=new Array(r),l=0;l<u;++l)for(var s,c=i[l],f=e[l],d=c.length,v=a[l]=new Array(d),h=0;h<d;++h)(s=c[h]||f[h])&&(v[h]=s);for(;l<r;++l)a[l]=i[l];return new tl(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,i=t.length;++n<i;)for(var e,r=t[n],o=r.length-1,u=r[o];--o>=0;)(e=r[o])&&(u&&4^e.compareDocumentPosition(u)&&u.parentNode.insertBefore(e,u),u=e);return this},sort:function(t){function n(n,i){return n&&i?t(n.__data__,i.__data__):!n-!i}t||(t=la);for(var i=this._groups,e=i.length,r=new Array(e),o=0;o<e;++o){for(var u,a=i[o],l=a.length,s=r[o]=new Array(l),c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(n)}return new tl(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e=t[n],r=0,o=e.length;r<o;++r){var u=e[r];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,i=0,e=n.length;i<e;++i)for(var r,o=n[i],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var i=fa(t);if(arguments.length<2){var e=this.node();return i.local?e.getAttributeNS(i.space,i.local):e.getAttribute(i)}return this.each((null==n?i.local?va:da:"function"==typeof n?i.local?ya:ga:i.local?pa:ha)(i,n))},style:function(t,n,i){return arguments.length>1?this.each((null==n?ba:"function"==typeof n?wa:xa)(t,n,null==i?"":i)):function(t,n){return t.style.getPropertyValue(n)||ma(t).getComputedStyle(t,null).getPropertyValue(n)}(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Ca:"function"==typeof n?ka:Ma)(t,n)):this.node()[t]},classed:function(t,n){var i=Aa(t+"");if(arguments.length<2){for(var e=Sa(this.node()),r=-1,o=i.length;++r<o;)if(!e.contains(i[r]))return!1;return!0}return this.each(("function"==typeof n?Ta:n?Na:Oa)(i,n))},text:function(t){return arguments.length?this.each(null==t?Ea:("function"==typeof t?Ba:Fa)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Pa:("function"==typeof t?Ha:_a)(t)):this.node().innerHTML},raise:function(){return this.each(Ia)},lower:function(){return this.each(Wa)},append:function(t){var n="function"==typeof t?t:za(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var i="function"==typeof t?t:za(t),e=null==n?ja:"function"==typeof n?n:qu(n);return this.select((function(){return this.insertBefore(i.apply(this,arguments),e.apply(this,arguments)||null)}))},remove:function(){return this.each(Ya)},clone:function(t){return this.select(t?Ga:Xa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,i){var e,r,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?Ua:qa,e=0;e<u;++e)this.each(a(o[e],n,i));return this}var a=this.node().__on;if(a)for(var l,s=0,c=a.length;s<c;++s)for(e=0,l=a[s];e<u;++e)if((r=o[e]).type===l.type&&r.name===l.name)return l.value},dispatch:function(t,n){return this.each(("function"==typeof n?Ja:Ka)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var e,r=t[n],o=0,u=r.length;o<u;++o)(e=r[o])&&(yield e)}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=ul(t),r=ul(n),o=0,u=1;u<i;++o,++u)this._context.bezierCurveTo(e[0][o],r[0][o],e[1][o],r[1][o],t[u],n[u]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};const bl="Unsupported chart - type :",xl=t=>!isNaN(parseFloat(t))&&isFinite(t),wl=t=>{if(xl(t))return!1;const n=new Date(Date.parse(t));if(isNaN(n.getTime()))return!1;const i=n.getFullYear();return!!(/\b\d{4}\b/.test(t)||2e3!==i&&2001!==i)},Cl=(t,n,...i)=>!!Ol(t)&&0!==t.length&&(Array.isArray(t[0])?t.every((t=>t.every((t=>n(t,...i))))):t.every((t=>n(t,...i)))),Ml=t=>Cl(t,(t=>wl(t)||null===t)),kl=t=>Cl(t,(t=>"string"==typeof t&&xl(t)||"number"==typeof t||null===t)),Al=t=>Cl(t,(t=>(t=>{if("string"!=typeof t)return!1;const n=new Date(`${t} 1, 2000`);if(isNaN(n.getTime()))return!1;const i=[void 0,"en-US"];for(const e of i){const i=n.toLocaleString(e,{month:"long"}),r=n.toLocaleString(e,{month:"short"});if(t.toLowerCase()===i.toLowerCase()||t.toLowerCase()===r.toLowerCase())return!0}return!1})(t)||null===t)),Sl=t=>Cl(t,(t=>(t=>{if(xl(t)){const n="string"==typeof t?parseFloat(t):Number(t);return Number.isInteger(n)&&n>=1900&&n<=2100}return!1})(t)||null===t)),Ll=t=>Cl(t,(t=>"string"==typeof t||null===t)),Vl=t=>Cl(t,(t=>"object"==typeof t&&null!==t&&!Ol(t))),Dl=t=>null==t||"number"==typeof t&&!isFinite(t),Nl=(t,n=0)=>{if(n>15)throw new Error("Maximum json depth exceeded");if("object"==typeof t&&null!==t)for(const i in t)t.hasOwnProperty(i)&&("string"==typeof t[i]?t[i]=t[i].replace(/</g,"&lt;").replace(/>/g,"&gt;"):t[i]=Nl(t[i],n+1));return t};function Ol(t){return Array.isArray(t)||function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(t)}const Tl=(t,n)=>{if(!(t=>!(Array.isArray(t.x)&&t.x.length>0&&Array.isArray(t.x[0])||Array.isArray(t.y)&&t.y.length>0&&Array.isArray(t.y[0])))(t))throw new Error("Invalid 2D series encountered.");if(n&&!kl(t.y))throw new Error("Non numeric Y values encountered.")},El=t=>["markers","text+markers","markers+text","text"].includes(t),Fl=(t,n)=>{var i,e,r;const o=null!==(i=t.mode)&&void 0!==i?i:"",u=t&&t.x&&t.x.length>0?typeof(null===(e=null==t?void 0:t.x)||void 0===e?void 0:e[0]):"undefined",a=t&&t.y&&t.y.length>0?typeof(null===(r=null==t?void 0:t.y)||void 0===r?void 0:r[0]):"undefined";if(El(o)){if(!kl(t.x)&&!Ll(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!kl(t.y)&&!Ll(t.y))throw new Error(`${bl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}else{if(!["lines+markers","markers+lines","text+lines+markers","lines","text+lines","lines+text","lines+markers+text"].includes(o))throw new Error(`${bl} ${t.type}, mode: ${o}, Unsupported mode`);if(!kl(t.x)&&!Ll(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, mode: ${o}, xAxisType: ${u}`);if(!kl(t.y)&&!Ll(t.y))throw new Error(`${bl} ${t.type}, mode: ${o}, yAxisType: ${a}`)}const l=Wl(t),s=Rl(t);if(l&&s)throw new Error(`${bl} ${t.type}, Fallback to VerticalStackedBarChart is not allowed for Area Charts.`);if(l&&Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported for AreaChart.`);if(s&&Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported for VSBC fallback.`)},Bl=(t,n)=>{const i=Hl(t);return Object.keys(i).some((t=>{var e;const r=Il(t,i[t]);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)}))},Pl={indicator:[t=>{var n;if(!(null===(n=t.mode)||void 0===n?void 0:n.includes("gauge")))throw new Error(`${bl} ${t.type}, mode: ${t.mode}`)}],histogram:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)},t=>Tl(t,!1)],bar:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)},t=>{(t=>{if("h"===t.orientation){if(!kl(t.x)&&!Ml(t.x))throw new Error(`${bl} ${t.type}, orientation: ${t.orientation}, string x values not supported.`);if(!_l(t)&&Ml(t.x))throw new Error(`${bl} ${t.type}, orientation: ${t.orientation}, date x values not supported in HBWA.`);Tl(t,!1)}else if(!kl(t.y)&&!Ll(t.y)&&!Vl(t.y))throw new Error("Non numeric, string, or object Y values encountered, type: "+typeof t.y)})(t)}],sankey:[t=>{if(function(t){var n,i,e,r;const o={};null===(i=null===(n=t.node)||void 0===n?void 0:n.label)||void 0===i||i.forEach(((t,n)=>o[n]=[])),null===(r=null===(e=t.link)||void 0===e?void 0:e.value)||void 0===r||r.forEach(((n,i)=>{var e,r,u,a;Dl(n)||Dl(null===(r=null===(e=t.link)||void 0===e?void 0:e.source)||void 0===r?void 0:r[i])||Dl(null===(a=null===(u=t.link)||void 0===u?void 0:u.target)||void 0===a?void 0:a[i])||o[t.link.source[i]].push(t.link.target[i])}));const u=new Set,a=new Set;function l(t,n){if(Dl(t)||!o[t])return!1;if(a.has(t))return!0;if(!u.has(t)){u.add(t),a.add(t);for(const i of o[t])if(l(i,[...n,i]))return!0;return a.delete(t),!1}}for(let t=0;t<Object.keys(o).length;t++)if(l(t,[t]))return!0;return!1}(t))throw new Error(`${bl} ${t.type}, Cycles in Sankey chart not supported`)}],scatter:[(t,n)=>Fl(t,n)],scattergl:[(t,n)=>Fl(t,n)],scatterpolar:[t=>{if(!kl(t.theta)&&!Ll(t.theta))throw new Error(`${bl} ${t.type}, theta values must be array of numbers or strings`);if(!kl(t.r))throw new Error(`${bl} ${t.type}, Non numeric r values`)}],funnel:[t=>Tl(t,!1)],histogram2d:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)}],heatmap:[(t,n)=>{if(Bl(t,n))throw new Error(`${bl} ${t.type}, log axis type not supported.`)}]},_l=t=>Ml(t.base)||kl(t.base),Hl=t=>{let n=1;"string"==typeof t.xaxis&&/^x\d+$/.test(t.xaxis)&&(n=parseInt(t.xaxis.slice(1),10));let i=1;return"string"==typeof t.yaxis&&/^y\d+$/.test(t.yaxis)&&(i=parseInt(t.yaxis.slice(1),10)),{x:n,y:i}},Il=(t,n)=>`${t}axis${n>1?n:""}`,Wl=t=>"tonexty"===t.fill||"tozeroy"===t.fill||!!t.stackgroup,Rl=t=>{var n;if(El(null!==(n=t.mode)&&void 0!==n?n:""))return!1;const i=Ml(t.x),e=kl(t.x),r=Sl(t.x),o=Al(t.x),u=Ll(t.y);return!((i||e||o)&&!r&&!u)};var $l,zl,jl,Yl,Xl={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.11",color12:"qualitative.12",color13:"qualitative.13",color14:"qualitative.14",color15:"qualitative.15",color16:"qualitative.16",color17:"qualitative.17",color18:"qualitative.18",color19:"qualitative.19",color20:"qualitative.20",color21:"qualitative.21",color22:"qualitative.22",color23:"qualitative.23",color24:"qualitative.24",color25:"qualitative.25",color26:"qualitative.26",color27:"qualitative.27",color28:"qualitative.28",color29:"qualitative.29",color30:"qualitative.30",color31:"qualitative.31",color32:"qualitative.32",color33:"qualitative.33",color34:"qualitative.34",color35:"qualitative.35",color36:"qualitative.36",color37:"qualitative.37",color38:"qualitative.38",color39:"qualitative.39",color40:"qualitative.40",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},Gl={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],11:["#3c51b4","#93a4f4"],12:["#ad006a","#ee5fb7"],13:["#026467","#4cb4b7"],14:["#674c8c","#a083c9"],15:["#0e7a0b","#27ac22"],16:["#2c72a8","#4fa1e1"],17:["#9a3d0c","#d77440"],18:["#405f14","#73aa24"],19:["#863593","#c36bd1"],20:["#6d5700","#d0b232"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"],30:["#937700","#c19c00"],31:["#2c3c85","#c8d1fa"],32:["#7f004e","#f7adda"],33:["#02494c","#9bd9db"],34:["#4c3867","#b29ad4"],35:["#0b5a08","#a7e3a5"],36:["#20547c","#83bdeb"],37:["#712d09","#df8e64"],38:["#23330b","#a4cc6c"],39:["#63276d","#cf87da"],40:["#3a2f00","#dac157"]},ql={qualitative:Gl,semantic:{info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]}},Ul=Object.values(Gl),Zl=Object.values(Xl),Kl=function(t,n){if(0===t.length)return"";var i=Number(n);return i<t.length?t[i]:t[0]},Jl=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=Ul[(t+n)%Ul.length];return Kl(e,i)},Ql=function(t,n){if(void 0===n&&(n=!1),Zl.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=ql[e][r];return Kl(o,n)}return t},ts=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ns=function(t){var n=t.r,i=t.g,e=t.b;return{r:ts(n/255),g:ts(i/255),b:ts(e/255)}},is=function(t){return.2126*t.r+.7152*t.g+.0722*t.b},es=function(t,n){var i=is(ns(Vo(t))),e=is(ns(Vo(n)));return(Math.max(i,e)+.05)/(Math.min(i,e)+.05)};function rs(t,n){void 0===n&&(n=!1);var i=Pu(".2~",t);Math.abs(t)<1?i=Bu(".2~g"):n&&Math.abs(t)>=1e3&&(i=Pu(".1~",t));var e=i(t);return Math.abs(t)>=1e9?e.replace("G","B"):e}function os(t){return rs(t)}function us(t,n,i,e,r){var o,u=t.domainNRangeValues,a=t.showRoundOffXTickValues,l=void 0===a||a,s=t.xAxistickSize,c=void 0===s?6:s,f=t.tickPadding,d=void 0===f?10:f,v=t.xAxisCount,h=t.xAxisElement,p=t.hideTickOverlap,g=t.calcMaxLabelWidth,y=Xs(r).domain([u.dStartValue,u.dEndValue]).range([u.rStartValue,u.rEndValue]);l&&y.nice();var m=null!=v?v:6,b=function(t,i,r){if(n.tickFormat)return Bu(n.tickFormat)(t);var o="number"==typeof t?t:t.valueOf();return""===(null==r?void 0:r(o))?"":(0,_n.c$)(o,e)};if(p&&void 0===v){var x=g(y.ticks().map((function(t,n){return b(t)})))+20,w=y.range(),C=w[0],M=w[1];m=Math.min(Math.max(1,Math.floor(Math.abs(M-C)/x)),10)}var k=Gn(y).tickSize(c).tickPadding(d).ticks(m).tickFormat((function(t,n){return b(t,0,y.tickFormat(m))}));[zl.HorizontalBarChartWithAxis,zl.GanttChart].includes(i)&&k.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues&&k.tickValues(n.tickValues),h&&nl(h).call(k).selectAll("text").attr("aria-hidden","true");var A=(null!==(o=n.tickValues)&&void 0!==o?o:y.ticks(m)).map(k.tickFormat());return{xScale:y,tickValues:A}}function as(t,n){var i,e=Ai,r=n?Li:Si,o=n?Di:Vi,u=n?Oi:Ni,a=n?Zi:Ui,l=n?$i:Fi,s=n?Ji:Ki,c=[{formatLevel:0,condition:function(t){return e(t)<t}},{formatLevel:1,condition:function(t){return r(t)<t}},{formatLevel:2,condition:function(t){return o(t)<t}},{formatLevel:3,condition:function(t){return u(t)<t}},{formatLevel:4,condition:function(t){return a(t)<t&&l(t)<t}},{formatLevel:5,condition:function(t){return a(t)<t}},{formatLevel:6,condition:function(t){return s(t)<t}},{formatLevel:7,condition:function(){return!0}}].find((function(n){return(0,n.condition)(t)}));return null!==(i=null==c?void 0:c.formatLevel)&&void 0!==i?i:7}function ls(t,n){var i=t.yMinMaxValues,e=void 0===i?{startValue:0,endValue:0}:i,r=t.yAxisElement,o=void 0===r?null:r,u=t.yMaxValue,a=void 0===u?0:u,l=t.yMinValue,s=void 0===l?0:l,c=t.containerHeight,f=t.margins,d=t.tickPadding,v=void 0===d?12:d,h=t.maxOfYVal,p=void 0===h?0:h,g=t.yAxisTickFormat,y=t.yAxisTickCount,m=void 0===y?4:y,b=p||e.endValue,x=b>a?b:a,w=e.startValue<s?Math.min(0,e.startValue):s,C=Iu().domain([w,x]).range([c-f.bottom,f.top]),M=(n?Xn(C):qn(C)).tickPadding(v).ticks(m);return g?M.tickFormat(g):M.tickFormat(os),o&&nl(o).call(M).selectAll("text").attr("aria-hidden","true"),C}function ss(t,n,i,e,r,o,u,a){void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===u&&(u=!1);var l=t.yMinMaxValues,s=void 0===l?{startValue:0,endValue:0}:l,c=t.yAxisElement,f=void 0===c?null:c,d=t.yMaxValue,v=void 0===d?0:d,h=t.yMinValue,p=void 0===h?0:h,g=t.containerHeight,y=t.containerWidth,m=t.margins,b=t.tickPadding,x=void 0===b?12:b,w=t.maxOfYVal,C=void 0===w?0:w,M=t.yAxisTickFormat,k=t.yAxisTickCount,A=void 0===k?4:k,S=t.eventAnnotationProps,L=t.eventLabelHeight,V=C||s.endValue||0,D=V>v?V:v,N=o?Math.min(s.startValue||0,p||0):s.startValue<p?0:p,O=function(t,n,i,e,r){if(r)return function(t,n,i){var e,r,o=t<0&&t===n?0:n,u=ii(t>=0&&t===n?0:t,o,i),a=Qn(u[0],u[u.length-1],i);return a[a.length-1]>o&&(e=o,r=(0,_n.Di)(e),Math.log10(r)%1==0)&&a.pop(),a}(n,t,i);var o=e||(t-n)/i>=1?Math.ceil((t-n)/i):(t-n)/i,u=[n<0&&t>=0?0:n];if(u[0]===n&&u.push(n+o),n<0&&t>=0){for(;u[u.length-1]>n;)u.push(u[u.length-1]-o);u.reverse()}for(;u[u.length-1]<t;)u.push(u[u.length-1]+o);return u}(D,N,A,e,u),T=[o?O[0]:N,O[O.length-1]];if("log"===a){var E=s.startValue,F=s.endValue;p>0&&(E=Math.min(E,p)),v>0&&(F=Math.max(F,v)),T=[E,F]}var B=Xs(a).domain(T).range([g-m.bottom,m.top+(S?L:0)]),P=(!n&&r||n&&!r?Xn(B):qn(B)).tickPadding(x).tickSizeInner(-(y-m.left-m.right));return"log"!==a&&P.tickValues(O),M?P.tickFormat(M):P.tickFormat((function(t,n){return function(t,n,i){var e="number"==typeof t?t:t.valueOf();return""===(null==i?void 0:i(e))?"":os(e)}(t,0,B.tickFormat(A))})),f&&nl(f).call(P).selectAll("text").attr("aria-hidden","true"),i.yAxisDomainValues=O,B}!function(t){t[t.AreaChart=0]="AreaChart",t[t.LineChart=1]="LineChart",t[t.VerticalBarChart=2]="VerticalBarChart",t[t.VerticalStackedBarChart=3]="VerticalStackedBarChart",t[t.GroupedVerticalBarChart=4]="GroupedVerticalBarChart",t[t.HeatMapChart=5]="HeatMapChart",t[t.HorizontalBarChartWithAxis=6]="HorizontalBarChartWithAxis",t[t.ScatterChart=7]="ScatterChart",t[t.GanttChart=8]="GanttChart"}(zl||(zl={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(jl||(jl={})),function(t){t[t.NumericAxis=0]="NumericAxis",t[t.DateAxis=1]="DateAxis",t[t.StringAxis=2]="StringAxis"}(Yl||(Yl={}));var cs=function(t,n,i,e){var r=t.containerHeight,o=t.tickPadding,u=void 0===o?12:o,a=t.margins,l=t.yAxisTickFormat,s=t.yAxisElement,c=t.yAxisPadding,f=null!=c?c:.5;f=1===f?.99:f;var d=ku().domain(n).range([r-a.bottom,a.top]).padding(f),v=(i?Xn(d):qn(d)).tickPadding(u).ticks(n);return l&&v.tickFormat(l),s&&nl(s).call(v).selectAll("text"),d},fs=function(t,n,i,e,r){var o=t.containerHeight,u=t.tickPadding,a=void 0===u?12:u,l=t.margins,s=t.yAxisTickFormat,c=t.yAxisElement,f=t.yAxisPadding,d=void 0===f?0:f,v=t.containerWidth,h=ku().domain(n).range([o-l.bottom,l.top]).padding(d);r===zl.VerticalStackedBarChart&&h.paddingInner(1).paddingOuter(0);var p=i?Xn(h):qn(h),g=p.tickPadding(a).tickValues(n).tickSize(0);return r===zl.VerticalStackedBarChart&&p.tickSizeInner(-(v-l.left-l.right)),s&&g.tickFormat(s),c&&nl(c).call(g).selectAll("text"),h};function ds(t){var n=[];t.forEach((function(t){var i=t.data.filter((function(t){return!t.hideCallout})).map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{legend:t.legend,color:t.color,index:t.index})}));n=n.concat(i)}));var i={};return n.forEach((function(t){var n=t.x instanceof Date?t.x.getTime():t.x;n in i?i[n].push({legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}):i[n]=[{legend:t.legend,y:t.y,color:t.color,xAxisCalloutData:t.xAxisCalloutData,yAxisCalloutData:t.yAxisCalloutData,callOutAccessibilityData:t.callOutAccessibilityData,index:t.index}]})),Object.keys(i).map((function(t){return{x:isNaN(Number(t))?t:Number(t),values:i[t]}}))}var vs=function(t,n,i){var e=nl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},hs=function(t,n){void 0===n&&(n="none");var i=0,e=document.createElement("canvas").getContext("2d");if(e){var r=document.querySelector(n);if(r){var o=window.getComputedStyle(r,null),u=o.getPropertyValue("font-weight"),a=o.getPropertyValue("font-size"),l=o.getPropertyValue("font-family");e.font="".concat(u," ").concat(a," ").concat(l)}else e.font='600 10px "Segoe UI"';t.forEach((function(t){i=Math.max(e.measureText(t.toString()).width,i)}))}return i};function ps(t){var n=t.tooltipCls,i=t.axis,e=t.id;if(null===i)return null;for(var r=nl("body").append("div").attr("id",e).attr("class",n).style("opacity",0),o=i.selectAll("#BaseSpan")._groups[0],u=o&&Object.keys(o).length,a=[],l=0;l<u;l++){var s=o[l].dataset&&Object.values(o[l].dataset)[0];a.push(s)}var c=i.selectAll(".tick")._groups[0],f=c&&Object.keys(c).length,d=function(t){nl(c[t]).on("mouseover",(function(n,i){r.style("opacity",.9),r.text(a[t]).style("left",n.pageX+"px").style("top",n.pageY-28+"px")})).on("mouseout",(function(t){r.style("opacity",0)}))};for(l=0;l<f;l++)d(l)}function gs(t){var n=!1;return t&&t.length>0&&t.forEach((function(t){t.data.length>0&&(n=t.data[0].x instanceof Date)})),n}function ys(t,n,i,e,r,o){var u=js(t),a=Zs(t,r),l=a[0],s=a[1];if(o){var c=Gs(l,s,r);l-=c.start,s+=c.end}var f=n.left,d=i-n.right;return e?{dStartValue:u?1:s,dEndValue:u?-1:l,rStartValue:f,rEndValue:d}:{dStartValue:u?-1:l,dEndValue:u?1:s,rStartValue:f,rEndValue:d}}function ms(t){var n={};return t.forEach((function(t){var i=t.y;n[i]||(n[i]=[]),n[i].push(t)})),Object.values(n)}function bs(t,n){var i=0,e=0;return t.forEach((function(t){var r=t.reduce((function(t,n){return t+(n.x>0?n.x:0)}),n),o=t.reduce((function(t,n){return t+(n.x<0?n.x:0)}),n);i=Math.max(i,r),e=Math.min(e,o)})),{longestPositiveBar:i,longestNegativeBar:e}}function xs(t,n,i){var e=t.left,r=n-t.right;return i?{dStartValue:0,dEndValue:0,rStartValue:r,rEndValue:e}:{dStartValue:0,dEndValue:0,rStartValue:e,rEndValue:r}}function ws(t,n,i,e,r,u,a,l){var s,c,f;if(void 0===r&&(r=[]),[zl.AreaChart,zl.LineChart,zl.ScatterChart].includes(u)){if(c=(s=Zs(t))[0],f=s[1],c=ei((0,o.fX)((0,o.fX)([],r,!0),[c],!1)),f=ri((0,o.fX)((0,o.fX)([],r,!0),[f],!1)),l||u===zl.ScatterChart){var d=Gs(c.getTime(),f.getTime());c=new Date(c.getTime()-d.start),f=new Date(f.getTime()+d.end)}}else c=ei(t,(function(t){return t.x})),f=ri(t,(function(t){return t.x}));var v=n.left,h=i-n.right;return e?{dStartValue:f,dEndValue:c,rStartValue:v,rEndValue:h}:{dStartValue:c,dEndValue:f,rStartValue:v,rEndValue:h}}function Cs(t,n,i,e){var r=[];return t.forEach((function(t){!i==!t.useSecondaryYScale&&t.data.forEach((function(t){qs(t.y,e)&&r.push(t.y)}))})),{startValue:ei(r),endValue:ri(r)}}function Ms(t,n,i){var e=[];return t.forEach((function(t){i||e.push(t.y),void 0!==t.lineData&&!i==!t.lineData.useSecondaryYScale&&e.push(t.lineData.y)})),{startValue:ei(e),endValue:ri(e)}}function ks(t,n){if(void 0!==n&&n===Yl.NumericAxis){var i=ri(t,(function(t){return t.y}));return{startValue:ei(t,(function(t){return t.y})),endValue:i}}return{startValue:0,endValue:0}}var As,Ss,Ls=function(t,n){if(n)switch(typeof t){case"string":return jl.StringAxis;case"number":return jl.NumericAxis;default:return jl.DateAxis}else switch(typeof t){case"string":return Yl.StringAxis;case"number":return Yl.NumericAxis;default:return Yl.DateAxis}};!function(t){t[t.circle=0]="circle",t[t.square=1]="square",t[t.triangle=2]="triangle",t[t.diamond=3]="diamond",t[t.pyramid=4]="pyramid",t[t.hexagon=5]="hexagon",t[t.pentagon=6]="pentagon",t[t.octagon=7]="octagon"}(As||(As={})),function(t){t[t.dottedLine=0]="dottedLine"}(Ss||(Ss={}));var Vs=(($l={})[As.circle]={widthRatio:1},$l[As.square]={widthRatio:1},$l[As.triangle]={widthRatio:1},$l[As.diamond]={widthRatio:1},$l[As.pyramid]={widthRatio:1},$l[As.hexagon]={widthRatio:2},$l[As.pentagon]={widthRatio:1.168},$l[As.octagon]={widthRatio:2.414},$l),Ds=function(t,n,i){return void 0===n&&(n="text"),void 0===i&&(i=!0),{role:n,"data-is-focusable":i,"aria-label":(t=null!=t?t:{}).ariaLabel,"aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy}};function Ns(t){return rs(t,!0)}var Os=function(t,n,i,e){var r;return void 0===i&&(i=16),r="auto"===t||"histogram"===e?i:"number"==typeof t?t:Math.min(i,16),"number"==typeof n&&(r=Math.min(r,n)),Math.max(r,1)},Ts=function(t,n,i){void 0===i&&(i=0);var e="number"==typeof t?t:"number"==typeof n?n:i;return Math.max(0,Math.min(e,1))},Es=function(t,n){return"number"==typeof t||"number"==typeof n};function Fs(t){return void 0===t&&(t={}),t.dangerouslySetInnerHTML,(0,o.Tt)(t,["dangerouslySetInnerHTML"])}function Bs(t,n){if(t===n)return!0;if(!t&&!n)return!0;if(!t||!n||t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}var Ps=/var\((--[a-zA-Z0-9\-]+)\)/g;function _s(t,n,i){var e=getComputedStyle(n);Array.isArray(t)?t.forEach((function(t){nl(i).style(t,e.getPropertyValue(t))})):Object.entries(t).forEach((function(t){var n=t[0],r=t[1];nl(i).style(r,e.getPropertyValue(n))}))}var Hs={position:"absolute",visibility:"hidden",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Is=p("measurement_span_");function Ws(t,n){if(void 0===n&&(n=rl),"function"==typeof t)return t;switch(t){case"linear":return rl;case"natural":return al;case"step":return sl;case"stepAfter":return fl;case"stepBefore":return cl;default:return n}}var Rs=/(category|total|sum|min|max|mean|median) (ascending|descending)/,$s=function(t,n){if(Array.isArray(n)){var i=[],e=new Set;return n.forEach((function(n){t[n]&&!e.has(n)&&(i.push(n),e.add(n))})),Object.keys(t).forEach((function(t){e.has(t)||i.push(t)})),i}var r=null==n?void 0:n.match(Rs);if(r){var o=r[1],u=r[2];if("category"===o){var a=Object.keys(t).sort();return"descending"===u?a.reverse():a}var l={min:ei,max:ri,sum:oi,total:oi,mean:ui,median:fi},s=[];return Object.keys(t).forEach((function(n){s.push([n,l[o](t[n])||0])})),s.sort("descending"===u?function(t,n){return n[1]-t[1]}:function(t,n){return t[1]-n[1]}),s.map((function(t){return t[0]}))}return Object.keys(t)};function zs(t,n){var i=n.semanticColors.bodyText;return es(i,t)<3&&(i=function(t,n){return t===n.semanticColors.bodyText?n.semanticColors.bodyBackground:n.semanticColors.bodyText}(i,n)),i}function js(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"scatterpolar"===t.lineOptions.mode}))}var Ys,Xs=function(t){return"log"===t?Xu():Iu()},Gs=function(t,n,i){if("log"===i)return{start:.5*t,end:n};var e=.1*(n-t);return{start:e,end:e}},qs=function(t,n){return"number"!=typeof t||"log"!==n||t>0},Us=function(t,n){return!Dl(t)&&!Dl(n)},Zs=function(t,n){var i=function(t){return qs(t.x,n)};return[ei(t,(function(t){return ei(t.data.filter(i),(function(t){return t.x}))})),ri(t,(function(t){return ri(t.data.filter(i),(function(t){return t.x}))}))]},Ks=function(t){var n=t.data,i=t.xScale,e=t.yScalePrimary,r=t.yScaleSecondary,o=t.useSecondaryYScale,u=t.xScaleType,a=t.yScaleType,l=t.secondaryYScaleType,s=Zs(n,u),c=s[0],f=s[1],d=Gs(+c,+f,u),v=c instanceof Date?new Date(+c-d.start):c-d.start,h=f instanceof Date?new Date(+f+d.end):f+d.end,p=Math.min(Math.abs(i(c)-i(v)),Math.abs(i(h)-i(f))),g=o?l:a,y=Cs(n,0,o,g),m=y.startValue,b=y.endValue,x=Gs(m,b,g),w=m-x.start,C=b+x.end,M=o?r:e,k=Math.min(Math.abs(M(w)-M(m)),Math.abs(M(b)-M(C)));return Math.min(p,k)},Js=i(357),Qs={gradient1:"default.1",gradient2:"default.2",gradient3:"default.3",gradient4:"default.4",gradient5:"default.5",gradient6:"default.6",gradient7:"default.7",gradient8:"default.8",gradient9:"default.9",gradient10:"default.10",gradient1Ext:"extended.1",gradient2Ext:"extended.2",gradient3Ext:"extended.3",gradient4Ext:"extended.4",gradient5Ext:"extended.5",gradient6Ext:"extended.6",gradient7Ext:"extended.7",gradient8Ext:"extended.8",gradient9Ext:"extended.9",gradient10Ext:"extended.10",success:"semantic.success",highSuccess:"semantic.highSuccess",warning:"semantic.warning",error:"semantic.error",highError:"semantic.highError",disabled:"semantic.disabled"},tc={1:[["#4760D5","#637CEF"],["#4F6BED","#637CEF"]],2:[["#795AA6","#9373C0"],["#8764B8","#A083C9"]],3:[["#159195","#2AA0A4"],["#159195","#2AA0A4"]],4:[["#B146C2","#C36BD1"],["#B146C2","#C36BD1"]],5:[["#3487C7","#3A96DD"],["#3487C7","#3A96DD"]],6:[["#0E7A0B","#13A10E"],["#11910D","#27AC22"]],7:[["#E61C99","#EE5FB7"],["#E61C99","#EE5FB7"]],8:[["#CA5010","#D77440"],["#CA5010","#D77440"]],9:[["#57811B","#689920"],["#57811B","#689920"]],10:[["#937700","#AE8C00"],["#937700","#AE8C00"]]},nc={default:tc,semantic:{success:[["#0C5E0C","#107C10"],["#218C21","#359B35"]],highSuccess:[["#107C10","#359B35"],["#359B35","#9FD89F"]],warning:[["#DE590B","#F7630C"],["#DE590B","#F87528"]],error:[["#B10E1C","#CC2635"],["#D33F4C","#EEACB2"]],highError:[["#6E0811","#B10E1C"],["#D33F4C","#DC626D"]],disabled:[["#E6E6E6","#E6E6E6"],["#E6E6E6","#E6E6E6"]]},extended:{1:[["#2C3C85","#3C51B4"],["#93A4F4","#C8D1FA"]],2:[["#4C3867","#674C8C"],["#A083C9","#B29AD4"]],3:[["#02494C","#038387"],["#4CB4B7","#9BD9DB"]],4:[["#63276D","#863593"],["#C36BD1","#CF87DA"]],5:[["#20547C","#2C72A8"],["#4FA1E1","#83BDEB"]],6:[["#0B5A08","#0E7A0B"],["#27AC22","#5EC75A"]],7:[["#AD006A","#E3008C"],["#EE5FB7","#F7ADDA"]],8:[["#9A3D0C","#CA5010"],["#D77440","#DF8E64"]],9:[["#405F14","#57811B"],["#73AA24","#A4CC6C"]],10:[["#6D5700","#937700"],["#D0B232","#DAC157"]]}},ic=Object.values(tc),ec=Object.values(Qs),rc=function(t,n){if(0===t.length)return["",""];var i=Number(n);return i<t.length?t[i]:t[0]},oc=function(t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var e=ic[(t+n)%ic.length];return rc(e,i)},uc=function(t,n){if(void 0===n&&(n=!1),ec.indexOf(t)>=0){var i=t.split("."),e=i[0],r=i[1],o=nc[e][r];return rc(o,n)}return[t,t]};function ac(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return n.length<2?n[0]:function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];n.forEach((function(n){return n&&n.apply(t,i)}))}}function lc(t){!function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=ac(t,t[i],n[i]))}(t,{componentDidMount:sc,componentDidUpdate:cc,componentWillUnmount:fc})}function sc(){dc(this.props.componentRef,this)}function cc(t){t.componentRef!==this.props.componentRef&&(dc(t.componentRef,null),dc(this.props.componentRef,this))}function fc(){dc(this.props.componentRef,null)}function dc(t,n){t&&("object"==typeof t?t.current=n:"function"==typeof t&&t(n))}function vc(t,n,i){var e,r=x(t,(function(t){var i;return n===t||!!(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,kn))}),i);return null!==r&&!!(null===(e=r.hasAttribute)||void 0===e?void 0:e.call(r,kn))}!function(t){t[t.vertical=0]="vertical",t[t.horizontal=1]="horizontal",t[t.bidirectional=2]="bidirectional",t[t.domOrder=3]="domOrder"}(Ys||(Ys={}));var hc,pc=u.createContext(void 0),gc="data-is-focusable",yc="data-focuszone-id",mc="tabindex",bc="data-no-vertical-wrap",xc="data-no-horizontal-wrap",wc=999999999,Cc=-999999999;function Mc(t,n){var i;"function"==typeof MouseEvent?i=new MouseEvent("click",{ctrlKey:null==n?void 0:n.ctrlKey,metaKey:null==n?void 0:n.metaKey,shiftKey:null==n?void 0:n.shiftKey,altKey:null==n?void 0:n.altKey,bubbles:null==n?void 0:n.bubbles,cancelable:null==n?void 0:n.cancelable}):(i=document.createEvent("MouseEvents")).initMouseEvent("click",!!n&&n.bubbles,!!n&&n.cancelable,window,0,0,0,0,0,!!n&&n.ctrlKey,!!n&&n.altKey,!!n&&n.shiftKey,!!n&&n.metaKey,0,null),t.dispatchEvent(i)}var kc,Ac={},Sc=new Set,Lc=["text","number","password","email","tel","url","search","textarea"],Vc=!1,Dc=function(t){function n(i){var e,r,o,a,s,c=t.call(this,i)||this;c._root=u.createRef(),c._mergedRef=(s={refs:[]},function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return s.resolver&&function(t,n){if(t.length!==n.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}(s.refs,t)||(s.resolver=function(t){return function(n){for(var i=0,e=t.refs;i<e.length;i++){var r=e[i];"function"==typeof r?r(n):r&&(r.current=n)}}}(s)),s.refs=t,s.resolver}),c._onFocus=function(t){if(!c._portalContainsElement(t.target)){var n,i=c.props,e=i.onActiveElementChanged,r=i.doNotAllowFocusEventToPropagate,o=i.stopFocusPropagation,u=i.onFocusNotification,a=i.onFocus,l=i.shouldFocusInnerElementWhenReceivedFocus,s=i.defaultTabbableElement,f=c._isImmediateDescendantOfZone(t.target);if(f)n=t.target;else for(var d=t.target;d&&d!==c._root.current;){if(V(d,void 0,c._inShadowRoot)&&c._isImmediateDescendantOfZone(d)){n=d;break}d=b(d,Vc)}if(l&&t.target===c._root.current){var v=s&&"function"==typeof s&&c._root.current&&s(c._root.current);v&&V(v,void 0,c._inShadowRoot)?(n=v,v.focus()):(c.focus(!0),c._activeElement&&(n=null))}var h=!c._activeElement;n&&n!==c._activeElement&&((f||h)&&c._setFocusAlignment(n,!0,!0),c._activeElement=n,h&&c._updateTabIndexes()),e&&e(c._activeElement,t),(o||r)&&t.stopPropagation(),a?a(t):u&&u()}},c._onBlur=function(){c._setParkedFocus(!1)},c._onMouseDown=function(t){if(!c._portalContainsElement(t.target)&&!c.props.disabled){for(var n=t.target,i=[];n&&n!==c._root.current;)i.push(n),n=b(n,Vc);for(;i.length&&((n=i.pop())&&V(n,void 0,c._inShadowRoot)&&c._setActiveElement(n,!0),!D(n)););}},c._onKeyDown=function(t,n){if(!c._portalContainsElement(t.target)){var i=c.props,e=i.direction,r=i.disabled,o=i.isInnerZoneKeystroke,u=i.pagingSupportDisabled,a=i.shouldEnterInnerZone;if(!(r||(c.props.onKeyDown&&c.props.onKeyDown(t),t.isDefaultPrevented()||c._getDocument().activeElement===c._root.current&&c._isInnerZone))){if((a&&a(t)||o&&o(t))&&c._isImmediateDescendantOfZone(t.target)){var s=c._getFirstInnerZone();if(s){if(!s.focus(!0))return}else{if(!N(t.target))return;if(!c.focusElement(A(t.target,t.target.firstChild,!0)))return}}else{if(t.altKey)return;switch(t.which){case 32:if(c._shouldRaiseClicksOnSpace&&c._tryInvokeClickForFocusable(t.target,t))break;return;case 37:if(e!==Ys.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusLeft(n)))break;return;case 39:if(e!==Ys.vertical&&(c._preventDefaultWhenHandled(t),c._moveFocusRight(n)))break;return;case 38:if(e!==Ys.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusUp()))break;return;case 40:if(e!==Ys.horizontal&&(c._preventDefaultWhenHandled(t),c._moveFocusDown()))break;return;case 34:if(!u&&c._moveFocusPaging(!0))break;return;case 33:if(!u&&c._moveFocusPaging(!1))break;return;case 9:if(c.props.allowTabKey||1===c.props.handleTabKey||2===c.props.handleTabKey&&c._isElementInput(t.target)){var f=!1;if(c._processingTabKey=!0,f=e!==Ys.vertical&&c._shouldWrapFocus(c._activeElement,xc)?((0,l.jI)(n)?!t.shiftKey:t.shiftKey)?c._moveFocusLeft(n):c._moveFocusRight(n):t.shiftKey?c._moveFocusUp():c._moveFocusDown(),c._processingTabKey=!1,f)break;c.props.shouldResetActiveElementWhenTabFromZone&&(c._activeElement=null)}return;case 36:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!1))return!1;var d=c._root.current&&c._root.current.firstChild;if(c._root.current&&d&&c.focusElement(A(c._root.current,d,!0)))break;return;case 35:if(c._isContentEditableElement(t.target)||c._isElementInput(t.target)&&!c._shouldInputLoseFocus(t.target,!0))return!1;var v=c._root.current&&c._root.current.lastChild;if(c._root.current&&c.focusElement(k(c._root.current,v,!0,!0,!0)))break;return;case 13:if(c._shouldRaiseClicksOnEnter&&c._tryInvokeClickForFocusable(t.target,t))break;return;default:return}}t.preventDefault(),t.stopPropagation()}}},c._getHorizontalDistanceFromCenter=function(t,n,i){var e=c._focusAlignment.left||c._focusAlignment.x||0,r=Math.floor(i.top),o=Math.floor(n.bottom),u=Math.floor(i.bottom),a=Math.floor(n.top);return t&&r>o||!t&&u<a?e>=i.left&&e<=i.left+i.width?0:Math.abs(i.left+i.width/2-e):c._shouldWrapFocus(c._activeElement,bc)?wc:Cc},lc(c),c._id=p("FocusZone"),c._focusAlignment={left:0,top:0},c._processingTabKey=!1;var f=null===(r=null!==(e=i.shouldRaiseClicks)&&void 0!==e?e:n.defaultProps.shouldRaiseClicks)||void 0===r||r;return c._shouldRaiseClicksOnEnter=null!==(o=i.shouldRaiseClicksOnEnter)&&void 0!==o?o:f,c._shouldRaiseClicksOnSpace=null!==(a=i.shouldRaiseClicksOnSpace)&&void 0!==a?a:f,c}return(0,o.C6)(n,t),n.getOuterZones=function(){return Sc.size},n._onKeyDownCapture=function(t){9===t.which&&Sc.forEach((function(t){return t._updateTabIndexes()}))},n.prototype.componentDidMount=function(){var t,i=this._root.current;if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),Ac[this._id]=this,i){for(var e=b(i,Vc);e&&e!==this._getDocument().body&&1===e.nodeType;){if(D(e)){this._isInnerZone=!0;break}e=b(e,Vc)}this._isInnerZone||(Sc.add(this),this._root.current&&this._root.current.addEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&"string"==typeof this.props.defaultTabbableElement?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},n.prototype.componentDidUpdate=function(){var t,n=this._root.current,i=this._getDocument();if(this._inShadowRoot=!!(null===(t=this.context)||void 0===t?void 0:t.shadowRoot),(this._activeElement&&!w(this._root.current,this._activeElement,Vc)||this._defaultFocusElement&&!w(this._root.current,this._defaultFocusElement,Vc))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&i&&this._lastIndexPath&&(i.activeElement===i.body||null===i.activeElement||i.activeElement===n)){var e=function(t,n){for(var i=t,e=0,r=n;e<r.length;e++){var o=r[e],u=i.children[Math.min(o,i.children.length-1)];if(!u)break;i=u}return V(i)&&S(i)?i:A(t,i,!0)||k(t,i)}(n,this._lastIndexPath);e?(this._setActiveElement(e,!0),e.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},n.prototype.componentWillUnmount=function(){delete Ac[this._id],this._isInnerZone||(Sc.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",n._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},n.prototype.render=function(){var t=this,n=this.props,i=n.as,e=n.elementType,r=n.rootProps,a=n.ariaDescribedBy,l=n.ariaLabelledBy,s=n.className,c=$(this.props,H),f=i||e||"div";this._evaluateFocusBeforeRender();var d=(0,It.O4)();return u.createElement(f,(0,o.Cl)({"aria-labelledby":l,"aria-describedby":a},c,r,{className:z((hc||(hc=(0,U.Z)({selectors:{":focus":{outline:"none"}}},"ms-FocusZone")),hc),s),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(n){return t._onKeyDown(n,d)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},n.prototype.focus=function(t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this._root.current){if(!t&&"true"===this._root.current.getAttribute(gc)&&this._isInnerZone){var i=this._getOwnerZone(this._root.current);if(i!==this._root.current){var e=Ac[i.getAttribute(yc)];return!!e&&e.focusElement(this._root.current)}return!1}if(!t&&this._activeElement&&w(this._root.current,this._activeElement)&&V(this._activeElement,void 0,this._inShadowRoot)&&(!n||L(this._activeElement)))return this._activeElement.focus(),!0;var r=this._root.current.firstChild;return this.focusElement(A(this._root.current,r,!0,void 0,void 0,void 0,void 0,void 0,n))}return!1},n.prototype.focusLast=function(){if(this._root.current){var t=this._root.current&&this._root.current.lastChild;return this.focusElement(k(this._root.current,t,!0,!0,!0))}return!1},n.prototype.focusElement=function(t,n){var i=this.props,e=i.onBeforeFocus,r=i.shouldReceiveFocus;return!(r&&!r(t)||e&&!e(t)||!t||(this._setActiveElement(t,n),this._activeElement&&this._activeElement.focus(),0))},n.prototype.setFocusAlignment=function(t){this._focusAlignment=t},Object.defineProperty(n.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),n.prototype._evaluateFocusBeforeRender=function(){var t=this._root.current,n=this._getDocument();if(n){var i=n.activeElement;if(i!==t){var e=w(t,i,!1);this._lastIndexPath=e?function(t,n){for(var i=[];n&&t&&n!==t;){var e=b(n,!0);if(null===e)return[];i.unshift(Array.prototype.indexOf.call(e.children,n)),n=e}return i}(t,i):void 0}}},n.prototype._setParkedFocus=function(t){var n=this._root.current;n&&this._isParked!==t&&(this._isParked=t,t?(this.props.allowFocusRoot||(this._parkedTabIndex=n.getAttribute("tabindex"),n.setAttribute("tabindex","-1")),n.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(n.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):n.removeAttribute("tabindex")))},n.prototype._setActiveElement=function(t,n){var i=this._activeElement;this._activeElement=t,i&&(D(i)&&this._updateTabIndexes(i),i.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!n||this._setFocusAlignment(t,!0,!0),this._activeElement.tabIndex=0)},n.prototype._preventDefaultWhenHandled=function(t){this.props.preventDefaultWhenHandled&&t.preventDefault()},n.prototype._tryInvokeClickForFocusable=function(t,n){var i=t;if(i===this._root.current)return!1;do{if("BUTTON"===i.tagName||"A"===i.tagName||"INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SUMMARY"===i.tagName)return!1;if(this._isImmediateDescendantOfZone(i)&&"true"===i.getAttribute(gc)&&"true"!==i.getAttribute("data-disable-click-on-enter"))return Mc(i,n),!0;i=b(i,Vc)}while(i!==this._root.current);return!1},n.prototype._getFirstInnerZone=function(t){if(!(t=t||this._activeElement||this._root.current))return null;if(D(t))return Ac[t.getAttribute(yc)];for(var n=t.firstElementChild;n;){if(D(n))return Ac[n.getAttribute(yc)];var i=this._getFirstInnerZone(n);if(i)return i;n=n.nextElementSibling}return null},n.prototype._moveFocus=function(t,n,i,e){void 0===e&&(e=!0);var r=this._activeElement,o=-1,u=void 0,a=!1,l=this.props.direction===Ys.bidirectional;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,t))return!1;var s=l?r.getBoundingClientRect():null;do{if(r=t?A(this._root.current,r):k(this._root.current,r),!l){u=r;break}if(r){var c=n(s,r.getBoundingClientRect());if(-1===c&&-1===o){u=r;break}if(c>-1&&(-1===o||c<o)&&(o=c,u=r),o>=0&&c<0)break}}while(r);if(u&&u!==this._activeElement)a=!0,this.focusElement(u);else if(this.props.isCircularNavigation&&e)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return a},n.prototype._moveFocusDown=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!0,(function(e,r){var o=-1,u=Math.floor(r.top),a=Math.floor(e.bottom);return u<a?t._shouldWrapFocus(t._activeElement,bc)?wc:Cc:((-1===n&&u>=a||u===n)&&(n=u,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusUp=function(){var t=this,n=-1,i=this._focusAlignment.left||this._focusAlignment.x||0;return!!this._moveFocus(!1,(function(e,r){var o=-1,u=Math.floor(r.bottom),a=Math.floor(r.top),l=Math.floor(e.top);return u>l?t._shouldWrapFocus(t._activeElement,bc)?wc:Cc:((-1===n&&u<=l||a===n)&&(n=a,o=i>=r.left&&i<=r.left+r.width?0:Math.abs(r.left+r.width/2-i)),o)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},n.prototype._moveFocusLeft=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,xc);return!!this._moveFocus((0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)):parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)))&&r.right<=e.right&&n.props.direction!==Ys.vertical?o=e.right-r.right:i||(o=Cc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusRight=function(t){var n=this,i=this._shouldWrapFocus(this._activeElement,xc);return!!this._moveFocus(!(0,l.jI)(t),(function(e,r){var o=-1;return((0,l.jI)(t)?parseFloat(r.bottom.toFixed(3))>parseFloat(e.top.toFixed(3)):parseFloat(r.top.toFixed(3))<parseFloat(e.bottom.toFixed(3)))&&r.left>=e.left&&n.props.direction!==Ys.vertical?o=r.left-e.left:i||(o=Cc),o}),void 0,i)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},n.prototype._moveFocusPaging=function(t,n){void 0===n&&(n=!0);var i=this._activeElement;if(!i||!this._root.current)return!1;if(this._isElementInput(i)&&!this._shouldInputLoseFocus(i,t))return!1;var e=K(i);if(!e)return!1;var r=-1,o=void 0,u=-1,a=-1,l=e.clientHeight,s=i.getBoundingClientRect();do{if(i=t?A(this._root.current,i):k(this._root.current,i)){var c=i.getBoundingClientRect(),f=Math.floor(c.top),d=Math.floor(s.bottom),v=Math.floor(c.bottom),h=Math.floor(s.top),p=this._getHorizontalDistanceFromCenter(t,s,c);if(t&&f>d+l||!t&&v<h-l)break;p>-1&&(t&&f>u?(u=f,r=p,o=i):!t&&v<a?(a=v,r=p,o=i):(-1===r||p<=r)&&(r=p,o=i))}}while(i);var g=!1;if(o&&o!==this._activeElement)g=!0,this.focusElement(o),this._setFocusAlignment(o,!1,!0);else if(this.props.isCircularNavigation&&n)return t?this.focusElement(A(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(k(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return g},n.prototype._setFocusAlignment=function(t,n,i){if(this.props.direction===Ys.bidirectional&&(!this._focusAlignment||n||i)){var e=t.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:o}),n&&(this._focusAlignment.left=r),i&&(this._focusAlignment.top=o)}},n.prototype._isImmediateDescendantOfZone=function(t){return this._getOwnerZone(t)===this._root.current},n.prototype._getOwnerZone=function(t){for(var n=b(t,Vc);n&&n!==this._root.current&&n!==this._getDocument().body;){if(D(n))return n;n=b(n,Vc)}return n},n.prototype._updateTabIndexes=function(t){!this._activeElement&&this.props.defaultTabbableElement&&"function"==typeof this.props.defaultTabbableElement&&(this._activeElement=this.props.defaultTabbableElement(this._root.current)),!t&&this._root.current&&(this._defaultFocusElement=null,t=this._root.current,this._activeElement&&!w(t,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!V(this._activeElement,void 0,this._inShadowRoot)&&(this._activeElement=null);for(var n=t&&t.children,i=0;n&&i<n.length;i++){var e=n[i];D(e)?"true"===e.getAttribute(gc)&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(mc)&&e.setAttribute(mc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(mc)&&e.setAttribute(mc,"0"))):(e.getAttribute&&"false"===e.getAttribute(gc)&&e.setAttribute(mc,"-1"),V(e,void 0,this._inShadowRoot)?this.props.disabled?e.setAttribute(mc,"-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==e?"-1"!==e.getAttribute(mc)&&e.setAttribute(mc,"-1"):(this._defaultFocusElement=e,"0"!==e.getAttribute(mc)&&e.setAttribute(mc,"0")):"svg"===e.tagName&&"false"!==e.getAttribute("focusable")&&e.setAttribute("focusable","false")),this._updateTabIndexes(e)}},n.prototype._isContentEditableElement=function(t){return t&&"true"===t.getAttribute("contenteditable")},n.prototype._isElementInput=function(t){return!(!t||!t.tagName||"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase())},n.prototype._shouldInputLoseFocus=function(t,n){if(!this._processingTabKey&&t&&t.type&&Lc.indexOf(t.type.toLowerCase())>-1){var i=t.selectionStart,e=i!==t.selectionEnd,r=t.value,o=t.readOnly;if(e||i>0&&!n&&!o||i!==r.length&&n&&!o||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(t)))return!1}return!0},n.prototype._shouldWrapFocus=function(t,n){return!this.props.checkForNoWrap||function(t,n,i){return"true"!==function(t,n,i){var e=x(t,(function(t){return t.hasAttribute(n)}),i);return e&&e.getAttribute(n)}(t,n,null!=i?i:(0,C.Y)())}(t,n)},n.prototype._portalContainsElement=function(t){return t&&!!this._root.current&&vc(t,this._root.current)},n.prototype._getDocument=function(){return(0,C.Y)(this._root.current)},n.defaultProps={isCircularNavigation:!1,direction:Ys.bidirectional,shouldRaiseClicks:!0,"data-tabster":'{"uncontrolled": {}}'},n.contextType=pc,n}(u.Component);function Nc(t){return function(t){return t.clientWidth<t.scrollWidth}(t)||function(t){return t.clientHeight<t.scrollHeight}(t)}!function(t){t[t.Parent=0]="Parent",t[t.Self=1]="Self"}(kc||(kc={}));var Oc,Tc=(0,a.Z)(),Ec=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._onRenderContent=function(t){return"string"==typeof t.content?u.createElement("p",{className:n._classNames.subText},t.content):u.createElement("div",{className:n._classNames.subText},t.content)},n}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.calloutProps,e=t.directionalHint,r=t.directionalHintForRTL,a=t.styles,l=t.id,s=t.maxWidth,c=t.onRenderContent,f=void 0===c?this._onRenderContent:c,d=t.targetElement,v=t.theme;return this._classNames=Tc(a,{theme:v,className:n||i&&i.className,beakWidth:i&&i.isBeakVisible?i.beakWidth:0,gapSpace:i&&i.gapSpace,maxWidth:s}),u.createElement(Pn,(0,o.Cl)({target:d,directionalHint:e,directionalHintForRTL:r},i,$(this.props,R,["id"]),{className:this._classNames.root}),u.createElement("div",{className:this._classNames.content,id:l,onFocus:this.props.onFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},f(this.props,this._onRenderContent)))},n.defaultProps={directionalHint:1,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},n}(u.Component),Fc=(0,r.I)(Ec,(function(t){var n=t.className,i=t.beakWidth,e=void 0===i?16:i,r=t.gapSpace,o=void 0===r?0:r,u=t.maxWidth,a=t.theme,l=a.semanticColors,s=a.fonts,c=a.effects,f=-(Math.sqrt(e*e/2)+o)+1/window.devicePixelRatio;return{root:["ms-Tooltip",a.fonts.medium,It.lw.fadeIn200,{background:l.menuBackground,boxShadow:c.elevation8,padding:"8px",maxWidth:u,selectors:{":after":{content:"''",position:"absolute",bottom:f,left:f,right:f,top:f,zIndex:0}}},n],content:["ms-Tooltip-content",s.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(t){t[t.zero=0]="zero",t[t.medium=1]="medium",t[t.long=2]="long"}(Oc||(Oc={}));var Bc,Pc,_c=(0,a.Z)(),Hc=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._defaultTooltipId=p("tooltip"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._getTargetElement=function(){if(e._tooltipHost.current){var t=e.props.overflowMode;if(void 0!==t)switch(t){case kc.Parent:return e._tooltipHost.current.parentElement;case kc.Self:return e._tooltipHost.current}return e._tooltipHost.current}},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipContentFocus=function(t){n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e._clearDismissTimer(),e._clearOpenTimer()},e._onTooltipBlur=function(t){var n;e._ignoreNextFocusEvent=(null===(n=zt(e.context))||void 0===n?void 0:n.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props,r=i.overflowMode,o=i.delay,u=zt(e.context);if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,void 0!==r){var a=e._getTargetElement();if(a&&!Nc(a))return}if(!t.target||!vc(t.target,e._getTargetElement(),u))if(e._clearDismissTimer(),e._clearOpenTimer(),o!==Oc.zero){var l=e._getDelayTime(o);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),l)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t},(function(){return e.props.onTooltipToggle&&e.props.onTooltipToggle(t)}))},e._getDelayTime=function(t){switch(t){case Oc.medium:return 300;case Oc.long:return 500;default:return 0}},lc(e),e.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.calloutProps,i=t.children,e=t.content,r=t.directionalHint,a=t.directionalHintForRTL,l=t.hostClassName,s=t.id,c=t.setAriaDescribedBy,f=void 0===c||c,d=t.tooltipProps,v=t.styles,h=t.theme;this._classNames=_c(v,{theme:h,className:l});var p=this.state.isTooltipVisible,g=s||this._defaultTooltipId,y=(0,o.Cl)((0,o.Cl)({id:"".concat(g,"--tooltip"),content:e,targetElement:this._getTargetElement(),directionalHint:r,directionalHintForRTL:a,calloutProps:j({},n,{onDismiss:this._hideTooltip,onFocus:this._onTooltipContentFocus,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},$(this.props,R,["id"])),d),m=(null==d?void 0:d.onRenderContent)?d.onRenderContent(y,(function(t){return(null==t?void 0:t.content)?u.createElement(u.Fragment,null,t.content):null})):e,b=p&&!!m,x=f&&p&&m?g:void 0;return u.createElement("div",{className:this._classNames.root,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,role:"none","aria-describedby":x},i,b&&u.createElement(Fc,(0,o.Cl)({},y)),u.createElement("div",{hidden:!0,id:g,style:It.dX},m))},n.prototype.componentDidMount=function(){this._async=new Nt(this)},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Oc.medium},n.contextType=Ft,n}(u.Component),Ic={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},Wc=(0,r.I)(Hc,(function(t){var n=t.className,i=t.theme;return{root:[(0,It.Km)(Ic,i).root,{display:"inline"},n]}}),void 0,{scope:"TooltipHost"}),Rc=function(t){function n(n){var i=t.call(this,n)||this;return i._tooltipChild=u.createRef(),i._checkTextOverflow=function(){var t=i._getTargetElement(),n=!!t&&Nc(t);n!==i.state.textOverflow&&i.setState({textOverflow:n})},i._getTargetElement=function(){if(i._tooltipChild.current&&i._tooltipChild.current.parentElement)return i._tooltipChild.current.parentElement},i.state={textOverflow:!1},i._async=new Nt(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.className,i=t.content,e=t.accessibilityData;return u.createElement(Wc,{overflowMode:kc.Self,hostClassName:n,content:i},u.createElement("span",(0,o.Cl)({},Ds(e),{ref:this._tooltipChild,"data-is-focusable":this.state.textOverflow}),i))},n.prototype.componentDidMount=function(){var t=this._getTargetElement();window.ResizeObserver&&t&&(this._resizeObserver=new ResizeObserver(this._async.debounce(this._checkTextOverflow,500)),this._resizeObserver.observe(t))},n.prototype.componentWillUnmount=function(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._async.dispose()},n}(u.Component),$c=(0,a.Z)(),zc=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.state.isCalloutVisible&&i.setState({isCalloutVisible:!1,hoverValue:"",refSelected:null,lineColor:"",legend:""})},i._adjustProps=function(){i._barHeight=i.props.barHeight||12,i._classNames=$c(i.props.styles,{theme:i.props.theme,width:i.props.width,className:i.props.className,barHeight:i._barHeight,color:i.state.lineColor,variant:i.props.variant,hideLabels:i.props.hideLabels})},i._getChartDataText=function(t){return i.props.barChartCustomData?u.createElement("div",{role:"text"},i.props.barChartCustomData(t)):i._getDefaultTextData(t)},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.data,r=t.yAxisCalloutData||(t.horizontalBarChartdata?"".concat(t.horizontalBarChartdata.x,"/").concat(t.horizontalBarChartdata.y):0);return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):"")+"".concat(r,".")+(e?"with benchmark at "+"".concat(e,", "):"")},i.state={isCalloutVisible:!1,hoverValue:"",lineColor:"",legend:"",refSelected:null,color:"",xCalloutValue:"",yCalloutValue:"",barSpacingInPercent:0},i._refArray=[],i._uniqLineText="_HorizontalLine_"+Math.random().toString(36).substring(7),i._hoverOff=i._hoverOff.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_HBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.theme;this._adjustProps();var r=e.palette,a=0;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},i.map((function(n,i){a=n.chartData&&n.chartData[0]&&n.chartData[0].horizontalBarChartdata.x?n.chartData[0].horizontalBarChartdata.x:0,n.chartData[1]={legend:"",horizontalBarChartdata:{x:n.chartData[0].horizontalBarChartdata.y-a,y:n.chartData[0].horizontalBarChartdata.y},color:r.neutralLight};var e=t.props.variant===v.AbsoluteScale?null:t._getChartDataText(n),o=t._createBars(n,r,i),l=t._uniqLineText+"_"+i,s=$c(t.props.styles,{theme:t.props.theme,width:t.props.width,showTriangle:!!n.chartData[0].data,variant:t.props.variant});return u.createElement("div",{key:i},u.createElement("div",{className:s.items},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:t._classNames.chartTitle},n.chartTitle&&u.createElement(Rc,{className:t._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),e)),n.chartData[0].data&&t._createBenchmark(n),u.createElement(Dc,{direction:Ys.horizontal,className:t._classNames.chartWrapper},u.createElement("svg",{ref:t.barChartSvgRef,className:t._classNames.chart,"aria-label":n.chartTitle},u.createElement("g",{id:l,key:l,ref:function(i){t._refCallback(i,n.chartData[0].legend)},onClick:function(){var t=n.chartData[0];t&&t.onClick&&t.onClick()}},o)))))})),u.createElement(Pn,(0,o.Cl)({target:this.state.refSelected,coverTarget:!0,isBeakVisible:!1,gapSpace:30,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerHorizontalBar?this.props.onRenderCalloutPerHorizontalBar(this.state.barCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.hoverValue,color:this.state.lineColor,culture:this.props.culture}))))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._hoverOn=function(t,n){var i,e,r,o;if((!this.state.isCalloutVisible||this.state.legend!==n.legend)&&this._calloutAnchorPoint!==n){var u=m(this._refArray,(function(t){return t.index===n.legend}));this._calloutAnchorPoint=n;var a=n.color;if(this.props.enableGradient){var l=Math.max((null===(e=null===(i=this.props.data)||void 0===i?void 0:i.map((function(t){return t.chartData})))||void 0===e?void 0:e.findIndex((function(t){return(null==t?void 0:t[0].data)===n.data&&(null==t?void 0:t[0].legend)===n.legend})))||0,0);a=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(l,0,null===(o=this.props.theme)||void 0===o?void 0:o.isInverted)[0]}this.setState({isCalloutVisible:!0,hoverValue:t,lineColor:a,legend:n.legend,refSelected:u.refElement,xCalloutValue:n.xAxisCalloutData,yCalloutValue:n.yAxisCalloutData,barCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._hoverOff=function(){},n.prototype._getDefaultTextData=function(t){var n=this.props.culture,i=this.props.chartDataMode||"default",e=t.chartData[0],r=e.horizontalBarChartdata.x,a=e.horizontalBarChartdata.y,l=Ds(t.chartDataAccessibilityData,"text",!1);switch(i){case"default":return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),(0,_n.c$)(r,n));case"fraction":return u.createElement("div",(0,o.Cl)({},l),u.createElement("span",{className:this._classNames.chartTitleRight},(0,_n.c$)(r,n)),u.createElement("span",{className:this._classNames.chartDataTextDenominator}," / "+(0,_n.c$)(a,n)));case"percentage":var s="".concat((0,_n.c$)(Math.round(r/a*100),n),"%");return u.createElement("div",(0,o.Cl)({className:this._classNames.chartTitleRight},l),s)}},n.prototype._createBenchmark=function(t){var n=t.chartData[0].horizontalBarChartdata.y,i=t.chartData[0].data,e={left:"calc("+Math.round((i||0)/n*100)+"% - 4px)"};return u.createElement("div",{className:this._classNames.benchmarkContainer},u.createElement("div",{className:this._classNames.triangle,style:e}))},n.prototype._createBars=function(t,n,i){var e,r=this,o=(null===(e=t.chartData)||void 0===e?void 0:e.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,a=this.state.barSpacingInPercent*(o-1),l=[n.blueLight,n.blue,n.blueMid,n.red,n.black],s=[],c=t.chartData.reduce((function(t,n){return t+(n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0)}),0),f=0,d=0,h=0;t.chartData.map((function(t,n){var i=t.horizontalBarChartdata.x?t.horizontalBarChartdata.x:0;return(d=i/c*100)<0?d=0:d<1&&0!==d&&(d=1),h+=d}));var g=0!==h?(h-a)/100:1,y=t.chartData.map((function(n,e){var o,a,h,y,m=n.color?n.color:l[Math.floor(4*Math.random()+1)],b=m;r.props.enableGradient&&1!==e&&(m=(null===(o=n.gradient)||void 0===o?void 0:o[0])||oc(i,0,null===(a=r.props.theme)||void 0===a?void 0:a.isInverted)[0],b=(null===(h=n.gradient)||void 0===h?void 0:h[1])||oc(i,0,null===(y=r.props.theme)||void 0===y?void 0:y.isInverted)[1]);var x=n.horizontalBarChartdata.x?n.horizontalBarChartdata.x:0;e>0&&(f+=d),(d=x/c*100)<0?d=0:d<1&&0!==d?d=1/g:d/=g,s.push(f);var w=n.horizontalBarChartdata.x;if(1===e&&r.props.variant===v.AbsoluteScale){if(r.props.hideLabels)return u.createElement("text",{key:e});var C=t.chartData[0].horizontalBarChartdata.x;return u.createElement("text",{key:e,x:"".concat(r._isRTL?100-s[e]:s[e],"%"),y:r._barHeight/2,dominantBaseline:"central",transform:"translate(".concat(r._isRTL?-4:4,")"),className:r._classNames.barLabel,"aria-hidden":!0},Ns(C))}var M=p("HBC_Gradient")+"_".concat(i,"_").concat(e);return u.createElement(u.Fragment,{key:e},r.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:M},u.createElement("stop",{offset:"0",stopColor:m}),u.createElement("stop",{offset:"100%",stopColor:b}))),u.createElement("rect",{key:e,x:"".concat(r._isRTL?100-s[e]-d-e*r.state.barSpacingInPercent:s[e]+e*r.state.barSpacingInPercent,"%"),y:0,rx:r.props.roundCorners?3:0,"data-is-focusable":""!==n.legend,width:d+"%",height:r._barHeight,fill:r.props.enableGradient?"url(#".concat(M,")"):m,onMouseOver:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,onFocus:""!==n.legend?r._hoverOn.bind(r,w,n):void 0,role:"img","aria-label":r._getAriaLabel(n),onBlur:r._hoverOff,onMouseLeave:r._hoverOff,className:r._classNames.barWrapper}))}));return y},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n}(u.Component),jc=(0,r.I)(zc,(function(t){var n,i=t.className,e=t.theme,r=t.width,u=t.barHeight,a=t.showTriangle,l=t.variant,s=t.hideLabels,c=e.palette;return{root:[{display:"flex",flexDirection:"column",width:r||"100%"},i],items:{marginBottom:a||l===v.AbsoluteScale?"16px":"10px"},chart:{width:"100%",height:u||12,display:"block",overflow:"visible"},barWrapper:{},chartTitle:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:e.palette.neutralPrimary,marginBottom:l===v.AbsoluteScale?"4px":"5px"},chartTitleRight:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:e.palette.neutralPrimary},chartDataTextDenominator:{fontSize:It.s.medium,color:e.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},triangle:{width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c.blue,marginBottom:"4px",position:"absolute"},barLabel:(0,o.Cl)((0,o.Cl)({},e.fonts.small),{fontWeight:It.BO.semibold,fill:e.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}),chartWrapper:{paddingRight:l!==v.AbsoluteScale||s?0:40}}})),Yc={host:"ms-HoverCard-host"},Xc=function(){function t(n){this._id=t._uniqueId++,this._parent=n,this._eventRecords=[]}return t.raise=function(n,i,e,r,o){var u,a=null!=o?o:(0,C.Y)();if(t._isElement(n)){if(void 0!==a&&a.createEvent){var l=a.createEvent("HTMLEvents");l.initEvent(i,r||!1,!0),j(l,e),u=n.dispatchEvent(l)}else if(void 0!==a&&a.createEventObject){var s=a.createEventObject(e);n.fireEvent("on"+i,s)}}else for(;n&&!1!==u;){var c=n.__events__,f=c?c[i]:null;if(f)for(var d in f)if(f.hasOwnProperty(d))for(var v=f[d],h=0;!1!==u&&h<v.length;h++){var p=v[h];p.objectCallback&&(u=p.objectCallback.call(p.parent,e))}n=r?n.parent:null}return u},t.isObserved=function(t,n){var i=t&&t.__events__;return!!i&&!!i[n]},t.isDeclared=function(t,n){var i=t&&t.__declaredEvents;return!!i&&!!i[n]},t.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},t._isElement=function(t){return!!t&&(!!t.addEventListener||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement)},t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},t.prototype.onAll=function(t,n,i){for(var e in n)n.hasOwnProperty(e)&&this.on(t,e,n[e],i)},t.prototype.on=function(n,i,e,r){var o=this;if(i.indexOf(",")>-1)for(var u=i.split(/[ ,]+/),a=0;a<u.length;a++)this.on(n,u[a],e,r);else{var l=this._parent,s={target:n,eventName:i,parent:l,callback:e,options:r};if((u=n.__events__=n.__events__||{})[i]=u[i]||{count:0},u[i][this._id]=u[i][this._id]||[],u[i][this._id].push(s),u[i].count++,t._isElement(n)){var c=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed){var i;try{if(!1===(i=e.apply(l,t))&&t[0]){var r=t[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return i}};s.elementCallback=c,n.addEventListener?n.addEventListener(i,c,r):n.attachEvent&&n.attachEvent("on"+i,c)}else s.objectCallback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!o._isDisposed)return e.apply(l,t)};this._eventRecords.push(s)}},t.prototype.off=function(t,n,i,e){for(var r=0;r<this._eventRecords.length;r++){var o=this._eventRecords[r];if(!(t&&t!==o.target||n&&n!==o.eventName||i&&i!==o.callback||"boolean"==typeof e&&e!==o.options)){var u=o.target.__events__,a=u[o.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&i?(a.count--,l.splice(l.indexOf(o),1)):(a.count-=l.length,delete u[o.eventName][this._id]),a.count||delete u[o.eventName]),o.elementCallback&&(o.target.removeEventListener?o.target.removeEventListener(o.eventName,o.elementCallback,o.options):o.target.detachEvent&&o.target.detachEvent("on"+o.eventName,o.elementCallback)),this._eventRecords.splice(r--,1)}}},t.prototype.raise=function(n,i,e){return t.raise(this._parent,n,i,e)},t.prototype.declare=function(t){var n=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof t)n[t]=!0;else for(var i=0;i<t.length;i++)n[t[i]]=!0},t._uniqueId=0,t}();!function(t){t[t.hover=0]="hover",t[t.hotKey=1]="hotKey"}(Bc||(Bc={})),function(t){t.plain="PlainCard",t.expanding="ExpandingCard"}(Pc||(Pc={}));var Gc,qc={root:"ms-ExpandingCard-root",compactCard:"ms-ExpandingCard-compactCard",expandedCard:"ms-ExpandingCard-expandedCard",expandedCardScroll:"ms-ExpandingCard-expandedCardScrollRegion"};!function(t){t[t.compact=0]="compact",t[t.expanded=1]="expanded"}(Gc||(Gc={}));var Uc=function(t){for(var n=t.activeElement;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;return n},Zc=function(t){var n=t.target;return n&&n.shadowRoot&&(n=t.composedPath()[0]),n};function Kc(t){var n=u.useRef();return u.useEffect((function(){n.current=t})),n.current}function Jc(t,n){var i=u.useRef(n);return i.current||(i.current=p(t)),i.current}function Qc(t){var n=u.useRef((function(){throw new Error("Cannot call an event handler while rendering")}));return Nn((function(){n.current=t}),[t]),Wt((function(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return n.current.apply(void 0,t)}}))}var tf={disabled:!1,disableFirstFocus:!1,forceFocusInsideTrap:!0,isClickableOutsideFocusTrap:!1,"data-tabster":'{"uncontrolled": {"completely": true}}'},nf=u.forwardRef((function(t,n){var i,e,r,a=u.useRef(null),l=u.useRef(null),s=u.useRef(null),c=Et(a,n),f=Pt(),d=$t(),v=!!u.useContext(pc),h=null===(i=Kc(!1))||void 0===i||i,p=F(tf,t),g=Wt({hasFocus:!1,focusStackId:Jc("ftz-",p.id)}),y=p.children,m=p.componentRef,b=p.disabled,x=p.disableFirstFocus,C=p.forceFocusInsideTrap,M=p.focusPreviouslyFocusedInnerElement,S=p.firstFocusableSelector,L=p.firstFocusableTarget,V=p.disableRestoreFocus,D=void 0===V?p.ignoreExternalFocusing:V,N=p.isClickableOutsideFocusTrap,O=p.enableAriaHiddenSiblings,B={"aria-hidden":!0,style:{pointerEvents:"none",position:"fixed"},tabIndex:b?-1:0,"data-is-visible":!0,"data-is-focus-trap-zone-bumper":!0},P=u.useCallback((function(t){t!==l.current&&t!==s.current&&T(t)}),[]),_=Qc((function(){if(a.current){var t=g.previouslyFocusedElementInTrapZone;if(M&&t&&w(a.current,t))P(t);else{var n=null;if("string"==typeof L)n=a.current.querySelector(L);else if(L)n=L(a.current);else if(S){var i="string"==typeof S?S:S();n=a.current.querySelector("."+i)}n||(n=A(a.current,a.current.firstChild,!1,!1,!1,!0,void 0,void 0,void 0,v)),n&&P(n)}}})),H=function(t){if(!b&&a.current){var n,i=t===g.hasFocus?(void 0===(n=!1)&&(n=!0),k(a.current,s.current,n,!1,!0,!0,!1,!0,v)):function(t,n,i,e,r){return void 0===e&&(e=!0),A(t,n,e,!1,!1,!0,!1,!0,void 0,r)}(a.current,l.current,0,!1,v);i&&(i===l.current||i===s.current?_():i.focus())}},I=Qc((function(t){if(nf.focusStack=nf.focusStack.filter((function(t){return g.focusStackId!==t})),f){var n=f.activeElement;D||"function"!=typeof(null==t?void 0:t.focus)||!w(a.current,n)&&n!==f.body&&!n.shadowRoot||P(t)}})),W=Qc((function(t){if(!b&&g.focusStackId===nf.focusStack.slice(-1)[0]){var n=Zc(t);n&&!w(a.current,n)&&(f&&Uc(f)===f.body?setTimeout((function(){f&&Uc(f)===f.body&&(_(),g.hasFocus=!0)}),0):(_(),g.hasFocus=!0),t.preventDefault(),t.stopPropagation())}}));return u.useEffect((function(){var t=[];return C&&t.push(E(d,"focus",W,!0)),N||t.push(E(d,"click",W,!0)),function(){t.forEach((function(t){return t()}))}}),[C,N,d]),u.useEffect((function(){if(!b&&(h||C)&&a.current){nf.focusStack.push(g.focusStackId);var t=p.elementToFocusOnDismiss||Uc(f);return x||w(a.current,t)||_(),function(){return I(t)}}}),[C,b]),u.useEffect((function(){if(!b&&O)return Vt(a.current)}),[b,O,a]),e=function(){delete g.previouslyFocusedElementInTrapZone},(r=u.useRef(e)).current=e,u.useEffect((function(){return function(){var t;null===(t=r.current)||void 0===t||t.call(r)}}),[]),function(t,n,i){u.useImperativeHandle(t,(function(){return{get previouslyFocusedElement(){return n},focus:i}}),[i,n])}(m,g.previouslyFocusedElementInTrapZone,_),u.createElement("div",(0,o.Cl)({"aria-labelledby":p.ariaLabelledBy},$(p,R),{ref:c,onFocusCapture:function(t){var n;null===(n=p.onFocusCapture)||void 0===n||n.call(p,t),t.target===l.current?H(!0):t.target===s.current&&H(!1),g.hasFocus=!0,t.target!==t.currentTarget&&t.target!==l.current&&t.target!==s.current&&(g.previouslyFocusedElementInTrapZone=Zc(t.nativeEvent))},onBlurCapture:function(t){var n;null===(n=p.onBlurCapture)||void 0===n||n.call(p,t);var i=t.relatedTarget;null===t.relatedTarget&&(i=Uc(f)),w(a.current,i)||(g.hasFocus=!1)}}),u.createElement("div",(0,o.Cl)({},B,{ref:l})),y,u.createElement("div",(0,o.Cl)({},B,{ref:s})))}));nf.displayName="FocusTrapZone",nf.focusStack=[];var ef,rf=function(t){return u.createElement(Pn,(0,o.Cl)({},t),u.createElement(nf,(0,o.Cl)({disabled:t.hidden},t.focusTrapProps),t.children))},of=function(t){var n=t.gapSpace,i=void 0===n?0:n,e=t.directionalHint,r=void 0===e?4:e,a=t.directionalHintFixed,l=t.targetElement,s=t.firstFocus,c=t.trapFocus,f=t.onLeave,d=t.className,v=t.finalHeight,h=t.content,p=t.calloutProps,g=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},$(t,R)),{className:d,target:l,isBeakVisible:!1,directionalHint:r,directionalHintFixed:a,finalHeight:v,minPagePadding:24,onDismiss:f,gapSpace:i}),p);return u.createElement(u.Fragment,null,c?u.createElement(rf,(0,o.Cl)({},g,{focusTrapProps:{forceFocusInsideTrap:!1,isClickableOutsideFocusTrap:!0,disableFirstFocus:!s}}),h):u.createElement(Pn,(0,o.Cl)({},g),h))},uf=(0,a.Z)(),af=function(t){function n(n){var i=t.call(this,n)||this;return i._expandedElem=u.createRef(),i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},i._onRenderCompactCard=function(){return u.createElement("div",{className:i._classNames.compactCard},i.props.onRenderCompactCard(i.props.renderData))},i._onRenderExpandedCard=function(){return!i.state.firstFrameRendered&&i._async.requestAnimationFrame((function(){i.setState({firstFrameRendered:!0})})),u.createElement("div",{className:i._classNames.expandedCard,ref:i._expandedElem},u.createElement("div",{className:i._classNames.expandedCardScroll},i.props.onRenderExpandedCard&&i.props.onRenderExpandedCard(i.props.renderData)))},i._checkNeedsScroll=function(){var t=i.props.expandedCardHeight;i._async.requestAnimationFrame((function(){i._expandedElem.current&&i._expandedElem.current.scrollHeight>=t&&i.setState({needsScroll:!0})}))},i._async=new Nt(i),lc(i),i.state={firstFrameRendered:!1,needsScroll:!1},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._checkNeedsScroll()},n.prototype.componentWillUnmount=function(){this._async.dispose()},n.prototype.render=function(){var t=this.props,n=t.styles,i=t.compactCardHeight,e=t.expandedCardHeight,r=t.theme,a=t.mode,l=t.className,s=this.state,c=s.needsScroll,f=s.firstFrameRendered,d=i+e;this._classNames=uf(n,{theme:r,compactCardHeight:i,className:l,expandedCardHeight:e,needsScroll:c,expandedCardFirstFrameRendered:a===Gc.expanded&&f});var v=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this._onRenderCompactCard(),this._onRenderExpandedCard());return u.createElement(of,(0,o.Cl)({},this.props,{content:v,finalHeight:d,className:this._classNames.root}))},n.defaultProps={compactCardHeight:156,expandedCardHeight:384,directionalHintFixed:!0},n}(u.Component),lf=(0,r.I)(af,(function(t){var n,i=t.theme,e=t.needsScroll,r=t.expandedCardFirstFrameRendered,o=t.compactCardHeight,u=t.expandedCardHeight,a=t.className,l=i.palette,s=(0,It.Km)(qc,i);return{root:[s.root,{width:320,pointerEvents:"none",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},a],compactCard:[s.compactCard,{pointerEvents:"auto",position:"relative",height:o}],expandedCard:[s.expandedCard,{height:1,overflowY:"hidden",pointerEvents:"auto",transition:"height 0.467s cubic-bezier(0.5, 0, 0, 1)",selectors:{":before":{content:'""',position:"relative",display:"block",top:0,left:24,width:272,height:1,backgroundColor:l.neutralLighter}}},r&&{height:u}],expandedCardScroll:[s.expandedCardScroll,e&&{height:"100%",boxSizing:"border-box",overflowY:"auto"}]}}),void 0,{scope:"ExpandingCard"}),sf={root:"ms-PlainCard-root"},cf=(0,a.Z)(),ff=function(t){function n(n){var i=t.call(this,n)||this;return i._onKeyDown=function(t){t.which===Dt&&i.props.onLeave&&i.props.onLeave(t)},lc(i),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.styles,i=t.theme,e=t.className;this._classNames=cf(n,{theme:i,className:e});var r=u.createElement("div",{onMouseEnter:this.props.onEnter,onMouseLeave:this.props.onLeave,onKeyDown:this._onKeyDown},this.props.onRenderPlainCard(this.props.renderData));return u.createElement(of,(0,o.Cl)({},this.props,{content:r,className:this._classNames.root}))},n}(u.Component),df=(0,r.I)(ff,(function(t){var n,i=t.theme,e=t.className;return{root:[(0,It.Km)(sf,i).root,{pointerEvents:"auto",selectors:(n={},n[It.up]={border:"1px solid WindowText"},n)},e]}}),void 0,{scope:"PlainCard"}),vf=(0,a.Z)(),hf=function(t){function n(n){var i=t.call(this,n)||this;return i._hoverCard=u.createRef(),i.dismiss=function(t){i._async.clearTimeout(i._openTimerId),i._async.clearTimeout(i._dismissTimerId),t?i._dismissTimerId=i._async.setTimeout((function(){i._setDismissedState()}),i.props.cardDismissDelay):i._setDismissedState()},i._cardOpen=function(t){i._shouldBlockHoverCard()||"keydown"===t.type&&t.which!==i.props.openHotKey||(i._async.clearTimeout(i._dismissTimerId),"mouseenter"===t.type&&(i._currentMouseTarget=t.currentTarget),i._executeCardOpen(t))},i._executeCardOpen=function(t){i._async.clearTimeout(i._openTimerId),i._openTimerId=i._async.setTimeout((function(){i.setState((function(n){return n.isHoverCardVisible?n:{isHoverCardVisible:!0,mode:Gc.compact,openMode:"keydown"===t.type?Bc.hotKey:Bc.hover}}))}),i.props.cardOpenDelay)},i._cardDismiss=function(t,n){if(t){if(!(n instanceof MouseEvent))return;if("keydown"===n.type&&n.which!==Dt)return;i.props.sticky||i._currentMouseTarget!==n.currentTarget&&n.which!==Dt||i.dismiss(!0)}else{if(i.props.sticky&&!(n instanceof MouseEvent)&&n.nativeEvent instanceof MouseEvent&&"mouseleave"===n.type)return;i.dismiss(!0)}},i._setDismissedState=function(){i.setState({isHoverCardVisible:!1,mode:Gc.compact,openMode:Bc.hover})},i._instantOpenAsExpanded=function(t){i._async.clearTimeout(i._dismissTimerId),i.setState((function(t){return t.isHoverCardVisible?t:{isHoverCardVisible:!0,mode:Gc.expanded}}))},i._setEventListeners=function(){var t=i.props,n=t.trapFocus,e=t.instantOpenOnClick,r=t.eventListenerTarget,o=r?i._getTargetElement(r):i._getTargetElement(i.props.target),u=i._nativeDismissEvent;o&&(i._events.on(o,"mouseenter",i._cardOpen),i._events.on(o,"mouseleave",u),n?i._events.on(o,"keydown",i._cardOpen):(i._events.on(o,"focus",i._cardOpen),i._events.on(o,"blur",u)),e?i._events.on(o,"click",i._instantOpenAsExpanded):(i._events.on(o,"mousedown",u),i._events.on(o,"keydown",u)))},lc(i),i._async=new Nt(i),i._events=new Xc(i),i._nativeDismissEvent=i._cardDismiss.bind(i,!0),i._childDismissEvent=i._cardDismiss.bind(i,!1),i.state={isHoverCardVisible:!1,mode:Gc.compact,openMode:Bc.hover},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._setEventListeners()},n.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},n.prototype.componentDidUpdate=function(t,n){var i=this;t.target!==this.props.target&&(this._events.off(),this._setEventListeners()),n.isHoverCardVisible!==this.state.isHoverCardVisible&&(this.state.isHoverCardVisible?(this._async.setTimeout((function(){i.setState({mode:Gc.expanded},(function(){i.props.onCardExpand&&i.props.onCardExpand()}))}),this.props.expandedCardOpenDelay),this.props.onCardVisible&&this.props.onCardVisible()):(this.setState({mode:Gc.compact}),this.props.onCardHide&&this.props.onCardHide()))},n.prototype.render=function(){var t=this.props,n=t.expandingCardProps,i=t.children,e=t.id,r=t.setAriaDescribedBy,a=void 0===r||r,l=t.styles,s=t.theme,c=t.className,f=t.type,d=t.plainCardProps,v=t.trapFocus,h=t.setInitialFocus,g=this.state,y=g.isHoverCardVisible,m=g.mode,b=g.openMode,x=e||p("hoverCard");this._classNames=vf(l,{theme:s,className:c});var w=(0,o.Cl)((0,o.Cl)({},$(this.props,R)),{id:x,trapFocus:!!v,firstFocus:h||b===Bc.hotKey,targetElement:this._getTargetElement(this.props.target),onEnter:this._cardOpen,onLeave:this._childDismissEvent}),C=(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),w),{mode:m}),M=(0,o.Cl)((0,o.Cl)({},d),w);return u.createElement("div",{className:this._classNames.host,ref:this._hoverCard,"aria-describedby":a&&y?x:void 0,"data-is-focusable":!this.props.target},i,y&&(f===Pc.expanding?u.createElement(lf,(0,o.Cl)({},C)):u.createElement(df,(0,o.Cl)({},M))))},n.prototype._getTargetElement=function(t){switch(typeof t){case"string":return(0,C.Y)().querySelector(t);case"object":return t;default:return this._hoverCard.current||void 0}},n.prototype._shouldBlockHoverCard=function(){return!(!this.props.shouldBlockHoverCard||!this.props.shouldBlockHoverCard())},n.defaultProps={cardOpenDelay:500,cardDismissDelay:100,expandedCardOpenDelay:1500,instantOpenOnClick:!1,setInitialFocus:!1,openHotKey:67,type:Pc.expanding},n}(u.Component),pf=(0,r.I)(hf,(function(t){var n=t.className,i=t.theme;return{host:[(0,It.Km)(Yc,i).host,n]}}),void 0,{scope:"HoverCard"});!function(t){t[t.horizontal=0]="horizontal",t[t.vertical=1]="vertical"}(ef||(ef={}));var gf=function(t){var n;void 0===t&&(n={},t={getCachedMeasurement:function(t){if(t&&t.cacheKey&&n.hasOwnProperty(t.cacheKey))return n[t.cacheKey]},addMeasurementToCache:function(t,i){t.cacheKey&&(n[t.cacheKey]=i)}});var i,e=t;function r(t,n){var i=e.getCachedMeasurement(t);if(void 0!==i)return i;var r=n();return e.addMeasurementToCache(t,r),r}function u(t,n,o){for(var u=t,a=r(t,o);a>i;){var l=n(u);if(void 0===l)return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(a=e.getCachedMeasurement(l)))return{dataToMeasure:l,resizeDirection:"shrink"};u=l}return{renderedData:u,resizeDirection:void 0,dataToMeasure:void 0}}return{getNextState:function(t,n,a,l){if(void 0!==l||void 0!==n.dataToMeasure){if(l){if(i&&n.renderedData&&!n.dataToMeasure)return(0,o.Cl)((0,o.Cl)({},n),function(t,n,e,r){var u;return u=t>i?r?{resizeDirection:"grow",dataToMeasure:r(e)}:{resizeDirection:"shrink",dataToMeasure:n}:{resizeDirection:"shrink",dataToMeasure:e},i=t,(0,o.Cl)((0,o.Cl)({},u),{measureContainer:!1})}(l,t.data,n.renderedData,t.onGrowData));i=l}var s=(0,o.Cl)((0,o.Cl)({},n),{measureContainer:!1});return n.dataToMeasure&&(s="grow"===n.resizeDirection&&t.onGrowData?(0,o.Cl)((0,o.Cl)({},s),function(t,n,a,l){for(var s=t,c=r(t,a);c<i;){var f=n(s);if(void 0===f)return{renderedData:s,resizeDirection:void 0,dataToMeasure:void 0};if(void 0===(c=e.getCachedMeasurement(f)))return{dataToMeasure:f};s=f}return(0,o.Cl)({resizeDirection:"shrink"},u(s,l,a))}(n.dataToMeasure,t.onGrowData,a,t.onReduceData)):(0,o.Cl)((0,o.Cl)({},s),u(n.dataToMeasure,t.onReduceData,a))),s}},shouldRenderDataForMeasurement:function(t){return!(!t||void 0!==e.getCachedMeasurement(t))},getInitialResizeGroupState:function(t){return{dataToMeasure:(0,o.Cl)({},t),resizeDirection:"grow",measureContainer:!0}}}},yf=u.createContext({isMeasured:!1}),mf={position:"fixed",visibility:"hidden"},bf={position:"relative"};function xf(t,n){var i;switch(n.type){case"resizeData":return(0,o.Cl)({},n.value);case"dataToMeasure":return(0,o.Cl)((0,o.Cl)({},t),{dataToMeasure:n.value,resizeDirection:"grow",measureContainer:!0});default:return(0,o.Cl)((0,o.Cl)({},t),((i={})[n.type]=n.value,i))}}var wf={isMeasured:!0},Cf=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n),r=function(t,n){var i=Wt(gf),e=u.useRef(null),r=u.useRef(null),a=u.useRef(!1),l=Ot(),s=function(t,n,i){var e=Wt((function(){return n.getInitialResizeGroupState(t.data)})),r=u.useReducer(xf,e),a=r[0],l=r[1];u.useEffect((function(){l({type:"dataToMeasure",value:t.data})}),[t.data]);var s=u.useRef(e);return s.current=(0,o.Cl)({},a),[s,u.useCallback((function(t){t&&l({type:"resizeData",value:t})}),[]),u.useCallback((function(){i.current&&l({type:"measureContainer",value:!0})}),[i])]}(t,i,n),c=s[0],f=s[1],d=s[2];u.useEffect((function(){var n;c.current.renderedData&&(a.current=!0,null===(n=t.dataDidRender)||void 0===n||n.call(t,c.current.renderedData))})),u.useEffect((function(){l.requestAnimationFrame((function(){var o=void 0;if(c.current.measureContainer&&n.current){var u=n.current.getBoundingClientRect();o=t.direction===ef.vertical?u.height:u.width}var l=i.getNextState(t,c.current,(function(){var n=a.current?r:e;if(!n.current)return 0;var i=n.current.getBoundingClientRect();return t.direction===ef.vertical?i.height:i.width}),o);f(l)}),n.current)})),Tt(Bt(),"resize",l.debounce(d,16,{leading:!0}));var v=i.shouldRenderDataForMeasurement(c.current.dataToMeasure),h=!a.current&&v;return[c.current.dataToMeasure,c.current.renderedData,d,e,r,v,h]}(t,i),a=r[0],l=r[1],s=r[2],c=r[3],f=r[4],d=r[5],v=r[6];u.useImperativeHandle(t.componentRef,(function(){return{remeasure:s}}),[s]);var h=t.className,p=t.onRenderData,g=$(t,R,["data"]);return u.createElement("div",(0,o.Cl)({},g,{className:h,ref:e}),u.createElement("div",{style:bf},d&&!v&&u.createElement("div",{style:mf,ref:f},u.createElement(yf.Provider,{value:wf},p(a))),u.createElement("div",{ref:c,style:v?mf:void 0,"data-automation-id":"visibleContent"},v?p(a):l&&p(l))))}));Cf.displayName="ResizeGroupBase";var Mf,kf=Cf;!function(t){t.KEYTIP_ADDED="keytipAdded",t.KEYTIP_REMOVED="keytipRemoved",t.KEYTIP_UPDATED="keytipUpdated",t.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",t.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",t.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",t.ENTER_KEYTIP_MODE="enterKeytipMode",t.EXIT_KEYTIP_MODE="exitKeytipMode"}(Mf||(Mf={}));var Af=function(){function t(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return t.getInstance=function(){return this._instance},t.prototype.init=function(t){this.delayUpdatingKeytipChange=t},t.prototype.register=function(t,n){void 0===n&&(n=!1);var i=t;n||(i=this.addParentOverflow(t),this.sequenceMapping[i.keySequences.toString()]=i);var e=this._getUniqueKtp(i);if(n?this.persistedKeytips[e.uniqueID]=e:this.keytips[e.uniqueID]=e,this.inKeytipMode||!this.delayUpdatingKeytipChange){var r=n?Mf.PERSISTED_KEYTIP_ADDED:Mf.KEYTIP_ADDED;Xc.raise(this,r,{keytip:i,uniqueID:e.uniqueID})}return e.uniqueID},t.prototype.update=function(t,n){var i=this.addParentOverflow(t),e=this._getUniqueKtp(i,n),r=this.keytips[n];r&&(e.keytip.visible=r.keytip.visible,this.keytips[n]=e,delete this.sequenceMapping[r.keytip.keySequences.toString()],this.sequenceMapping[e.keytip.keySequences.toString()]=e.keytip,!this.inKeytipMode&&this.delayUpdatingKeytipChange||Xc.raise(this,Mf.KEYTIP_UPDATED,{keytip:e.keytip,uniqueID:e.uniqueID}))},t.prototype.unregister=function(t,n,i){void 0===i&&(i=!1),i?delete this.persistedKeytips[n]:delete this.keytips[n],!i&&delete this.sequenceMapping[t.keySequences.toString()];var e=i?Mf.PERSISTED_KEYTIP_REMOVED:Mf.KEYTIP_REMOVED;!this.inKeytipMode&&this.delayUpdatingKeytipChange||Xc.raise(this,e,{keytip:t,uniqueID:n})},t.prototype.enterKeytipMode=function(){Xc.raise(this,Mf.ENTER_KEYTIP_MODE)},t.prototype.exitKeytipMode=function(){Xc.raise(this,Mf.EXIT_KEYTIP_MODE)},t.prototype.getKeytips=function(){var t=this;return Object.keys(this.keytips).map((function(n){return t.keytips[n].keytip}))},t.prototype.addParentOverflow=function(t){var n=(0,o.fX)([],t.keySequences,!0);if(n.pop(),0!==n.length){var i=this.sequenceMapping[n.toString()];if(i&&i.overflowSetSequence)return(0,o.Cl)((0,o.Cl)({},t),{overflowSetSequence:i.overflowSetSequence})}return t},t.prototype.menuExecute=function(t,n){Xc.raise(this,Mf.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:t,keytipSequences:n})},t.prototype._getUniqueKtp=function(t,n){return void 0===n&&(n=p()),{keytip:(0,o.Cl)({},t),uniqueID:n}},t._instance=new t,t}(),Sf=function(t,n,i){for(var e=0,r=t;e<r.length;e++){var o=r[e];i[n.register(o,!0)]=o}},Lf=function(t,n){for(var i=0,e=Object.keys(n);i<e.length;i++){var r=e[i];t.unregister(n[r],r,!0),delete n[r]}},Vf=function(t){var n=Af.getInstance(),i=t.className,e=t.overflowItems,r=t.keytipSequences,a=t.itemSubMenuProvider,l=t.onRenderOverflowButton,s=Wt({}),c=u.useCallback((function(t){return a?a(t):t.subMenuProps?t.subMenuProps.items:void 0}),[a]),f=u.useMemo((function(){var t=[],i=[];return r?null==e||e.forEach((function(e){var u,a=e.keytipProps;if(a){var l={content:a.content,keySequences:a.keySequences,disabled:a.disabled||!(!e.disabled&&!e.isDisabled),hasDynamicChildren:a.hasDynamicChildren,hasMenu:a.hasMenu};a.hasDynamicChildren||c(e)?(l.onExecute=n.menuExecute.bind(n,r,null===(u=null==e?void 0:e.keytipProps)||void 0===u?void 0:u.keySequences),l.hasOverflowSubMenu=!0):l.onExecute=a.onExecute,t.push(l);var s=(0,o.Cl)((0,o.Cl)({},e),{keytipProps:(0,o.Cl)((0,o.Cl)({},a),{overflowSetSequence:r})});null==i||i.push(s)}else null==i||i.push(e)})):i=e,{modifiedOverflowItems:i,keytipsToRegister:t}}),[e,c,n,r]),d=f.modifiedOverflowItems;return function(t,n,i){var e=Kc(t);u.useEffect((function(){e&&(Lf(i,e),Sf(n,i,t))})),u.useEffect((function(){return Sf(n,i,t),function(){Lf(i,t)}}),[])}(s,f.keytipsToRegister,n),u.createElement("div",{className:i},l(d))},Df=(0,a.Z)(),Nf=u.forwardRef((function(t,n){var i=u.useRef(null),e=Et(i,n);!function(t,n){var i=function(){var t;return null!==(t=Pt())&&void 0!==t?t:"undefined"!=typeof document?document:void 0}();u.useImperativeHandle(t.componentRef,(function(){return{focus:function(t,i){var e=!1;return n.current&&(e=M(n.current,i)),e},focusElement:function(t){var e=!1;return!!t&&(n.current&&w(n.current,t)&&(t.focus(),e=(null==i?void 0:i.activeElement)===t),e)}}}),[n,i])}(t,i);var r=t.items,a=t.overflowItems,l=t.className,s=t.styles,c=t.vertical,f=t.role,d=t.overflowSide,v=void 0===d?"end":d,h=t.onRenderItem,p=Df(s,{className:l,vertical:c}),g=!!a&&a.length>0;return u.createElement("div",(0,o.Cl)({},$(t,R),{role:f||"group","aria-orientation":"menubar"===f?!0===c?"vertical":"horizontal":void 0,className:p.root,ref:e}),"start"===v&&g&&u.createElement(Vf,(0,o.Cl)({},t,{className:p.overflowButton})),r&&r.map((function(t,n){return u.createElement("div",{className:p.item,key:t.key,role:"none"},h(t))})),"end"===v&&g&&u.createElement(Vf,(0,o.Cl)({},t,{className:p.overflowButton})))}));Nf.displayName="OverflowSet";var Of,Tf={flexShrink:0,display:"inherit"},Ef=(0,r.I)(Nf,(function(t){var n=t.className;return{root:["ms-OverflowSet",{position:"relative",display:"flex",flexWrap:"nowrap"},t.vertical&&{flexDirection:"column"},n],item:["ms-OverflowSet-item",Tf],overflowButton:["ms-OverflowSet-overflowButton",Tf]}}),void 0,{scope:"OverflowSet"}),Ff=((Of={})["".concat(As[As.circle])]="M1 6 A5 5 0 1 0 12 6 M1 6 A5 5 0 0 1 12 6",Of["".concat(As[As.square])]="M1 1 L12 1 L12 12 L1 12 L1 1 Z",Of["".concat(As[As.triangle])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Of["".concat(As[As.pyramid])]="M6 10L8.74228e-07 -1.04907e-06L12 0L6 10Z",Of["".concat(As[As.diamond])]="M2 2 L10 2 L10 10 L2 10 L2 2 Z",Of["".concat(As[As.hexagon])]="M9 0H3L0 5L3 10H9L12 5L9 0Z",Of["".concat(As[As.pentagon])]="M6.06061 0L0 4.21277L2.30303 11H9.69697L12 4.21277L6.06061 0Z",Of["".concat(As[As.octagon])]="M7.08333 0H2.91667L0 2.91667V7.08333L2.91667 10H7.08333L10 7.08333V2.91667L7.08333 0Z",Of["".concat(Ss[Ss.dottedLine])]="M0 6 H3 M5 6 H8 M10 6 H13",Of),Bf=function(t){var n=t.svgProps,i=t.pathProps,e=t.shape,r=t.classNameForNonSvg;return-1===Object.keys(Ff).indexOf(e)?u.createElement("div",{className:r}):u.createElement("svg",(0,o.Cl)({width:14,height:14,viewBox:"-1 -1 14 14"},Fs(n),{transform:"rotate(".concat(e===As[As.diamond]?45:e===As[As.pyramid]?180:0,", 0, 0)")}),u.createElement("path",(0,o.Cl)({d:Ff[e]},Fs(i))))};function Pf(t,n,i,e){return void 0===i&&(i=!1),void 0===e&&(e={}),new Promise((function(r,u){if(!t)return u(new Error("Chart container is not defined"));try{var a="string"==typeof e.background?function(t,n){var i=getComputedStyle(t);return n.replace(Ps,(function(t,n){return i.getPropertyValue(n)}))}(t,e.background):"transparent",l=function(t,n,i,e){var r=t.querySelector("svg");if(!r)throw new Error("SVG not found");for(var u=nl(r.cloneNode(!0)).attr("width",null).attr("height",null).attr("viewBox",null),a=r.getElementsByTagName("*"),l=u.node().getElementsByTagName("*"),s=["text"],c=["table","thead","tbody","tr","th","td"],f=0;f<a.length;f++){var d=a[f].tagName.toLowerCase();s.includes(d)||c.includes(d)?_s((0,o.fX)((0,o.fX)([],_f,!0),Hf,!0),a[f],l[f]):_s(_f,a[f],l[f])}a=null,l=null;var v=r.getBoundingClientRect(),h=v.width,p=v.height,g="function"==typeof n?n(h,i):{node:null,width:0,height:0},y=Math.max(h,g.width),m=p+g.height;g.node&&(nl(g.node).attr("transform","translate(0, ".concat(p,")")),u.append((function(){return g.node}))),u.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y).attr("height",m).attr("fill",e),u.attr("width",y).attr("height",m).attr("viewBox","0 0 ".concat(y," ").concat(m)).attr("direction",i?"rtl":"ltr");var b={node:u.node(),width:y,height:m};return u=null,b}(t,n,i,a);if(!l.node)return u(new Error("SVG node is null"));var s=(new XMLSerializer).serializeToString(l.node);l.node=null;var c="data:image/svg+xml;base64,"+btoa(function(t){for(var n,i,e="",r=t.length,o=0;o<r;){if("%"===(n=t.charAt(o++)))if("u"===t.charAt(o)){if(i=t.slice(o+1,o+5),Rf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=5;continue}}else if(i=t.slice(o,o+2),Wf.exec(i)){e+=String.fromCharCode(parseInt(i,16)),o+=2;continue}e+=n}return e}(encodeURIComponent(s)));s=null,function(t,n){return void 0===n&&(n={}),new Promise((function(i,e){var r=n.scale||1,o=n.width||300,u=n.height||150,a=r*o,l=r*u,s=document.createElement("canvas"),c=new Image;s.width=a,s.height=l,c.onload=function(){var t=s.getContext("2d");if(!t)return e(new Error("Canvas context is null"));t.clearRect(0,0,a,l),t.drawImage(c,0,0,a,l);var n=s.toDataURL("image/png");i(n)},c.onerror=function(t){e(t)},c.src=t}))}(c,{width:e.width||l.width,height:e.height||l.height,scale:e.scale}).then(r).catch(u),c=null}catch(t){return u(t)}}))}var _f=["display","fill","fill-opacity","opacity","stroke","stroke-width","transform","border-collapse"],Hf=["font-family","font-size","font-weight","text-anchor","background-color","color","padding","text-align","border"],If={color:"fill","font-family":"font-family","font-size":"font-size","font-weight":"font-weight"};var Wf=/^[\da-f]{2}$/i,Rf=/^[\da-f]{4}$/i,$f=(0,a.Z)(),zf=function(t){function n(n){var i,e,r,a,l=t.call(this,n)||this;l._isLegendSelected=!1,l.toSVG=function(t,n){return void 0===n&&(n=!1),function(t,n,i,e){if(0===t.length)return{node:null,width:0,height:0};for(var r=i.selectedLegends,u=i.centerLegends,a=i.textClassName,l=i.isRTL,s=nl(za("svg:g").call(document.documentElement)),c=u?0:12,f=8,d=[],v=[],h=[],p=0===Object.keys(r).length,g=function(i){var o,g,y,m,b=(o=t[i].title,g=a,y=e,(m=document.getElementById(Is))||((m=document.createElement("span")).setAttribute("id",Is),m.setAttribute("aria-hidden","true"),y?y.appendChild(m):document.body.appendChild(m)),m.setAttribute("class",g),Object.assign(m.style,Hs),m.textContent="".concat(o),m),x=29+b.getBoundingClientRect().width+8,w=s.append("g");d.push({elem:w,width:x}),c+x>n&&d.length>1&&(d.pop(),v.push(d),h.push(c),d=[{elem:w,width:x}],c=u?0:12,f+=32);var C=r[t[i].title]||p;w.append("rect").attr("x",c+(l?x-8-13:8)).attr("y",f+8).attr("width",13).attr("height",13).style("fill",C?t[i].color:"transparent").style("stroke-width",1).style("stroke",t[i].color),w.append("text").attr("x",c+(l?x-29:29)).attr("y",f+8).attr("dominant-baseline","hanging").style("opacity",C?1:.67).text(t[i].title).call((function(t){return _s(If,b,t.node())})),c+=x},y=0;y<t.length;y++)g(y);if(v.push(d),h.push(c),f+=32,u)v.forEach((function(t,i){var e=Math.max((n-h[i])/2,0),r=h[i],o=0;t.forEach((function(t){var n=e+(l?r-t.width-o:0);t.elem.attr("transform","translate(".concat(n,", 0)")),r-=t.width,o+=t.width}))}));else if(l){var m=Math.max.apply(Math,(0,o.fX)([n],h,!1));v.forEach((function(t){var n=m-12,i=12;t.forEach((function(t){var e=n-t.width-i;t.elem.attr("transform","translate(".concat(e,", 0)")),n-=t.width,i+=t.width}))}))}return{node:s.node(),width:Math.max.apply(Math,h),height:f}}(l.props.legends,t,{selectedLegends:l.state.selectedLegends,centerLegends:!!l.props.centerLegends,textClassName:l._classNames.text,isRTL:n},l._rootElem)},l._onRenderData=function(t){var n=l.props,i=n.overflowProps,e=n.allowFocusOnLegends,r=void 0===e||e,a=n.canSelectMultipleLegends,s=void 0!==a&&a,c={root:{justifyContent:l.props.centerLegends?"center":"unset",flexWrap:l.props.enabledWrapLines?"wrap":"nowrap"}};return u.createElement(Dc,(0,o.Cl)({},r&&{role:"listbox","aria-label":"Legends","aria-multiselectable":s}),u.createElement(Ef,(0,o.Cl)({items:t.primary,overflowItems:t.overflow,onRenderItem:l._renderButton,onRenderOverflowButton:l._renderOverflowItems},i,{styles:(0,o.Cl)((0,o.Cl)({},c),null==i?void 0:i.styles)})))},l._onReduceData=function(t){if(0!==t.primary.length){var n=(0,o.fX)((0,o.fX)([],t.primary.slice(-1),!0),t.overflow,!0);return{primary:t.primary.slice(0,-1),overflow:n}}},l._onGrowData=function(t){if(0!==t.overflow.length){var n=t.overflow.slice(1);return{primary:(0,o.fX)((0,o.fX)([],t.primary,!0),t.overflow.slice(0,1),!0),overflow:n}}},l._getNewSelectedLegendsForMultiselect=function(t){var n=(0,o.Cl)({},l.state.selectedLegends);return n[t.title]?delete n[t.title]:(n[t.title]=!0,Object.keys(n).length===l.props.legends.length&&(n={})),n},l._getNewSelectedLegendsForSingleSelect=function(t){var n;return l.state.selectedLegends[t.title]?{}:((n={})[t.title]=!0,n)},l._onClick=function(t,n){var i,e,r,o=l.props.canSelectMultipleLegends,u=void 0!==o&&o?l._getNewSelectedLegendsForMultiselect(t):l._getNewSelectedLegendsForSingleSelect(t);l.setState({selectedLegends:u}),null===(e=(i=l.props).onChange)||void 0===e||e.call(i,Object.keys(u),n,t),null===(r=t.action)||void 0===r||r.call(t)},l._onRenderCompactCard=function(t){var n=l.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.className,a=n.styles,s=n.theme,c=n.canSelectMultipleLegends,f=void 0!==c&&c,d=[],v=$f(a,{theme:s,className:r});return t.renderData.forEach((function(t,n){var i=l._renderButton(t,n,!0);d.push(i)})),u.createElement(Dc,(0,o.Cl)({},e&&{role:"listbox","aria-label":"Legends","aria-multiselectable":f},{direction:Ys.vertical,handleTabKey:1,isCircularNavigation:!0},l.props.focusZonePropsInHoverCard,{className:v.hoverCardRoot}),d)},l._renderOverflowItems=function(t){var n=l.props.allowFocusOnLegends,i=void 0===n||n,e=[];t.forEach((function(t,n){e.push({key:n.toString(),name:t.title,onClick:t.action})}));var r={renderData:t},a=l.props,s=a.theme,c=a.className,f=a.styles,d=a.overflowText,v=$f(f,{theme:s,className:c}),h={onRenderPlainCard:l._onRenderCompactCard,renderData:r},p=d||"more";return u.createElement(pf,{type:Pc.plain,plainCardProps:h,instantOpenOnClick:!0,onCardHide:function(){l.setState({isHoverCardVisible:!1});var n=m(t,(function(t){return t.title===l.state.activeLegend}));n&&(l.setState({activeLegend:""}),n.onMouseOutAction&&n.onMouseOutAction())},setInitialFocus:!0,trapFocus:!0,onCardVisible:l._hoverCardVisible,styles:v.subComponentStyles.hoverCardStyles,cardDismissDelay:300,target:l._hoverCardRef},u.createElement("div",{role:"option"},u.createElement("div",(0,o.Cl)({className:v.overflowIndicationTextStyle,ref:function(t){return l._hoverCardRef=t}},i&&{role:"button","aria-expanded":l.state.isHoverCardVisible,"aria-label":"".concat(e.length," ").concat(p)},{"data-is-focusable":i}),e.length," ",p)))},l._hoverCardVisible=function(){l.setState({isHoverCardVisible:!0})},l._onHoverOverLegend=function(t){t.hoverAction&&(l.setState({activeLegend:t.title}),t.hoverAction())},l._onLeave=function(t){t.onMouseOutAction&&(l.setState({activeLegend:""}),t.onMouseOutAction())},l._renderButton=function(t,n,i){var e=l.props.allowFocusOnLegends,r=void 0===e||e,a={title:t.title,color:t.color,shape:t.shape,action:t.action,hoverAction:t.hoverAction,onMouseOutAction:t.onMouseOutAction,stripePattern:t.stripePattern,isLineLegendInBarChart:t.isLineLegendInBarChart,opacity:t.opacity},s=l._getColor(a.title,a.color),c=l.props,f=c.theme,d=c.className,v=c.styles,h=$f(v,{theme:f,className:d,colorOnSelectedState:s,borderColor:a.color,overflow:i,stripePattern:a.stripePattern,isLineLegendInBarChart:a.isLineLegendInBarChart,opacity:a.opacity}),p=function(){l._onHoverOverLegend(a)},g=function(){l._onLeave(a)},y=l._getShape(h,a,s);return u.createElement("button",(0,o.Cl)({},r&&{"aria-selected":!!l.state.selectedLegends[a.title],role:"option","aria-label":"".concat(a.title),"aria-setsize":t["aria-setsize"],"aria-posinset":t["aria-posinset"]},t.nativeButtonProps&&(0,o.Cl)({},t.nativeButtonProps),{key:n,className:h.legend,onClick:function(t){l._onClick(a,t)},onMouseOver:p,onMouseOut:g,onFocus:p,onBlur:g,"data-is-focusable":r}),y,u.createElement("div",{className:h.text},a.title))};var s=null!==(e=n.selectedLegends)&&void 0!==e?e:n.defaultSelectedLegends,c=null!==(r=n.selectedLegend)&&void 0!==r?r:n.defaultSelectedLegend,f={};return n.canSelectMultipleLegends?f=(null===(a=null!=s?s:[])||void 0===a?void 0:a.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{}))||{}:c&&((i={})[c]=!0,f=i),l.state={activeLegend:"",isHoverCardVisible:!1,selectedLegends:f},l}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e=t.selectedLegend,r=t.selectedLegends;return t.canSelectMultipleLegends&&void 0!==r?(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:r.reduce((function(t,n){var i;return(0,o.Cl)(((i={})[n]=!0,i),t)}),{})}):t.canSelectMultipleLegends||void 0===e?n:(0,o.Cl)((0,o.Cl)({},n),{selectedLegends:(i={},i[e]=!0,i)})},n.prototype.render=function(){var t=this,n=this.props,i=n.theme,e=n.className,r=n.styles;this._classNames=$f(r,{theme:i,className:e}),this._isLegendSelected=Object.keys(this.state.selectedLegends).length>0;var o=this._generateData();return u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},this.props.enabledWrapLines?this._onRenderData(o):u.createElement(kf,{data:o,onReduceData:this._onReduceData,onRenderData:this._onRenderData,onGrowData:this._onGrowData}))},n.prototype._generateData=function(){var t=this,n=this.props,i=n.allowFocusOnLegends,e=void 0===i||i,r=n.shape;return{primary:this.props.legends.map((function(n,i){return(0,o.Cl)((0,o.Cl)({},e&&{nativeButtonProps:$(n,W,["title"]),"aria-setsize":t.props.legends.length,"aria-posinset":i+1}),{title:n.title,action:n.action,hoverAction:n.hoverAction,onMouseOutAction:n.onMouseOutAction,color:n.color,shape:r||n.shape,stripePattern:n.stripePattern,isLineLegendInBarChart:n.isLineLegendInBarChart,opacity:n.opacity,key:i})})),overflow:[]}},n.prototype._getShape=function(t,n,i){var e={className:t.shape},r={fill:i,strokeWidth:2,stroke:n.color};return u.createElement(Bf,{svgProps:e,pathProps:r,shape:n.shape,classNameForNonSvg:t.rect})},n.prototype._getColor=function(t,n){var i=this.props.theme;return this._isLegendSelected?this.state.selectedLegends[t]?n:i.semanticColors.buttonBackground:this.state.activeLegend===t||""===this.state.activeLegend?n:i.semanticColors.buttonBackground},n}(u.Component),jf=(0,r.I)(zf,(function(t){var n,i,e=t.className,r=t.theme,u=t.isLineLegendInBarChart,a=void 0!==u&&u,l=r,s=l.palette,c=l.fonts,f={inset:void 0,position:void 0,highContrastStyle:{outlineColor:r.semanticColors.focusBorder},borderColor:"transparent",outlineColor:void 0};return{root:[{whiteSpace:"nowrap",width:"100%",alignItems:"center",margin:"-8px 0 0 -8px"},e],legend:[(0,It.gm)(r,f),{display:"flex",alignItems:"center",cursor:"pointer",border:"none",padding:"".concat(8,"px"),background:"none",textTransform:"capitalize"}],rect:{selectors:(n={},n[It.up]={content:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")"),opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":""},n),width:"".concat(12,"px"),height:a?"4px":"".concat(12,"px"),backgroundColor:t.stripePattern?"":t.colorOnSelectedState,marginRight:"".concat(8,"px"),border:"".concat(1,"px solid"),borderColor:t.borderColor?t.borderColor:null==r?void 0:r.semanticColors.buttonBorder,content:t.stripePattern?"repeating-linear-gradient(135deg, transparent, transparent 3px, ".concat(t.colorOnSelectedState," 1px, ").concat(t.colorOnSelectedState," 4px)"):""},shape:[{marginRight:"".concat(8,"px")}],triangle:{width:"0",height:"0",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"10.4px solid",borderTopColor:t.colorOnSelectedState,marginRight:"8px",opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"0.6":t.opacity?t.opacity:"",selectors:(i={},i[It.up]={border:"0px",height:"10.4px",width:"10.4px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(t.colorOnSelectedState,", ").concat(t.colorOnSelectedState,")")},i)},text:(0,o.Cl)((0,o.Cl)({},c.small),{lineHeight:"16px",color:null==r?void 0:r.semanticColors.bodyText,opacity:t.colorOnSelectedState===r.semanticColors.buttonBackground?"".concat(.67):""}),hoverChange:{width:"12px",height:"12px",backgroundColor:r.semanticColors.buttonBackground,marginRight:"8px",border:"1px solid",borderColor:t.borderColor?t.borderColor:s.black},overflowIndicationTextStyle:[(0,It.gm)(r,f),(0,o.Cl)((0,o.Cl)({cursor:"pointer",color:null==r?void 0:r.semanticColors.bodyText},c.small),{lineHeight:"16px",padding:"".concat(8,"px")})],hoverCardRoot:{padding:"8px",position:"relative",overflowY:"auto",maxHeight:"300px"},subComponentStyles:{hoverCardStyles:{host:[(0,It.gm)(r,f)]}}}}));function Yf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Xf(t){return function(){return t}}function Gf(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function qf(t){return t}Array.prototype.slice;const Uf=Math.abs,Zf=Math.atan2,Kf=Math.cos,Jf=Math.max,Qf=Math.min,td=Math.sin,nd=Math.sqrt,id=1e-12,ed=Math.PI,rd=ed/2,od=2*ed;function ud(t){return t>=1?rd:t<=-1?-rd:Math.asin(t)}function ad(){var t=qf,n=Gf,i=null,e=Xf(0),r=Xf(od),o=Xf(0);function u(u){var a,l,s,c,f,d=(u=Yf(u)).length,v=0,h=new Array(d),p=new Array(d),g=+e.apply(this,arguments),y=Math.min(od,Math.max(-od,r.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/d,o.apply(this,arguments)),b=m*(y<0?-1:1);for(a=0;a<d;++a)(f=p[h[a]=a]=+t(u[a],a,u))>0&&(v+=f);for(null!=n?h.sort((function(t,i){return n(p[t],p[i])})):null!=i&&h.sort((function(t,n){return i(u[t],u[n])})),a=0,s=v?(y-d*b)/v:0;a<d;++a,g=c)l=h[a],c=g+((f=p[l])>0?f*s:0)+b,p[l]={data:u[l],index:a,value:f,startAngle:g,endAngle:c,padAngle:m};return p}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:Xf(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,i=null,u):n},u.sort=function(t){return arguments.length?(i=t,n=null,u):i},u.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:Xf(+t),u):e},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Xf(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Xf(+t),u):o},u}const ld=Math.PI,sd=2*ld,cd=1e-6,fd=sd-cd;function dd(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}class vd{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?dd:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return dd;const i=10**n;return function(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,e){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+e}`}bezierCurveTo(t,n,i,e,r,o){this._append`C${+t},${+n},${+i},${+e},${this._x1=+r},${this._y1=+o}`}arcTo(t,n,i,e,r){if(t=+t,n=+n,i=+i,e=+e,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=this._x1,u=this._y1,a=i-t,l=e-n,s=o-t,c=u-n,f=s*s+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(f>cd)if(Math.abs(c*a-l*s)>cd&&r){let d=i-o,v=e-u,h=a*a+l*l,p=d*d+v*v,g=Math.sqrt(h),y=Math.sqrt(f),m=r*Math.tan((ld-Math.acos((h+f-p)/(2*g*y)))/2),b=m/y,x=m/g;Math.abs(b-1)>cd&&this._append`L${t+b*s},${n+b*c}`,this._append`A${r},${r},0,0,${+(c*d>s*v)},${this._x1=t+x*a},${this._y1=n+x*l}`}else this._append`L${this._x1=t},${this._y1=n}`}arc(t,n,i,e,r,o){if(t=+t,n=+n,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(e),a=i*Math.sin(e),l=t+u,s=n+a,c=1^o,f=o?e-r:r-e;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>cd||Math.abs(this._y1-s)>cd)&&this._append`L${l},${s}`,i&&(f<0&&(f=f%sd+sd),f>fd?this._append`A${i},${i},0,1,${c},${t-u},${n-a}A${i},${i},0,1,${c},${this._x1=l},${this._y1=s}`:f>cd&&this._append`A${i},${i},0,${+(f>=ld)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=n+i*Math.sin(r)}`)}rect(t,n,i,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+e}h${-i}Z`}toString(){return this._}}function hd(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(null==i)n=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);n=t}return t},()=>new vd(n)}function pd(t){return t.innerRadius}function gd(t){return t.outerRadius}function yd(t){return t.startAngle}function md(t){return t.endAngle}function bd(t){return t&&t.padAngle}function xd(t,n,i,e,r,o,u){var a=t-i,l=n-e,s=(u?o:-o)/nd(a*a+l*l),c=s*l,f=-s*a,d=t+c,v=n+f,h=i+c,p=e+f,g=(d+h)/2,y=(v+p)/2,m=h-d,b=p-v,x=m*m+b*b,w=r-o,C=d*p-h*v,M=(b<0?-1:1)*nd(Jf(0,w*w*x-C*C)),k=(C*b-m*M)/x,A=(-C*m-b*M)/x,S=(C*b+m*M)/x,L=(-C*m+b*M)/x,V=k-g,D=A-y,N=S-g,O=L-y;return V*V+D*D>N*N+O*O&&(k=S,A=L),{cx:k,cy:A,x01:-c,y01:-f,x11:k*(r/w-1),y11:A*(r/w-1)}}function wd(){var t=pd,n=gd,i=Xf(0),e=null,r=yd,o=md,u=bd,a=null,l=hd(s);function s(){var s,c,f,d=+t.apply(this,arguments),v=+n.apply(this,arguments),h=r.apply(this,arguments)-rd,p=o.apply(this,arguments)-rd,g=Uf(p-h),y=p>h;if(a||(a=s=l()),v<d&&(c=v,v=d,d=c),v>id)if(g>od-id)a.moveTo(v*Kf(h),v*td(h)),a.arc(0,0,v,h,p,!y),d>id&&(a.moveTo(d*Kf(p),d*td(p)),a.arc(0,0,d,p,h,y));else{var m,b,x=h,w=p,C=h,M=p,k=g,A=g,S=u.apply(this,arguments)/2,L=S>id&&(e?+e.apply(this,arguments):nd(d*d+v*v)),V=Qf(Uf(v-d)/2,+i.apply(this,arguments)),D=V,N=V;if(L>id){var O=ud(L/d*td(S)),T=ud(L/v*td(S));(k-=2*O)>id?(C+=O*=y?1:-1,M-=O):(k=0,C=M=(h+p)/2),(A-=2*T)>id?(x+=T*=y?1:-1,w-=T):(A=0,x=w=(h+p)/2)}var E=v*Kf(x),F=v*td(x),B=d*Kf(M),P=d*td(M);if(V>id){var _,H=v*Kf(w),I=v*td(w),W=d*Kf(C),R=d*td(C);if(g<ed)if(_=function(t,n,i,e,r,o,u,a){var l=i-t,s=e-n,c=u-r,f=a-o,d=f*l-c*s;if(!(d*d<id))return[t+(d=(c*(n-o)-f*(t-r))/d)*l,n+d*s]}(E,F,W,R,H,I,B,P)){var $=E-_[0],z=F-_[1],j=H-_[0],Y=I-_[1],X=1/td(((f=($*j+z*Y)/(nd($*$+z*z)*nd(j*j+Y*Y)))>1?0:f<-1?ed:Math.acos(f))/2),G=nd(_[0]*_[0]+_[1]*_[1]);D=Qf(V,(d-G)/(X-1)),N=Qf(V,(v-G)/(X+1))}else D=N=0}A>id?N>id?(m=xd(W,R,E,F,v,N,y),b=xd(H,I,B,P,v,N,y),a.moveTo(m.cx+m.x01,m.cy+m.y01),N<V?a.arc(m.cx,m.cy,N,Zf(m.y01,m.x01),Zf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,N,Zf(m.y01,m.x01),Zf(m.y11,m.x11),!y),a.arc(0,0,v,Zf(m.cy+m.y11,m.cx+m.x11),Zf(b.cy+b.y11,b.cx+b.x11),!y),a.arc(b.cx,b.cy,N,Zf(b.y11,b.x11),Zf(b.y01,b.x01),!y))):(a.moveTo(E,F),a.arc(0,0,v,x,w,!y)):a.moveTo(E,F),d>id&&k>id?D>id?(m=xd(B,P,H,I,d,-D,y),b=xd(E,F,W,R,d,-D,y),a.lineTo(m.cx+m.x01,m.cy+m.y01),D<V?a.arc(m.cx,m.cy,D,Zf(m.y01,m.x01),Zf(b.y01,b.x01),!y):(a.arc(m.cx,m.cy,D,Zf(m.y01,m.x01),Zf(m.y11,m.x11),!y),a.arc(0,0,d,Zf(m.cy+m.y11,m.cx+m.x11),Zf(b.cy+b.y11,b.cx+b.x11),y),a.arc(b.cx,b.cy,D,Zf(b.y11,b.x11),Zf(b.y01,b.x01),!y))):a.arc(0,0,d,M,C,y):a.lineTo(B,P)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-ed/2;return[Kf(e)*i,td(e)*i]},s.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:Xf(+n),s):t},s.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Xf(+t),s):n},s.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:Xf(+t),s):i},s.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Xf(+t),s):e},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Xf(+t),s):r},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Xf(+t),s):o},s.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:Xf(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}var Cd=function(t){var n,i=t.solidFill,e=t.gradientFill,r=t.href,o=t.theme,u=t.opacity;return{root:{fill:i,cursor:r?"pointer":"default",stroke:o.semanticColors.bodyBackground,outline:"transparent",selectors:{"::-moz-focus-inner":{border:"0"}},opacity:u},gradientArc:{width:"100%",height:"100%",background:e,opacity:u},focusRing:{stroke:o.semanticColors.focusBorder,strokeWidth:4,fill:"transparent"},arcLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:o.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Md=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.state={},n.currentRef=u.createRef(),n._isRTL=(0,l.jI)(),n._hoverOff=function(){n.props.hoverLeaveCallback()},n._onBlur=function(){n.props.onBlurCallback()},n._getAriaLabel=function(){var t,i=n.props.data.data,e=i.xAxisCalloutData||i.legend,r=i.yAxisCalloutData||i.data||0;return(null===(t=i.callOutAccessibilityData)||void 0===t?void 0:t.ariaLabel)||(e?"".concat(e,", "):"")+"".concat(r,".")},n._shouldHighlightArc=function(t){var i=n.props.activeArc;return!i||0===i.length||void 0===t||i.includes(t)},n._renderArcLabel=function(t){var i=n.props,e=i.arc,r=i.data,o=i.innerRadius,a=i.outerRadius,l=i.showLabelsInPercent,s=i.totalValue;if(i.hideLabels||Math.abs(r.endAngle-r.startAngle)<Math.PI/12||!n._shouldHighlightArc(r.data.legend))return null;var c=e.centroid(r),f=c[0],d=c[1],v=Math.sqrt(f*f+d*d),h=Math.max(o,a)+2,p=(r.startAngle+r.endAngle)/2,g=r.value;return u.createElement("text",{x:(0===v?0:f/v)*h,y:(0===v?0:d/v)*h,textAnchor:p>Math.PI!==n._isRTL?"end":"start",dominantBaseline:p>Math.PI/2&&p<3*Math.PI/2?"hanging":"auto",className:t,"aria-hidden":!0},l?Bu(".0%")(0===s?0:g/s):Ns(g))},n}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return kd(t),null},n.prototype.updateChart=function(t){kd(t)},n.prototype.render=function(){var t,n,i,e,r,o,l,s=this.props,c=s.arc,f=s.href,d=s.focusedArcId,v=s.activeArc,h=(0,a.Z)(),g=this.props.uniqText+("string"==typeof this.props.data.data.legend?this.props.data.data.legend.replace(/\s+/g,""):"")+this.props.data.data.data,y=v&&v.length>0?v.includes(null===(t=this.props.data)||void 0===t?void 0:t.data.legend)?1:.1:1,m=null!==(i=null===(n=this.props.data)||void 0===n?void 0:n.startAngle)&&void 0!==i?i:0,b=(null!==(r=null===(e=this.props.data)||void 0===e?void 0:e.endAngle)&&void 0!==r?r:0)-m,x=this.props.roundCorners?3:0,w=h(Cd,{solidFill:this.props.enableGradient?"transparent":this.props.color,gradientFill:"conic-gradient(\n from ".concat(m,"rad,\n ").concat(this.props.color,",\n ").concat(this.props.nextColor," ").concat(b,"rad\n )"),href:f,theme:this.props.theme,opacity:y}),C=p("Arc_clip")+"".concat(this.props.color,"_").concat(this.props.nextColor);return u.createElement("g",{ref:this.currentRef},!!d&&d===g&&u.createElement("path",{id:g+"focusRing",d:c.cornerRadius(x)(this.props.focusData),className:w.focusRing}),u.createElement("path",{id:g,d:c.cornerRadius(x)(this.props.data),onFocus:this._onFocus.bind(this,this.props.data.data,g),className:w.root,"data-is-focusable":this._shouldHighlightArc(this.props.data.data.legend)||0===(null===(o=this.props.activeArc)||void 0===o?void 0:o.length),onMouseOver:this._hoverOn.bind(this,this.props.data.data),onMouseMove:this._hoverOn.bind(this,this.props.data.data),onMouseLeave:this._hoverOff,onBlur:this._onBlur,onClick:f?this._redirectToUrl.bind(this,f):null===(l=this.props.data)||void 0===l?void 0:l.data.onClick,"aria-label":this._getAriaLabel(),role:"img"}),this._renderArcLabel(w.arcLabel),this.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:C},u.createElement("path",{d:c.cornerRadius(x)(this.props.data)})),u.createElement("foreignObject",{x:"-50%",y:"-50%",width:"100%",height:"100%",clipPath:"url(#".concat(C,")")},u.createElement("div",{className:w.gradientArc}))))},n.prototype._onFocus=function(t,n){this.props.onFocusCallback(t,n,this.currentRef.current)},n.prototype._hoverOn=function(t,n){n.persist(),this.props.hoverOnCallback(t,n)},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.defaultProps={arc:wd()},n}(u.Component);function kd(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Ad,Sd,Ld,Vd=function(t){var n,i=t.theme;return{root:{},insideDonutString:{fontSize:It.s.xLargePlus,fontWeight:It.BO.semibold,fill:i.semanticColors.bodyText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}}},Dd=(0,a.Z)(),Nd=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n,e,r){var o,a,l,s,c=t&&t.data&&t.data.color,f=c;return i.props.enableGradient&&(c=null!==(a=null===(o=i.props.data[n].gradient)||void 0===o?void 0:o[0])&&void 0!==a?a:oc(n,0,i.props.theme.isInverted)[0],f=null!==(s=null===(l=i.props.data[n].gradient)||void 0===l?void 0:l[1])&&void 0!==s?s:oc(n,0,i.props.theme.isInverted)[1]),u.createElement(Md,{key:n,data:t,focusData:e,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:c,nextColor:f,enableGradient:i.props.enableGradient,roundCorners:i.props.roundCorners,onFocusCallback:i._focusCallback,hoverOnCallback:i._hoverCallback,onBlurCallback:i.props.onBlurCallback,hoverLeaveCallback:i.props.hoverLeaveCallback,uniqText:i.props.uniqText,activeArc:i.props.activeArc,href:r,calloutId:i.props.calloutId,valueInsideDonut:i.props.valueInsideDonut,theme:i.props.theme,focusedArcId:i.props.focusedArcId,showLabelsInPercent:i.props.showLabelsInPercent,totalValue:i._totalValue,hideLabels:i.props.hideLabels})},i._focusCallback=function(t,n,e){i.props.onFocusCallback(t,n,e)},i._computeTotalValue=function(){var t=0;return i.props.data.forEach((function(n){t+=n.data})),t},i._hoverCallback=i._hoverCallback.bind(i),i._pieForFocusRing=ad().sort(null).value((function(t){return t.data})).padAngle(0),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=this._pieForFocusRing(e),o=i(e),a="translate(".concat(this.props.width/2,", ").concat(this.props.height/2,")"),l=Dd(Vd,{theme:this.props.theme});return this._totalValue=this._computeTotalValue(),u.createElement("g",{transform:a},o.map((function(n,i){return t.arcGenerator(n,i,r[i],t.props.href)})),this.props.valueInsideDonut&&u.createElement("text",{y:5,textAnchor:"middle",dominantBaseline:"middle",className:l.insideDonutString},this.props.valueInsideDonut))},n.prototype.componentDidUpdate=function(){var t,n,i;t=Dd(Vd,{theme:this.props.theme}).insideDonutString,n=2*this.props.innerRadius-5,i=0,il(".".concat(t)).each((function(){for(var t=nl(this),e=t.text().split(/\s+/).reverse(),r="",o=[],u=0,a=t.attr("y"),l=t.text(null).append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em");r=e.pop();)o.push(r),l.text(o.join(" ")+" "),l.node().getComputedTextLength()>n&&o.length>1&&(o.pop(),l.text(o.join(" ")+" "),o=[r],l=t.append("tspan").attr("id","WordBreakId-".concat(i,"-").concat(u)).attr("x",0).attr("y",a).attr("dy",1.1*u+++"em").text(r));i+=1}))},n.prototype._hoverCallback=function(t,n){this.props.hoverOnCallback(t,n)},n.defaultProps={pie:ad().sort(null).value((function(t){return t.data})).padAngle(.02)},n}(u.Component),Od=(0,a.Z)(),Td=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Pf(e._rootElem,null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)},e._closeCallout=function(){e.setState({showHover:!1})},e._focusCallback=function(t,n,i){e._currentHoverElement=i,e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,focusedArcId:n,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})},e._hoverCallback=function(t,n){var i,r,o,u;if(e._calloutAnchorPoint!==t){e._calloutAnchorPoint=t,e._currentHoverElement=n;var a=t.color;if(e.props.enableGradient){var l=Math.max((null===(r=null===(i=e.props.data)||void 0===i?void 0:i.chartData)||void 0===r?void 0:r.findIndex((function(n){return n.legend===t.legend})))||0,0);a=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(l,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0]}e.setState({showHover:e._noLegendsHighlighted()||e._isLegendHighlighted(t.legend),value:t.data.toString(),legend:t.legend,color:a,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:t.callOutAccessibilityData})}},e._onBlur=function(){e.setState({focusedArcId:""})},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({showHover:!1})},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendsHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?Jl(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},lc(e),e.state={showHover:!1,value:"",legend:"",_width:e.props.width||200,_height:e.props.height||200,activeLegend:void 0,color:"",xCalloutValue:"",yCalloutValue:"",focusedArcId:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[]},e._hoverCallback=e._hoverCallback.bind(e),e._focusCallback=e._focusCallback.bind(e),e._hoverLeave=e._hoverLeave.bind(e),e._calloutId=p("callout"),e._uniqText=p("_Pie_"),e._emptyChartId=p("_DonutChart_empty"),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){var i,e;return t.width&&t.width!==n._width&&(i={_width:t.width}),t.height&&t.height!==n._height&&(e={_height:t.height-40}),(0,o.Cl)((0,o.Cl)({},i),e)},n.prototype.componentDidMount=function(){this._rootElem&&this.setState({_width:this._rootElem.offsetWidth,_height:this._rootElem.offsetHeight-40})},n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this.props,i=n.data,e=n.hideLegend,r=void 0!==e&&e,a=this._addDefaultColors(null==i?void 0:i.chartData);this._classNames=Od(this.props.styles,{theme:this.props.theme,color:this.state.color,className:this.props.className});var l=this._createLegends(a),s=this.props.hideLabels?0:80,c=this.props.hideLabels?0:40,f=Math.min(this.state._width-s,this.state._height-c)/2,d=this._elevateToMinimums(a.filter((function(t){return t.data>=0}))),v=this.props.innerRadius>1?this._valueInsideDonut(this.props.valueInsideDonut,d):"";return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n},onMouseLeave:this._handleChartMouseLeave},this.props.xAxisAnnotation&&u.createElement("text",{className:this._classNames.axisAnnotation,x:this.state._width/2,y:this.state._height-10,textAnchor:"middle"},this.props.xAxisAnnotation),u.createElement(Dc,{direction:Ys.horizontal,handleTabKey:1,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,"aria-label":null==i?void 0:i.chartTitle,ref:function(n){return t._setViewBox(n)},width:this.state._width,height:this.state._height},u.createElement(Nd,{width:this.state._width,height:this.state._height,outerRadius:f,innerRadius:this.props.innerRadius,data:d,enableGradient:this.props.enableGradient,roundCorners:this.props.roundCorners,onFocusCallback:this._focusCallback,hoverOnCallback:this._hoverCallback,hoverLeaveCallback:this._hoverLeave,uniqText:this._uniqText,onBlurCallback:this._onBlur,activeArc:this._getHighlightedLegend(),focusedArcId:this.state.focusedArcId||"",href:this.props.href,calloutId:this._calloutId,valueInsideDonut:this._toLocaleString(v),theme:this.props.theme,showLabelsInPercent:this.props.showLabelsInPercent,hideLabels:this.props.hideLabels}))),u.createElement(Pn,(0,o.Cl)({target:this._currentHoverElement,alignTargetEdge:!0,isBeakVisible:!1,directionalHint:3,gapSpace:15,hidden:!(!this.props.hideTooltip&&this.state.showHover),id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.legend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.value,color:this.state.color,culture:this.props.culture})),!r&&u.createElement("div",{className:this._classNames.legendContainer},l))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._elevateToMinimums=function(t){var n=0,i=[];return t.forEach((function(t){n+=t.data})),t.forEach((function(t){i.push(.01*n>t.data&&t.data>0?(0,o.Cl)((0,o.Cl)({},t),{data:.01*n,yAxisCalloutData:void 0===t.yAxisCalloutData?t.data.toLocaleString():t.yAxisCalloutData}):t)})),i},n.prototype._setViewBox=function(t){var n,i;if(null!==t){var e=t.parentElement?t.parentElement.clientWidth:this.state._width,r=t.parentElement&&(null===(n=t.parentElement)||void 0===n?void 0:n.offsetHeight)>this.state._height?null===(i=t.parentElement)||void 0===i?void 0:i.offsetHeight:this.state._height,o="0 0 ".concat(e," ").concat(r);t.setAttribute("viewBox",o)}},n.prototype._createLegends=function(t){var n=this,i=t.map((function(t,i){var e,r,o=n.props.enableGradient?(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(i,0,null===(r=n.props.theme)||void 0===r?void 0:r.isInverted)[0]:t.color;return{title:t.legend,color:o,hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:t.legend})},onMouseOutAction:function(){n.setState({activeLegend:void 0})}}}));return u.createElement(jf,(0,o.Cl)({legends:i,centerLegends:!0,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;this.props.legendProps&&(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._hoverLeave=function(){},n.prototype._valueInsideDonut=function(t,n){var i=this,e=this._getHighlightedLegend();if(void 0===t||1!==e.length&&!this.state.showHover){if(e.length>0){var r=0;return n.forEach((function(t){e.includes(t.legend)&&(r+=t.data)})),r}return t}var o=n.find((function(t){return i._isLegendHighlighted(t.legend)}));return o?o.yAxisCalloutData?o.yAxisCalloutData:o.data:t},n.prototype._toLocaleString=function(t){var n=(0,_n.c$)(t,this.props.culture,this.props.useUTC);return n?null==n?void 0:n.toString():t},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.filter((function(t){return t.data>0})).length>0)},n.defaultProps={innerRadius:0,hideLabels:!0},n}(u.Component);!function(t){t.shade30="#004578",t.shade20="#005a9e",t.shade10="#106ebe",t.primary="#0078d4",t.tint10="#2b88d8",t.tint20="#c7e0f4",t.tint30="#deecf9",t.tint40="#eff6fc"}(Ad||(Ad={})),function(t){t.black="#000000",t.gray220="#11100f",t.gray210="#161514",t.gray200="#1b1a19",t.gray190="#201f1e",t.gray180="#252423",t.gray170="#292827",t.gray160="#323130",t.gray150="#3b3a39",t.gray140="#484644",t.gray130="#605e5c",t.gray120="#797775",t.gray110="#8a8886",t.gray100="#979593",t.gray90="#a19f9d",t.gray80="#b3b0ad",t.gray70="#bebbb8",t.gray60="#c8c6c4",t.gray50="#d2d0ce",t.gray40="#e1dfdd",t.gray30="#edebe9",t.gray20="#f3f2f1",t.gray10="#faf9f8",t.white="#ffffff"}(Sd||(Sd={})),function(t){t.pinkRed10="#750b1c",t.red20="#a4262c",t.red10="#d13438",t.redOrange20="#603d30",t.redOrange10="#da3b01",t.orange30="#8e562e",t.orange20="#ca5010",t.orange10="#ffaa44",t.yellow10="#fce100",t.orangeYellow20="#986f0b",t.orangeYellow10="#c19c00",t.yellowGreen10="#8cbd18",t.green20="#0b6a0b",t.green10="#498205",t.greenCyan10="#00ad56",t.cyan40="#005e50",t.cyan30="#005b70",t.cyan20="#038387",t.cyan10="#00b7c3",t.cyanBlue20="#004e8c",t.cyanBlue10="#0078d4",t.blue10="#4f6bed",t.blueMagenta40="#373277",t.blueMagenta30="#5c2e91",t.blueMagenta20="#8764b8",t.blueMagenta10="#8378de",t.magenta20="#881798",t.magenta10="#c239b3",t.magentaPink20="#9b0062",t.magentaPink10="#e3008c",t.gray40="#393939",t.gray30="#7a7574",t.gray20="#69797e",t.gray10="#a0aeb2"}(Ld||(Ld={}));var Ed=function(t){return(0,o.Cl)((0,o.Cl)({},t.fonts.medium),{display:"flex",flexDirection:"column",padding:"8px",position:"absolute",textAlign:"center",top:"0px",background:t.semanticColors.bodyBackground,borderRadius:"2px",pointerEvents:"none",color:t.semanticColors.bodyText})},Fd=function(t,n){var i;return[n,(i={textAlign:"center",fontWeight:It.BO.semibold,fontStyle:"normal",lineHeight:It.s.medium,color:Sd.gray160,fill:t.semanticColors.bodyText},i[It.up]={fill:"CanvasText"},i)]},Bd=function(t){var n;return{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:t.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},Pd=function(t){var n;return{fontSize:It.s.medium,fill:t.semanticColors.bodyText,textAnchor:"middle",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}},_d=(0,r.I)(Td,(function(t){var n=t.className,i=t.theme;return{root:[i.fonts.medium,"ms-DonutChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},n],chart:{boxSizing:"content-box",overflow:"visible",alignmentAdjust:"center",display:"block"},legendContainer:{paddingTop:"16px",width:"100%"},axisAnnotation:Fd(i,i.fonts.small)}}));function Hd(t,n){if(t=function(t){let n;for(;n=t.sourceEvent;)t=n;return t}(t),void 0===n&&(n=t.currentTarget),n){var i=n.ownerSVGElement||n;if(i.createSVGPoint){var e=i.createSVGPoint();return e.x=t.clientX,e.y=t.clientY,[(e=e.matrixTransform(n.getScreenCTM().inverse())).x,e.y]}if(n.getBoundingClientRect){var r=n.getBoundingClientRect();return[t.clientX-r.left-n.clientLeft,t.clientY-r.top-n.clientTop]}}return[t.pageX,t.pageY]}function Id(t){return t[0]}function Wd(t){return t[1]}function Rd(t,n){var i=Xf(!0),e=null,r=rl,o=null,u=hd(a);function a(a){var l,s,c,f=(a=Yf(a)).length,d=!1;for(null==e&&(o=r(c=u())),l=0;l<=f;++l)!(l<f&&i(s=a[l],l,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(s,l,a),+n(s,l,a));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?Id:Xf(t),n="function"==typeof n?n:void 0===n?Wd:Xf(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:Xf(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:Xf(+t),a):n},a.defined=function(t){return arguments.length?(i="function"==typeof t?t:Xf(!!t),a):i},a.curve=function(t){return arguments.length?(r=t,null!=e&&(o=r(e)),a):r},a.context=function(t){return arguments.length?(null==t?e=o=null:o=r(e=t),a):e},a}var $d=function(t){function n(i){var e=t.call(this,i)||this;return e._tooltipHost=u.createRef(),e._tooltipHostId=p("tooltip-host"),e.show=function(){e._toggleTooltip(!0)},e.dismiss=function(){e._hideTooltip()},e._measureText=function(){if(e._tooltipHost.current&&"function"==typeof e._tooltipHost.current.getBBox){var t=e._tooltipHost.current.getBBox();e.setState({textX:t.x,textY:t.y,textWidth:t.width,textHeight:t.height})}},e._getTargetElement=function(){if(e._tooltipHost.current)return e._tooltipHost.current},e._onTooltipFocus=function(t){e._ignoreNextFocusEvent?e._ignoreNextFocusEvent=!1:e._onTooltipMouseEnter(t)},e._onTooltipBlur=function(t){e._ignoreNextFocusEvent=(null===document||void 0===document?void 0:document.activeElement)===t.target,e._dismissTimerId=e._async.setTimeout((function(){e._hideTooltip()}),0)},e._onTooltipMouseEnter=function(t){var i=e.props.delay;if(n._currentVisibleTooltip&&n._currentVisibleTooltip!==e&&n._currentVisibleTooltip.dismiss(),n._currentVisibleTooltip=e,e.state.isOverflowing&&(!t.target||!vc(t.target,e._getTargetElement())))if(e._clearDismissTimer(),e._clearOpenTimer(),i!==Oc.zero){var r=e._getDelayTime(i);e._openTimerId=e._async.setTimeout((function(){e._toggleTooltip(!0)}),r)}else e._toggleTooltip(!0)},e._onTooltipMouseLeave=function(t){var i=e.props.closeDelay;e._clearDismissTimer(),e._clearOpenTimer(),i?e._dismissTimerId=e._async.setTimeout((function(){e._toggleTooltip(!1)}),i):e._toggleTooltip(!1),n._currentVisibleTooltip===e&&(n._currentVisibleTooltip=void 0)},e._onTooltipKeyDown=function(t){(t.which===Dt||t.ctrlKey)&&e.state.isTooltipVisible&&(e._hideTooltip(),t.stopPropagation())},e._clearDismissTimer=function(){e._async.clearTimeout(e._dismissTimerId)},e._clearOpenTimer=function(){e._async.clearTimeout(e._openTimerId)},e._hideTooltip=function(){e._clearOpenTimer(),e._clearDismissTimer(),e._toggleTooltip(!1)},e._toggleTooltip=function(t){e.state.isTooltipVisible!==t&&e.setState({isTooltipVisible:t})},e._getDelayTime=function(t){switch(t){case Oc.medium:return 300;case Oc.long:return 500;default:return 0}},e._wrapContent=function(){var t=e.props,n=t.content,i=t.wrapContent,r=t.maxWidth,o=void 0===r?Number.POSITIVE_INFINITY:r,u=t.maxHeight,a=!1;n&&i&&i(n,e._tooltipHostId,o,u)&&(a=!0),e.state.isOverflowing!==a&&e.setState({isOverflowing:a})},e.state={isTooltipVisible:!1,isOverflowing:!1},e._async=new Nt(e),e}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.content,i=t.tooltipProps,e=t.textProps,r=t.shouldReceiveFocus,a=void 0===r||r,l=t.showBackground,s=void 0!==l&&l,c=this.state,f=c.isTooltipVisible,d=c.textWidth,v=c.textHeight,h=(0,o.Cl)({content:n,targetElement:this._getTargetElement(),calloutProps:{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave},i),p=!!this.props.isTooltipVisibleProp&&this.state.isOverflowing&&!!n||f&&!!n,g=("number"==typeof(null==e?void 0:e.x)?e.x:0)-(null!=d?d:0)/2-3,y=("number"==typeof(null==e?void 0:e.y)?e.y:0)-(null!=v?v:0)/2-6;return u.createElement(u.Fragment,null,s&&u.createElement("rect",{x:g,y:y,width:(null!=d?d:0)+6,height:(null!=v?v:0)+3,transform:null==e?void 0:e.transform,className:this.props.className}),u.createElement("text",(0,o.Cl)({},e,{id:this._tooltipHostId,ref:this._tooltipHost,onFocusCapture:this._onTooltipFocus,onBlurCapture:this._onTooltipBlur,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"data-is-focusable":a&&this.state.isOverflowing}),n),p&&u.createElement(Fc,(0,o.Cl)({},h)))},n.prototype.componentDidMount=function(){this._wrapContent(),this._measureText()},n.prototype.componentDidUpdate=function(t){this.props.maxWidth===t.maxWidth&&this.props.maxHeight===t.maxHeight||(this._wrapContent(),this._measureText())},n.prototype.componentWillUnmount=function(){n._currentVisibleTooltip&&n._currentVisibleTooltip===this&&(n._currentVisibleTooltip=void 0),this._async.dispose()},n.defaultProps={delay:Oc.medium},n}(u.Component),zd=(0,a.Z)(),jd=u.lazy((function(){return Promise.resolve().then(i.bind(i,357)).then((function(t){return{default:t.ChartHoverCard}}))})),Yd=[zl.HorizontalBarChartWithAxis,zl.HeatMapChart,zl.VerticalStackedBarChart,zl.GanttChart,zl.ScatterChart],Xd=function(t){function n(n){var i,e,r,a,s,c,f,d,v,h,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H=t.call(this,n)||this;H.minLegendContainerHeight=32,H._isRtl=(0,l.jI)(),H._isFirstRender=!0,H._removalValueForTextTuncate=0,H.isIntegralDataset=!0,H.calculateMaxYAxisLabelLength=function(t){return hs(H.props.stringDatasetForYAxisDomain.map((function(t){return n=t,H.props.showYAxisLablesTooltip?function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.slice(0,n)+i}(n,H.props.noOfCharsToTruncate||4):n;var n})),".".concat(t," text"))},H._multiValueCallout=function(t){var n=H._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:H._classNames.calloutContentRoot},u.createElement("div",{className:H._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:H._classNames.calloutContentX},Ds(t.xAxisCalloutAccessibilityData,"text",!1)),(0,_n.c$)(t.hoverXValue,H.props.culture,H.props.useUTC))),u.createElement("div",{className:H._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,e){var r=i+1===e.length,a=t.shouldDrawBorderBottom,l=void 0!==a&&a;return u.createElement("div",(0,o.Cl)({},Ds(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},l&&{borderBottom:"1px solid ".concat(H.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),H._getCalloutContent(t,i,n,r))})),!!t.descriptionMessage&&u.createElement("div",{className:H._classNames.descriptionMessage},t.descriptionMessage)))},H._getData=function(t,n,i){H.props.getGraphData&&H.props.getGraphData(t,n,H.state.containerHeight-H._removalValueForTextTuncate,H.state.containerWidth,H.xAxisElement,H.yAxisElement,i)},H._onChartLeave=function(){H.props.onChartMouseLeave&&H.props.onChartMouseLeave()},H._calculateChartMinWidth=function(){var t=H._calcMaxLabelWidthWithTransform(H._tickValues)+10,n=H.margins.left+H.margins.right+t*(H._tickValues.length-1);return[zl.GroupedVerticalBarChart,zl.VerticalBarChart,zl.VerticalStackedBarChart].includes(H.props.chartType)&&(n+=16),n},H._getChartDescription=function(){return(H.props.chartTitle||"Chart. ")+H._getAxisTitle("X",H.props.xAxisTitle,H.props.xAxisType)+H._getAxisTitle("Y",H.props.yAxisTitle,H.props.yAxisType||Yl.NumericAxis)+(H.props.secondaryYScaleOptions?H._getAxisTitle("secondary Y",H.props.secondaryYAxistitle,Yl.NumericAxis):"")},H._getAxisTitle=function(t,n,i){return"The ".concat(t," axis displays ")+(n||(i===jl.StringAxis||i===Yl.StringAxis?"categories":i===jl.DateAxis||i===Yl.DateAxis?"time":"values"))+". "},H._calcMaxLabelWidthWithTransform=function(t){if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===jl.StringAxis){var n=hs(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(n*Math.cos(Math.PI/4))}if(H.props.showXAxisLablesTooltip){var i=t.map((function(t){var n=H.props.noOfCharsToTruncate||4;return t.toString().length>n?"".concat(t.toString().slice(0,n),"..."):t})),e=hs(i,".".concat(H._classNames.xAxis," text"));return Math.ceil(e)}if(H.props.wrapXAxisLables){var r=[];t.forEach((function(t){r.push.apply(r,t.toString().split(/\s+/))}));var o=hs(r,".".concat(H._classNames.xAxis," text"));return Math.max(Math.ceil(o),10)}var u=hs(t,".".concat(H._classNames.xAxis," text"));return Math.ceil(u)},H._transformXAxisLabels=function(){var t,n,i;if(H._removalValueForTextTuncate=0,H.props.wrapXAxisLables||H.props.showXAxisLablesTooltip){var e=void 0;H.props.xAxisType===jl.StringAxis&&(e=((null===(t=H.props.datasetForXAxisDomain)||void 0===t?void 0:t.length)||0)>1?H._xScale.step():H.state.containerWidth);var r={node:H.xAxisElement,xAxis:H._xScale,showXAxisLablesTooltip:H.props.showXAxisLablesTooltip||!1,noOfCharsToTruncate:H.props.noOfCharsToTruncate||4,width:e};H._removalValueForTextTuncate=null!==(n=function(t){var n=t.node,i=t.xAxis,e=t.noOfCharsToTruncate,r=t.showXAxisLablesTooltip,o=t.width,u=void 0===o?10:o;if(null!==n){var a=nl(n).call(i),l=0,s=1;if(a.selectAll(".tick text").each((function(){var t=nl(this),n=t.text(),i="".concat(t.text().slice(0,e),"..."),o=t.text().length,a=t.text().split(/\s+/).reverse(),l="",c=[],f=0,d=t.attr("y"),v=parseFloat(t.attr("dy")),h=t.text(null).append("tspan").attr("x",0).attr("y",d).attr("id","BaseSpan").attr("dy",v+"em").attr("data-",n);if(r&&o>e)h=t.append("tspan").attr("id","showDots").attr("x",0).attr("y",d).attr("dy",v+"em").text(i);else if(r&&o<=e)h=t.append("tspan").attr("id","LessLength").attr("x",0).attr("y",d).attr("dy",v+"em").text(n);else for(;l=a.pop();)c.push(l),h.text(c.join(" ")),h.node().getComputedTextLength()>u&&c.length>1&&(c.pop(),h.text(c.join(" ")),c=[l],h=t.append("tspan").attr("id","WordBreakId").attr("x",0).attr("y",d).attr("dy",1.1*++f+v+"em").text(l));s=Math.max(s,f+1)})),!r){var c=12,f=document.getElementById("WordBreakId"),d=f&&f.getBoundingClientRect(),v=d&&d.height;v>c&&(c=v),l=(s-1)*c}return l>0?l:0}}(r))&&void 0!==n?n:0}if(!H.props.wrapXAxisLables&&H.props.rotateXAxisLables&&H.props.xAxisType===jl.StringAxis){var o=null!==(i=function(t){var n=t.node,i=t.xAxis;if(null!==n&&null!==i){var e=0,r=[];nl(n).call(i).selectAll(".tick").each((function(){var t=this.getAttribute("transform");if(-1===(null==t?void 0:t.indexOf("rotate"))){var n=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");2===n.length&&(r.push(n[0]),this.setAttribute("transform","translate(".concat(n[0],",0)rotate(-45)")))}var i=this.getBoundingClientRect(),o=i&&i.height;o>e&&(e=o)}));var o=0;return nl(n).call(i).selectAll(".tick").each((function(){r.length>o&&(this.setAttribute("transform","translate(".concat(r[o],",").concat(e/2,")rotate(-45)")),o+=1)})),Math.floor(e/1.414)}}({node:H.xAxisElement,xAxis:H._xScale}))&&void 0!==i?i:0;H._removalValueForTextTuncate=o+H.margins.bottom}},H.state={containerHeight:0,containerWidth:0,_width:H.props.width||600,_height:H.props.height||350,startFromX:0},H.idForGraph=p("chart_"),H.titleMargin=8,H.idForDefaultTabbableElement=p("defaultTabbableElement_"),H._tooltipId=p("tooltip_"),H.margins={top:null!==(e=null===(i=H.props.margins)||void 0===i?void 0:i.top)&&void 0!==e?e:20,bottom:null!==(a=null===(r=H.props.margins)||void 0===r?void 0:r.bottom)&&void 0!==a?a:35,right:H._isRtl?null!==(c=null===(s=H.props.margins)||void 0===s?void 0:s.left)&&void 0!==c?c:40:(null!==(d=null===(f=H.props.margins)||void 0===f?void 0:f.right)&&void 0!==d?d:null===(v=H.props)||void 0===v?void 0:v.secondaryYScaleOptions)?40:20,left:H._isRtl?(null!==(g=null===(h=H.props.margins)||void 0===h?void 0:h.right)&&void 0!==g?g:null===(y=H.props)||void 0===y?void 0:y.secondaryYScaleOptions)?40:20:null!==(b=null===(m=H.props.margins)||void 0===m?void 0:m.left)&&void 0!==b?b:40};var I=24;return void 0!==H.props.xAxisTitle&&""!==H.props.xAxisTitle&&(H.margins.bottom=null!==(w=null===(x=H.props.margins)||void 0===x?void 0:x.bottom)&&void 0!==w?w:H.margins.bottom+20),void 0!==H.props.yAxisTitle&&""!==H.props.yAxisTitle&&(H.margins.left=H._isRtl?(null!==(M=null===(C=H.props.margins)||void 0===C?void 0:C.right)&&void 0!==M?M:null===(k=H.props)||void 0===k?void 0:k.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I:null!==(S=null===(A=H.props.margins)||void 0===A?void 0:A.left)&&void 0!==S?S:H.margins.left+I,H.margins.right=H._isRtl?null!==(V=null===(L=H.props.margins)||void 0===L?void 0:L.left)&&void 0!==V?V:H.margins.left+I:(null!==(N=null===(D=H.props.margins)||void 0===D?void 0:D.right)&&void 0!==N?N:null===(O=H.props)||void 0===O?void 0:O.secondaryYAxistitle)?H.margins.right+48:H.margins.right+I),void 0!==H.props.xAxisAnnotation&&""!==H.props.xAxisAnnotation&&(H.margins.top=null!==(E=null===(T=H.props.margins)||void 0===T?void 0:T.top)&&void 0!==E?E:H.margins.top+20),void 0===H.props.yAxisAnnotation||""===H.props.yAxisAnnotation||void 0!==H.props.secondaryYAxistitle&&""!==H.props.secondaryYAxistitle||(H._isRtl?H.margins.left=null!==(B=null===(F=H.props.margins)||void 0===F?void 0:F.right)&&void 0!==B?B:H.margins.right+I:H.margins.right=null!==(_=null===(P=H.props.margins)||void 0===P?void 0:P.right)&&void 0!==_?_:H.margins.right+I),H}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){if(this._fitParentContainer(),Yd.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===Yl.StringAxis){var t=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==t&&this.setState({startFromX:t})}else 0!==this.state.startFromX&&this.setState({startFromX:0});this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0}))},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.componentDidUpdate=function(t){if(t.height===this.props.height&&t.width===this.props.width||this._fitParentContainer(),Yd.includes(this.props.chartType)&&this.props.showYAxisLables&&this.yAxisElement&&this.props.yAxisType===Yl.StringAxis){var n=this.calculateMaxYAxisLabelLength(this._classNames.yAxis);this.state.startFromX!==n&&this.setState({startFromX:n})}else 0!==this.state.startFromX&&this.setState({startFromX:0});t.points!==this.props.points&&(this.isIntegralDataset=!this.props.points.some((function(t){return t.y%1!=0})))},n.prototype.render=function(){var t,n,i,e,r,a,l,s,c,f=this,d=this.props,v=d.calloutProps,h=d.points,p=d.chartType,g=d.chartHoverProps,y=d.svgFocusZoneProps,m=d.svgProps,b=d.culture,x=d.dateLocalizeOptions,w=d.timeFormatLocale,C=d.customDateTimeFormatter;this.props.parentRef&&this._fitParentContainer();var M=(0,o.Cl)({},this.margins);Yd.includes(this.props.chartType)&&(this._isRtl?M.right+=this.state.startFromX:M.left+=this.state.startFromX),this.props.getmargins&&this.props.getmargins(M),this._classNames=zd(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,enableReflow:this.props.enableReflow});var k,A,S,L,V,D=null,N=null;if(this.props.enableFirstRenderOptimization&&this.chartContainer||!this.props.enableFirstRenderOptimization){this._isFirstRender=!1;var O={domainNRangeValues:this.props.getDomainNRangeValues(h,this.props.getDomainMargins?this.props.getDomainMargins(this.state.containerWidth):this.margins,this.state.containerWidth,p,this._isRtl,this.props.xAxisType,this.props.barwidth,this.props.tickValues,this.state.startFromX),containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,margins:this.margins,xAxisElement:this.xAxisElement,showRoundOffXTickValues:null===(r=this.props.showRoundOffXTickValues)||void 0===r||r,xAxisCount:this.props.xAxisTickCount,xAxistickSize:this.props.xAxistickSize,tickPadding:this.props.tickPadding||this.props.showXAxisLablesTooltip?5:10,xAxisPadding:this.props.xAxisPadding,xAxisInnerPadding:this.props.xAxisInnerPadding,xAxisOuterPadding:this.props.xAxisOuterPadding,containerWidth:this.state.containerWidth,hideTickOverlap:this.props.hideTickOverlap,calcMaxLabelWidth:this._calcMaxLabelWidthWithTransform},T=void 0,E=void 0;switch(this.props.xAxisType){case jl.NumericAxis:T=(t=us(O,this.props.tickParams,this.props.chartType,b,this.props.xScaleType)).xScale,E=t.tickValues;break;case jl.DateAxis:T=(n=function(t,n,i,e,r,o,u,a){var l,s=t.domainNRangeValues,c=t.xAxisElement,f=t.tickPadding,d=void 0===f?6:f,v=t.xAxistickSize,h=void 0===v?6:v,p=t.xAxisCount,g=t.calcMaxLabelWidth,y=u?yu():gu();y.domain([s.dStartValue,s.dEndValue]).range([s.rStartValue,s.rEndValue]).nice();var m=null!=p?p:6,b=100,x=-1,w=r?Pe(r):void 0;y.ticks().forEach((function(t){var n=as(t,u);n>x&&(x=n),n<b&&(b=n)}));var C=null!=e?e:(0,_n.c2)(b,x),M=function(t,n,i,e){var r="%c",o="%a %d, %X",u="%b %d, %X",a="%-I:%M %p",l="%b %d, %-I:%M %p",s="%b %d, %-I %p",c="%b %d";return(i?e?i.utcFormat:i.format:e?Ie:He)([[".%L",":%S.%L","%M:%S.%L","%-I:%M:%S.%L %p",o,u,u,r],[r,":%S","%-I:%M:%S","%X",o,u,u,r],[r,r,a,a,"%a %d, %-I:%M %p",l,l,"%x, %-I:%M %p"],[r,r,r,"%-I %p","%a %d, %-I %p",s,s,"%x, %-I %p"],[r,r,r,r,"%a %d",c,c,"%x"],[r,r,r,r,r,c,c,"%x"],[r,r,r,r,r,r,"%B","%b %Y"],[r,r,r,r,r,r,r,"%Y"]][t][n])}(b,x,w,u),k=function(t,e){return o?o(t):r?M(t):void 0===i&&n.tickFormat?u?Ie(n.tickFormat)(t):He(n.tickFormat)(t):(0,_n.Yn)(t,i,u,!1,C)},A=g(y.ticks().map(k))+40,S=y.range(),L=S[0],V=S[1],D=Math.min(Math.max(1,Math.floor(Math.abs(V-L)/A)),10);m=Math.min(D,null!=p?p:m);var N=Gn(y).tickSize(h).tickPadding(d).ticks(m).tickFormat(k);[zl.GanttChart].includes(a)&&N.tickSizeInner(-(t.containerHeight-t.margins.top)),n.tickValues&&N.tickValues(n.tickValues),c&&nl(c).call(N).selectAll("text").attr("aria-hidden","true");var O=(null!==(l=n.tickValues)&&void 0!==l?l:y.ticks(m)).map(N.tickFormat());return{xScale:y,tickValues:O}}(O,this.props.tickParams,b,x,w,C,this.props.useUTC,this.props.chartType)).xScale,E=n.tickValues;break;case jl.StringAxis:i=function(t,n,i){var e,r=t.domainNRangeValues,o=t.xAxistickSize,u=void 0===o?6:o,a=t.tickPadding,l=void 0===a?10:a,s=t.xAxisPadding,c=void 0===s?.1:s,f=t.xAxisInnerPadding,d=t.xAxisOuterPadding,v=t.containerWidth,h=t.hideTickOverlap,p=t.calcMaxLabelWidth,g=ku().domain(i).range([r.rStartValue,r.rEndValue]).paddingInner(void 0!==f?f:c).paddingOuter(void 0!==d?d:c),y=null!==(e=n.tickValues)&&void 0!==e?e:i;if(h){var m=[],b=y.map((function(t){return p([t])})),x=0,w=v,C=1,M=g.range();M[1]-M[0]<0&&(x=v,w=0,C=-1);for(var k=y.length-1;k>=0;k--){var A=g(y[k]);C*(A-C*b[k]/2-x)>=0&&C*(A+C*b[k]/2-w)<=0&&(m.push(y[k]),w=A-C*(b[k]/2+10))}y=m=m.reverse()}var S=Gn(g).tickSize(u).tickPadding(l).tickValues(y);return t.xAxisElement&&nl(t.xAxisElement).call(S).selectAll("text").attr("aria-hidden","true"),{xScale:g,tickValues:y}}(O,this.props.tickParams,this.props.datasetForXAxisDomain),T=i.xScale,E=i.tickValues;break;default:T=(e=us(O,this.props.tickParams,this.props.chartType,b,this.props.xScaleType)).xScale,E=e.tickValues}this._xScale=T,this._tickValues=E,this._transformXAxisLabels();var F={margins:this.props.getYDomainMargins?this.props.getYDomainMargins(this.state.containerHeight):this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElement,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:this.props.yMinValue||0,yMaxValue:this.props.yMaxValue||0,tickPadding:10,maxOfYVal:this.props.maxOfYVal,yMinMaxValues:this.props.getMinMaxOfYAxis(h,this.props.yAxisType),yAxisPadding:this.props.yAxisPadding||0},B=void 0,P=void 0,_={yAxisDomainValues:[]};if(this.props.yAxisType&&this.props.yAxisType===Yl.StringAxis)B=this.props.createStringYAxis(F,this.props.stringDatasetForYAxisDomain,this._isRtl,this.props.barwidth,this.props.chartType);else{if(null===(a=this.props)||void 0===a?void 0:a.secondaryYScaleOptions){var H={margins:this.margins,containerWidth:this.state.containerWidth,containerHeight:this.state.containerHeight-this._removalValueForTextTuncate,yAxisElement:this.yAxisElementSecondary,yAxisTickFormat:this.props.yAxisTickFormat,yAxisTickCount:this.props.yAxisTickCount,yMinValue:(null===(l=this.props.secondaryYScaleOptions)||void 0===l?void 0:l.yMinValue)||0,yMaxValue:null!==(c=null===(s=this.props.secondaryYScaleOptions)||void 0===s?void 0:s.yMaxValue)&&void 0!==c?c:100,tickPadding:10,yMinMaxValues:this.props.getMinMaxOfYAxis(h,this.props.yAxisType,!0),yAxisPadding:this.props.yAxisPadding};P=this.props.createYAxis(H,this._isRtl,_,this.isIntegralDataset,!0,this.props.supportNegativeData,this.props.roundedTicks,this.props.secondaryYScaleType)}B=this.props.createYAxis(F,this._isRtl,_,this.isIntegralDataset,!1,this.props.supportNegativeData,this.props.roundedTicks,this.props.yScaleType)}if(Yd.includes(this.props.chartType)&&this.props.yAxisType===Yl.StringAxis){if(!this.props.showYAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(this.props.showYAxisLablesTooltip){B&&(k=this.yAxisElement,A=B,S=this.props.noOfCharsToTruncate||4,L=this.props.showYAxisLablesTooltip||!1,V=this._isRtl,null!==k&&nl(k).call(A).selectAll(".tick text").each((function(){var t=nl(this),n=t.text(),i=V?"...".concat(t.text().slice(0,S)):"".concat(t.text().slice(0,S),"..."),e=t.text().length,r=t.attr("y"),o=t.attr("x"),u=parseFloat(t.attr("dy"));t.text(null).append("tspan").attr("x",o).attr("y",r).attr("id","BaseSpan").attr("dy",u+"em").attr("data-",n),L&&e>S?t.append("tspan").attr("id","showDots").attr("x",o).attr("y",r).attr("dy",u+"em").attr("dx","0em").text(i):t.append("tspan").attr("id","LessLength").attr("x",o).attr("y",r).attr("dx","0em").text(n)})));var I=nl(this.yAxisElement).call(B);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var W={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:I};I&&ps(W)}}this.props.getAxisData&&this.props.getAxisData(_),this._getData(T,B,P),N=this.props.children((0,o.Cl)((0,o.Cl)({},this.state),{xScale:T,yScalePrimary:B,yScaleSecondary:P})),!this.props.hideTooltip&&v.isCalloutVisible&&(D=this._generateCallout(v,g))}var R,$={width:this.state.containerWidth,height:this.state.containerHeight};R=this.props.focusZoneDirection===Ys.vertical||this.props.focusZoneDirection?this.props.focusZoneDirection:Ys.horizontal;var z=$.width-this.margins.left-this.margins.right-this.state.startFromX,j=$.height-this.margins.bottom-this.margins.top-this._removalValueForTextTuncate-this.titleMargin,Y={wrapContent:vs,theme:this.props.theme,showBackground:!0,className:this._classNames.svgTooltip};return u.createElement("div",{id:this.idForGraph,className:this._classNames.root,ref:function(t){return f.chartContainer=t},onMouseLeave:this._onChartLeave},!this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement(Dc,(0,o.Cl)({direction:R,className:this._classNames.chartWrapper,defaultTabbableElement:"#".concat(this.idForDefaultTabbableElement)},y),this._isFirstRender&&u.createElement("div",{id:this.idForDefaultTabbableElement}),u.createElement("svg",(0,o.Cl)({width:$.width,height:$.height,role:"region","aria-label":this._getChartDescription(),style:{display:"block"},className:this._classNames.chart},Fs(m)),u.createElement("g",{ref:function(t){f.xAxisElement=t},id:"xAxisGElement".concat(this.idForGraph),transform:"translate(0, ".concat($.height-this.margins.bottom-this._removalValueForTextTuncate,")"),className:this._classNames.xAxis}),void 0!==this.props.xAxisTitle&&""!==this.props.xAxisTitle&&u.createElement($d,(0,o.Cl)({content:this.props.xAxisTitle,textProps:{x:this.margins.left+this.state.startFromX+z/2,y:$.height-this.titleMargin,className:this._classNames.axisTitle,textAnchor:"middle","aria-hidden":!0},maxWidth:z},Y)),void 0!==this.props.xAxisAnnotation&&""!==this.props.xAxisAnnotation&&u.createElement($d,(0,o.Cl)({content:this.props.xAxisAnnotation,textProps:{x:this.margins.left+this.state.startFromX+z/2,y:this.titleMargin+3,className:this._classNames.axisAnnotation,textAnchor:"middle","aria-hidden":!0},maxWidth:z},Y)),u.createElement("g",{ref:function(t){f.yAxisElement=t},id:"yAxisGElement".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?$.width-this.margins.right-this.state.startFromX:this.margins.left+this.state.startFromX,", 0)"),className:this._classNames.yAxis}),this.props.secondaryYScaleOptions&&u.createElement("g",null,u.createElement("g",{ref:function(t){f.yAxisElementSecondary=t},id:"yAxisGElementSecondary".concat(this.idForGraph),transform:"translate(".concat(this._isRtl?this.margins.left+this.state.startFromX:$.width-this.margins.right-this.state.startFromX,", 0)"),className:this._classNames.yAxis}),void 0!==this.props.secondaryYAxistitle&&""!==this.props.secondaryYAxistitle&&u.createElement($d,(0,o.Cl)({content:this.props.secondaryYAxistitle,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:$.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:j},Y))),N,void 0!==this.props.yAxisTitle&&""!==this.props.yAxisTitle&&u.createElement($d,(0,o.Cl)({content:this.props.yAxisTitle,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?$.width-this.margins.right/2+this.titleMargin:this.margins.left/2-this.titleMargin,textAnchor:"middle",transform:"translate(0,\n ".concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisTitle,"aria-hidden":!0},maxWidth:j},Y)),void 0!==this.props.yAxisAnnotation&&""!==this.props.yAxisAnnotation&&(void 0===this.props.secondaryYAxistitle||""===this.props.secondaryYAxistitle)&&u.createElement($d,(0,o.Cl)({content:this.props.yAxisAnnotation,textProps:{x:(j-this.margins.bottom)/2+this._removalValueForTextTuncate,y:this._isRtl?this.state.startFromX-this.titleMargin:$.width-this.margins.right,textAnchor:"middle",transform:"translate(".concat(this._isRtl?this.margins.right/2-this.titleMargin:this.margins.right/2+this.titleMargin,",\n ").concat($.height-this.margins.bottom-this.margins.top-this.titleMargin,")rotate(-90)"),className:this._classNames.axisAnnotation,"aria-hidden":!0},maxWidth:j},Y)))),!this.props.hideLegend&&u.createElement("div",{ref:function(t){return f.legendContainer=t},className:this._classNames.legendContainer},this.props.legendBars),D&&u.createElement(u.Suspense,{fallback:u.createElement("div",null,"Loading...")},D))},n.prototype._generateCallout=function(t,n){return u.createElement(Pn,(0,o.Cl)({hidden:!(!this.props.hideTooltip&&t.isCalloutVisible),shouldUpdateWhenHidden:!0},t),this.props.customizedCallout&&this.props.customizedCallout,!this.props.customizedCallout&&this.props.isCalloutForStack&&this._multiValueCallout(t),!this.props.customizedCallout&&!this.props.isCalloutForStack&&u.createElement(jd,(0,o.Cl)({XValue:t.XValue,Legend:t.legend,YValue:t.YValue,color:t.color,culture:this.props.culture},n)))},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r,o=e?{}:{marginRight:"16px"},a=void 0!==t.index&&-1!==t.index,l=zd(this.props.styles,{theme:this.props.theme,width:this.state._width,height:this.state._height,className:this.props.className,isRtl:this._isRtl,lineColor:t.color,toDrawShape:a}),s=this.props,c=s.culture,f=s.useUTC,d=(0,_n.c$)(t.y,c,f);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var v=t.yAxisCalloutData;return u.createElement("div",{style:o},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",d,")"),Object.keys(v).map((function(t){return u.createElement("div",{key:t,className:l.calloutBlockContainer},u.createElement("div",{className:l.calloutlegendText},(0,_n.c$)(t,c,f)),u.createElement("div",{className:l.calloutContentY},(0,_n.c$)(v[t],c,f)))})))}return u.createElement("div",{style:i?o:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",d,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:l.calloutBlockContainer},a&&u.createElement(Bf,{svgProps:{className:l.shapeStyles},pathProps:{fill:t.color},shape:As[t.index%Object.keys(Vs).length]}),u.createElement("div",null,u.createElement("div",{className:l.calloutlegendText}," ",t.legend),u.createElement("div",{className:l.calloutContentY},(0,_n.c$)(t.yAxisCalloutData?t.yAxisCalloutData:null!==(r=t.y)&&void 0!==r?r:t.data,c,f)))))},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n;if(t.props.hideLegend)n=0;else{var r=t.legendContainer&&getComputedStyle(t.legendContainer);n=(t.legendContainer&&t.legendContainer.getBoundingClientRect().height||t.minLegendContainerHeight)+parseFloat(r&&r.marginTop||"0")+parseFloat(r&&r.marginBottom||"0")}if(t.props.parentRef||t.chartContainer){var o=t.props.parentRef?t.props.parentRef:t.chartContainer,u=t.props.enableReflow&&!t._isFirstRender?Math.max(o.getBoundingClientRect().width,t._calculateChartMinWidth()):o.getBoundingClientRect().width,a=o.getBoundingClientRect().height>n?o.getBoundingClientRect().height:350;(i!==u||e!==a-n)&&t.setState({containerWidth:u,containerHeight:a-n})}}))},n}(u.Component),Gd=function(){var t,n=(0,s.z)();return!!(null===(t=null==n?void 0:n.navigator)||void 0===t?void 0:t.userAgent)&&n.navigator.userAgent.indexOf("rv:11.0")>-1}(),qd=(0,r.I)(Xd,(function(t){var n,i,e,r,u,a,l,s,c,f=t.className,d=t.theme,v=t.isRtl,h=t.shouldHighlight,p=t.href,g=t.lineColor,y=void 0===g?"transparent":g,m=t.toDrawShape,b=t.enableReflow,x=d.fonts;return{root:[d.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},f],chartWrapper:(0,o.Cl)({},b?{overflow:"auto"}:{}),axisTitle:Fd(d,d.fonts.xSmall),axisAnnotation:Fd(d,d.fonts.small),xAxis:{selectors:{text:[d.fonts.tiny,{fill:d.semanticColors.bodyText,fontWeight:"600",selectors:(n={},n[It.up]={fill:"CanvasText"},n)}],line:{opacity:.2,stroke:d.semanticColors.bodyText,width:"1px",selectors:(i={},i[It.up]={opacity:.1,stroke:"CanvasText"},i)},path:{display:"none"}}},yAxis:{selectors:{text:[d.fonts.tiny,{fill:d.semanticColors.bodyText,fontWeight:"600",selectors:(e={},e[It.up]={fill:"CanvasText"},e)}],path:{display:"none"},line:{opacity:.2,stroke:d.semanticColors.bodyText,selectors:(r={},r[It.up]={opacity:.1,stroke:"CanvasText"},r)},g:[v&&!Gd&&{textAnchor:"end"}]}},opacityChangeOnHover:{opacity:h?"":"0.1",cursor:p?"pointer":"default"},legendContainer:[{marginTop:"8px",marginLeft:"20px"}],calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:d.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",opacity:"0.85",color:d.semanticColors.bodySubtext})],calloutBlockContainer:[d.fonts.mediumPlus,{marginTop:"13px",color:d.semanticColors.bodyText},!m&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(y),paddingLeft:"8px"},m&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},x.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:d.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},x.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[d.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:d.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(d.semanticColors.menuDivider)}],tooltip:Ed(d),svgTooltip:(c={fill:d.semanticColors.bodyBackground},c[It.up]={fill:"Canvas"},c)}})),Ud=(0,an.J5)((function(t){return(0,an.J5)((function(n){var i=(0,an.J5)((function(t){return function(i){return n(i,t)}}));return function(e,r){return t(e,r?i(r):n)}}))}));function Zd(t,n){return Ud(t)(n)}var Kd=function(t){if(void 0===t)return 0;var n=0;return"scrollTop"in t?n=t.scrollTop:"scrollY"in t&&(n=t.scrollY),Math.ceil(n)},Jd=function(t,n){"scrollTop"in t?t.scrollTop=n:"scrollY"in t&&t.scrollTo(t.scrollX,n)},Qd="spacer-",tv=1/3,nv={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},iv=function(t){return t.getBoundingClientRect()},ev=iv,rv=iv,ov=function(t){function n(n){var i=t.call(this,n)||this;return i._root=u.createRef(),i._surface=u.createRef(),i._pageRefs={},i._getDerivedStateFromProps=function(t,n){return t.items!==i.props.items||t.renderCount!==i.props.renderCount||t.startIndex!==i.props.startIndex||t.version!==i.props.version||!n.hasMounted&&i.props.renderEarly&&(0,Dn.S)()?(i._resetRequiredWindows(),i._requiredRect=null,i._measureVersion++,i._invalidatePageCache(),i._updatePages(t,n)):n},i._onRenderRoot=function(t){var n=t.rootRef,i=t.surfaceElement,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderSurface=function(t){var n=t.surfaceRef,i=t.pageElements,e=t.divProps;return u.createElement("div",(0,o.Cl)({ref:n},e),i)},i._onRenderPage=function(t,n){for(var e,r=i.props,a=r.onRenderCell,l=r.onRenderCellConditional,s=r.role,c=t.page,f=c.items,d=void 0===f?[]:f,v=c.startIndex,h=(0,o.Tt)(t,["page"]),p=void 0===s?"listitem":"presentation",g=[],y=0;y<d.length;y++){var m=v+y,b=d[y],x=i.props.getKey?i.props.getKey(b,m):b&&b.key;null==x&&(x=m);var w=null!=l?l:a,C=null!==(e=null==w?void 0:w(b,m,i.props.ignoreScrollingState?void 0:i.state.isScrolling))&&void 0!==e?e:null;l&&!C||g.push(u.createElement("div",{role:p,className:"ms-List-cell",key:x,"data-list-index":m,"data-automationid":"ListCell"},C))}return u.createElement("div",(0,o.Cl)({},h),g)},lc(i),i.state={pages:[],isScrolling:!1,getDerivedStateFromProps:i._getDerivedStateFromProps,hasMounted:!1},i._estimatedPageHeight=0,i._totalEstimates=0,i._requiredWindowsAhead=0,i._requiredWindowsBehind=0,i._measureVersion=0,i._cachedPageHeights={},i._estimatedPageHeight=0,i._focusedIndex=-1,i._pageCache={},i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t,n){return n.getDerivedStateFromProps(t,n)},Object.defineProperty(n.prototype,"pageRefs",{get:function(){return this._pageRefs},enumerable:!1,configurable:!0}),n.prototype.scrollToIndex=function(t,n,i){void 0===i&&(i=0);for(var e=this.props.startIndex,r=e+this._getRenderCount(),o=this._allowedRect,u=0,a=1,l=e;l<r;l+=a){var s=this._getPageSpecification(this.props,l,o),c=s.height;if(a=s.itemCount,l<=t&&l+a>t){if(n&&this._scrollElement){for(var f=rv(this._scrollElement),d=Kd(this._scrollElement),v={top:d,bottom:d+f.height},h=t-l,p=0;p<h;++p)u+=n(l+p);var g=u+n(t);switch(i){case 1:return void Jd(this._scrollElement,u);case 2:return void Jd(this._scrollElement,g-f.height);case 3:return void Jd(this._scrollElement,(u+g-f.height)/2)}if(u>=v.top&&g<=v.bottom)return;u<v.top||g>v.bottom&&(u=g-f.height)}return void(this._scrollElement&&Jd(this._scrollElement,u))}u+=c}},n.prototype.getStartItemIndexInView=function(t){for(var n=0,i=this.state.pages||[];n<i.length;n++){var e=i[n];if(!e.isSpacer&&(this._scrollTop||0)>=e.top&&(this._scrollTop||0)<=e.top+e.height){if(!t){var r=Math.floor(e.height/e.itemCount);return e.startIndex+Math.floor((this._scrollTop-e.top)/r)}for(var o=0,u=e.startIndex;u<e.startIndex+e.itemCount;u++){if(r=t(u),e.top+o<=this._scrollTop&&this._scrollTop<e.top+o+r)return u;o+=r}}}return 0},n.prototype.componentDidMount=function(){this._async=new Nt(this),this._events=new Xc(this),this._onAsyncScrollDebounced=this._async.debounce(this._onAsyncScroll,100,{leading:!1,maxWait:500}),this._onAsyncIdleDebounced=this._async.debounce(this._onAsyncIdle,200,{leading:!1}),this._onAsyncResizeDebounced=this._async.debounce(this._onAsyncResize,16,{leading:!1}),this._onScrollingDoneDebounced=this._async.debounce(this._onScrollingDone,500,{leading:!1}),this._scrollElement=K(this._root.current),this._scrollTop=0,this.setState((0,o.Cl)((0,o.Cl)({},this._updatePages(this.props,this.state)),{hasMounted:!0})),this._measureVersion++;var t=function(t){var n;return null!==(n=null==t?void 0:t.window)&&void 0!==n?n:"undefined"!=typeof window?window:void 0}(this.context);this._events.on(t,"resize",this._onAsyncResizeDebounced),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScrollDebounced))},n.prototype.componentDidUpdate=function(t,n){var i=this.props,e=this.state;this.state.pagesVersion!==n.pagesVersion&&(i.getPageHeight?this._onAsyncIdleDebounced():this._updatePageMeasurements(e.pages)?(this._materializedRect=null,this._hasCompletedFirstRender?this._onAsyncScrollDebounced():(this._hasCompletedFirstRender=!0,this.setState(this._updatePages(i,e)))):this._onAsyncIdleDebounced(),i.onPagesUpdated&&i.onPagesUpdated(e.pages))},n.prototype.componentWillUnmount=function(){var t,n;null===(t=this._async)||void 0===t||t.dispose(),null===(n=this._events)||void 0===n||n.dispose(),delete this._scrollElement},n.prototype.shouldComponentUpdate=function(t,n){var i=this.state.pages,e=n.pages,r=!1;if(!n.isScrolling&&this.state.isScrolling)return!0;if(t.version!==this.props.version)return!0;if(t.className!==this.props.className)return!0;if(t.items===this.props.items&&i.length===e.length)for(var o=0;o<i.length;o++){var u=i[o],a=e[o];if(u.key!==a.key||u.itemCount!==a.itemCount){r=!0;break}}else r=!0;return r},n.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,this.state,!0),this.setState(this._updatePages(this.props,this.state)),this._measureVersion++,t.prototype.forceUpdate.call(this)},n.prototype.getTotalListHeight=function(){return this._surfaceRect.height},n.prototype.render=function(){for(var t=this.props,n=t.className,i=t.role,e=void 0===i?"list":i,r=t.onRenderSurface,u=t.onRenderRoot,a=this.state.pages,l=void 0===a?[]:a,s=[],c=$(this.props,R),f=0,d=l;f<d.length;f++){var v=d[f];s.push(this._renderPage(v))}var h=r?Zd(r,this._onRenderSurface):this._onRenderSurface;return(u?Zd(u,this._onRenderRoot):this._onRenderRoot)({rootRef:this._root,pages:l,surfaceElement:h({surfaceRef:this._surface,pages:l,pageElements:s,divProps:{role:"presentation",className:"ms-List-surface"}}),divProps:(0,o.Cl)((0,o.Cl)({},c),{className:z("ms-List",n),role:s.length>0?e:void 0,"aria-label":s.length>0?c["aria-label"]:void 0})})},n.prototype._shouldVirtualize=function(t){void 0===t&&(t=this.props);var n=t.onShouldVirtualize;return!n||n(t)},n.prototype._invalidatePageCache=function(){this._pageCache={}},n.prototype._renderPage=function(t){var n,i=this,e=this.props.usePageCache;if(e&&(n=this._pageCache[t.key])&&n.pageElement)return n.pageElement;var r=this._getPageStyle(t),o=this.props.onRenderPage,u=(void 0===o?this._onRenderPage:o)({page:t,className:"ms-List-page",key:t.key,ref:function(n){i._pageRefs[t.key]=n},style:r,role:"presentation"},this._onRenderPage);return e&&0===t.startIndex&&(this._pageCache[t.key]={page:t,pageElement:u}),u},n.prototype._getPageStyle=function(t){var n=this.props.getPageStyle;return(0,o.Cl)((0,o.Cl)({},n?n(t):{}),t.items?{}:{height:t.height})},n.prototype._onFocus=function(t){for(var n=t.target;n!==this._surface.current;){var i=n.getAttribute("data-list-index");if(i){this._focusedIndex=Number(i);break}n=b(n)}},n.prototype._onScroll=function(){this.state.isScrolling||this.props.ignoreScrollingState||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDoneDebounced()},n.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},n.prototype._onAsyncScroll=function(){var t,n;this._updateRenderRects(this.props,this.state),this._materializedRect&&(t=this._requiredRect,n=this._materializedRect,t.top>=n.top&&t.left>=n.left&&t.bottom<=n.bottom&&t.right<=n.right)||this.setState(this._updatePages(this.props,this.state))},n.prototype._onAsyncIdle=function(){var t=this.props,n=t.renderedWindowsAhead,i=t.renderedWindowsBehind,e=this._requiredWindowsAhead,r=this._requiredWindowsBehind,o=Math.min(n,e+1),u=Math.min(i,r+1);o===e&&u===r||(this._requiredWindowsAhead=o,this._requiredWindowsBehind=u,this._updateRenderRects(this.props,this.state),this.setState(this._updatePages(this.props,this.state))),(n>o||i>u)&&this._onAsyncIdleDebounced()},n.prototype._onScrollingDone=function(){this.props.ignoreScrollingState||(this.setState({isScrolling:!1}),this._onAsyncIdle())},n.prototype._onAsyncResize=function(){this.forceUpdate()},n.prototype._updatePages=function(t,n){this._requiredRect||this._updateRenderRects(t,n);var i=this._buildPages(t,n),e=n.pages;return this._notifyPageChanges(e,i.pages,this.props),(0,o.Cl)((0,o.Cl)((0,o.Cl)({},n),i),{pagesVersion:{}})},n.prototype._notifyPageChanges=function(t,n,i){var e=i.onPageAdded,r=i.onPageRemoved;if(e||r){for(var o={},u=0,a=t;u<a.length;u++)(c=a[u]).items&&(o[c.startIndex]=c);for(var l=0,s=n;l<s.length;l++){var c;(c=s[l]).items&&(o[c.startIndex]?delete o[c.startIndex]:this._onPageAdded(c))}for(var f in o)o.hasOwnProperty(f)&&this._onPageRemoved(o[f])}},n.prototype._updatePageMeasurements=function(t){var n=!1;if(!this._shouldVirtualize())return n;for(var i=0;i<t.length;i++){var e=t[i];e.items&&(n=this._measurePage(e)||n)}return n},n.prototype._measurePage=function(t){var n=!1,i=this._pageRefs[t.key],e=this._cachedPageHeights[t.startIndex];if(i&&this._shouldVirtualize()&&(!e||e.measureVersion!==this._measureVersion)){var r={width:i.clientWidth,height:i.clientHeight};(r.height||r.width)&&(n=t.height!==r.height,t.height=r.height,this._cachedPageHeights[t.startIndex]={height:r.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+r.height)/(this._totalEstimates+1)),this._totalEstimates++)}return n},n.prototype._onPageAdded=function(t){var n=this.props.onPageAdded;n&&n(t)},n.prototype._onPageRemoved=function(t){var n=this.props.onPageRemoved;n&&n(t)},n.prototype._buildPages=function(t,n){var i=t.renderCount,e=t.items,r=t.startIndex,u=t.getPageHeight;i=this._getRenderCount(t);for(var a=(0,o.Cl)({},nv),l=[],s=1,c=0,f=null,d=this._focusedIndex,v=r+i,h=this._shouldVirtualize(t),p=0===this._estimatedPageHeight&&!u,g=this._allowedRect,m=function(i){var o=b._getPageSpecification(t,i,g),u=o.height,m=o.data,x=o.key;s=o.itemCount;var w,C,M=c+u-1,k=y(n.pages,(function(t){return!!t.items&&t.startIndex===i}))>-1,A=!g||M>=g.top&&c<=g.bottom,S=!b._requiredRect||M>=b._requiredRect.top&&c<=b._requiredRect.bottom;if(!p&&(S||A&&k)||!h||d>=i&&d<i+s||i===r){f&&(l.push(f),f=null);var L=Math.min(s,v-i),V=b._createPage(x,e.slice(i,i+L),i,void 0,void 0,m);V.top=c,V.height=u,b._visibleRect&&b._visibleRect.bottom&&(V.isVisible=M>=b._visibleRect.top&&c<=b._visibleRect.bottom),l.push(V),S&&b._allowedRect&&(w=a,C={top:c,bottom:M,height:u,left:g.left,right:g.right,width:g.width},w.top=C.top<w.top||-1===w.top?C.top:w.top,w.left=C.left<w.left||-1===w.left?C.left:w.left,w.bottom=C.bottom>w.bottom||-1===w.bottom?C.bottom:w.bottom,w.right=C.right>w.right||-1===w.right?C.right:w.right,w.width=w.right-w.left+1,w.height=w.bottom-w.top+1)}else f||(f=b._createPage(Qd+i,void 0,i,0,void 0,m,!0)),f.height=(f.height||0)+(M-c)+1,f.itemCount+=s;if(c+=M-c+1,p&&h)return"break"},b=this,x=r;x<v&&"break"!==m(x);x+=s);return f&&(f.key=Qd+"end",l.push(f)),this._materializedRect=a,(0,o.Cl)((0,o.Cl)({},n),{pages:l,measureVersion:this._measureVersion})},n.prototype._getPageSpecification=function(t,n,i){var e=t.getPageSpecification;if(e){var r=e(n,i,t.items),o=r.itemCount,u=void 0===o?this._getItemCountForPage(n,i):o,a=r.height;return{itemCount:u,height:void 0===a?this._getPageHeight(n,i,u):a,data:r.data,key:r.key}}return{itemCount:u=this._getItemCountForPage(n,i),height:this._getPageHeight(n,i,u)}},n.prototype._getPageHeight=function(t,n,i){if(this.props.getPageHeight)return this.props.getPageHeight(t,n,i,this.props.items);var e=this._cachedPageHeights[t];return e?e.height:this._estimatedPageHeight||30},n.prototype._getItemCountForPage=function(t,n){return(this.props.getItemCountForPage?this.props.getItemCountForPage(t,n):10)||10},n.prototype._createPage=function(t,n,i,e,r,o,u){void 0===i&&(i=-1),void 0===e&&(e=n?n.length:0),void 0===r&&(r={}),t=t||"page-"+i;var a=this._pageCache[t];return a&&a.page?a.page:{key:t,startIndex:i,itemCount:e,items:n,style:r,top:0,height:0,data:o,isSpacer:u||!1}},n.prototype._getRenderCount=function(t){var n=t||this.props,i=n.items,e=n.startIndex,r=n.renderCount;return void 0===r?i?i.length-e:0:r},n.prototype._updateRenderRects=function(t,n,i){var e=t.renderedWindowsAhead,r=t.renderedWindowsBehind,u=n.pages;if(this._shouldVirtualize(t)){var a=this._surfaceRect||(0,o.Cl)({},nv),l=function(t){if(void 0===t)return 0;var n=0;return"scrollHeight"in t?n=t.scrollHeight:"document"in t&&(n=t.document.documentElement.scrollHeight),n}(this._scrollElement),c=Kd(this._scrollElement);this._surface.current&&(i||!u||!this._surfaceRect||!l||l!==this._scrollHeight||Math.abs(this._scrollTop-c)>this._estimatedPageHeight*tv)&&(a=this._surfaceRect=ev(this._surface.current),this._scrollTop=c),!i&&l&&l===this._scrollHeight||this._measureVersion++,this._scrollHeight=l||0;var f=Math.max(0,-a.top),d=(0,s.z)(this._root.current),v={top:f,left:a.left,bottom:f+d.innerHeight,right:a.right,width:a.width,height:d.innerHeight};this._requiredRect=uv(v,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=uv(v,r,e),this._visibleRect=v}},n.defaultProps={startIndex:0,onRenderCell:function(t,n,i){return u.createElement(u.Fragment,null,t&&t.name||"")},onRenderCellConditional:void 0,renderedWindowsAhead:2,renderedWindowsBehind:2},n.contextType=Ft,n}(u.Component);function uv(t,n,i){var e=t.top-n*t.height,r=t.height+(n+i)*t.height;return{top:e,bottom:e+r,height:r,left:t.left,right:t.right,width:t.width}}var av=function(t){var n=u.useRef(null);u.useEffect((function(){if(n.current){var i=nl(n.current),e=t.text.split(/\s+/),r=[],o=i.append("tspan"),u=0;return e.forEach((function(n){r.push(n),o.text(r.join(" "));var e=o.node();e&&e.getComputedTextLength()>t.width&&r.length>1&&(u++,r.pop(),o.text(r.join(" ")),r=[n],o=i.append("tspan").text(n).attr("dy",t.lineHeight).attr("x",t.x))})),i.attr("dy",-u*t.lineHeight),function(){i.selectAll("tspan").remove()}}})),t.lineHeight;var i=(0,o.Tt)(t,["lineHeight"]);return u.createElement("text",(0,o.Cl)({ref:n},Fs(i)))},lv=function(t){var n,i,e,r=u.useRef(null),o=u.useState(!1),a=o[0],l=o[1],s=null;if(a){var c=t.labelDef.aggregatedIdx.map((function(n){return t.lineDefs[n].onRenderCard})).filter((function(t){return!!t}));c.length>0&&(s=u.createElement(Pn,{target:r.current,onDismiss:function(){return l(!1)},setInitialFocus:!0,role:"dialog"},u.createElement(Dc,{isCircularNavigation:!0,direction:Ys.vertical},u.createElement(ov,{items:c,role:"alert","aria-roledescription":" ",onRenderCell:function(t){return u.createElement("div",{"data-is-focusable":!0},t&&t())}}))))}var f=t.textColor?Ql(t.textColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.semanticColors.messageText;return e=1===t.labelDef.aggregatedIdx.length?t.lineDefs[t.labelDef.aggregatedIdx[0]].event:t.mergedLabel(t.labelDef.aggregatedIdx.length),u.createElement(u.Fragment,null,u.createElement("g",{ref:r,onClick:function(){return l(!0)},"data-is-focusable":!0,style:{cursor:"pointer"},role:"button"},u.createElement(av,{text:e,x:t.labelDef.x,y:t.textY,width:t.textWidth,lineHeight:t.textLineHeight,textAnchor:t.labelDef.anchor,fontSize:t.textFontSize,fill:f})),s)},sv=function(t){var n,i,e=t.labelWidth?t.labelWidth:105,r=t.chartYTop-20,a=r+7,l=t.scale.range(),s=t.events.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{x:t.scale(n.date)})}));s.sort((function(t,n){return+t.date-+n.date}));var c=t.strokeColor?Ql(t.strokeColor,null===(n=t.theme)||void 0===n?void 0:n.isInverted):null===(i=t.theme)||void 0===i?void 0:i.palette.black,f=function(t,n){for(var i=[],e=[],r=0,o=t;r<o.length;r++){var u=o[r],a=n(u);-1===i.indexOf(a)&&(e.push(u),i.push(a))}return e}(s,(function(t){return t.date.toString()})).map((function(n,i){return u.createElement("line",{key:i,x1:n.x,x2:n.x,y1:a,y2:t.chartYBottom,stroke:c,strokeDasharray:"8"})})),d=function(t,n,i,e){var r=function(e,r){if(r===t.length)return[];var u=t[r].x,a=u-n;return u<e?[]:r===t.length-1?e<a?[{x:u,anchor:"end",aggregatedIdx:[r]}]:u+n<i?[{x:u,anchor:"start",aggregatedIdx:[r]}]:[]:o(r,e<a?"end":"start")},o=function(e,o){var u="end"===o?t[e].x:t[e].x+n,a=y(t,(function(t){return t.x>u&&(t.x-n>=u||t.x+n<i)}),e+1);-1===a&&(a=t.length);for(var l=[],s=e;s<a;s++)l.push(s);var c=r(u,a);return c.unshift({x:t[e].x,anchor:o,aggregatedIdx:l}),c};return r(e,0)}(s,e+5,l[1],l[0]).map((function(n,i){return u.createElement(lv,{key:i,theme:t.theme,lineDefs:s,labelDef:n,textY:r,textWidth:e,textLineHeight:18,textFontSize:"10pt",textColor:t.labelColor,mergedLabel:t.mergedLabel})}));return u.createElement(u.Fragment,null,f,d)};function cv(t){var n,i,e=t.xAxisScale,r=t.yAxisScale,o=t.className,a=t.lineOptions,l=t.minPixelGap,s=void 0===l?40:l,c=function(t){return t?{originXOffset:t.originXOffset,direction:"clockwise"===t.direction||"counterclockwise"===t.direction?t.direction:void 0,rotation:t.rotation,axisLabel:Array.isArray(t.axisLabel)?t.axisLabel:void 0}:void 0}(a),f=null!==(n=null==c?void 0:c.axisLabel)&&void 0!==n?n:[],d=[],v=[],h=f.length,p="clockwise"===(null==c?void 0:c.direction)?-1:1,g=(null!==(i=null==c?void 0:c.rotation)&&void 0!==i?i:0)*Math.PI/180;return f.forEach((function(t,n){var i=g+p*(2*Math.PI/h)*n,a=(null==c?void 0:c.originXOffset)||0,l=e(.7*Math.cos(i)-a/2),f=r(.7*Math.sin(i)),y=v.every((function(t){return Math.sqrt(Math.pow(l-t.x,2)+Math.pow(f-t.y,2))>=s}));(0===d.length||y)&&(d.push(u.createElement("text",{key:"scatterpolar-label-".concat(t),x:l,y:f,className:o,textAnchor:"middle",alignmentBaseline:"middle",opacity:1},t)),v.push({x:l,y:f}))})),d}var fv,dv=(0,a.Z)();!function(t){t[t.hoverSize=11]="hoverSize",t[t.invisibleSize=1]="invisibleSize"}(fv||(fv={}));var vv=vi((function(t){return t.x})).left,hv=function(t){function n(n){var i,e,r,a,s,c=t.call(this,n)||this;return c._xAxisScale="",c._yScalePrimary="",c.eventLabelHeight=36,c._isRTL=(0,l.jI)(),c._hasMarkersMode=!1,c._isXAxisDateType=!1,c._isScatterPolar=!1,c.toImage=function(t){var n,i;return Pf(null===(n=c._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=c._legendsRef.current)||void 0===i?void 0:i.toSVG,c._isRTL,t)},c._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?ys(t,n,i,r,c.props.xScaleType,c._hasMarkersMode):o===jl.DateAxis?ws(t,n,i,r,a,e,0,c._hasMarkersMode):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},c._injectIndexPropertyInLineChartData=function(t,n){var i;void 0===n&&(n=!1);var e=c.props.allowMultipleShapesForPoints,r=void 0!==e&&e,u=n?null==t?void 0:t.filter((function(t){var n,i,e;return(null===(i=null===(n=c.props.legendProps)||void 0===n?void 0:n.selectedLegends)||void 0===i?void 0:i.includes(t.legend))||(null===(e=c.props.legendProps)||void 0===e?void 0:e.selectedLegend)===t.legend})):t;return c._hasMarkersMode=null!==(i=null==u?void 0:u.some((function(t){var n,i,e;return null===(e=null===(i=null===(n=t.lineOptions)||void 0===n?void 0:n.mode)||void 0===i?void 0:i.includes)||void 0===e?void 0:e.call(i,"markers")})))&&void 0!==i&&i,c._isScatterPolar=js(u),u?u.map((function(t,n){var i,e,u;return u=void 0===t.color?Jl(n,0,null===(i=c.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(e=c.props.theme)||void 0===e?void 0:e.isInverted),(0,o.Cl)((0,o.Cl)({},t),{index:r?n:-1,color:u})})):[]},c._getCustomizedCallout=function(){return c.props.onRenderCalloutPerStack?c.props.onRenderCalloutPerStack(c.state.stackCalloutProps):c.props.onRenderCalloutPerDataPoint?c.props.onRenderCalloutPerDataPoint(c.state.dataPointCalloutProps):null},c._getNumericMinMaxOfY=function(t,n,i){var e=Cs(t,0,i,i?c.props.secondaryYScaleType:c.props.yScaleType),r=e.startValue,o=e.endValue,u={start:0,end:0};return c._hasMarkersMode&&(u=Gs(r,o,i?c.props.secondaryYScaleType:c.props.yScaleType)),{startValue:r-u.start,endValue:o+u.end}},c._getMargins=function(t){c.margins=t},c._initializeLineChartData=function(t,n,i,e,r,o,u){c._xAxisScale=t,c._yScalePrimary=n,c._yScaleSecondary=u,c._renderedColorFillBars=c.props.colorFillBars?c._createColorFillBars(i):[],c.lines=c._createLines(r,i)},c._handleSingleLegendSelectionAction=function(t){c.state.selectedLegend===t.legend?(c.setState({selectedLegend:""}),c._handleLegendClick(t,null)):(c.setState({selectedLegend:t.legend}),c._handleLegendClick(t,t.legend))},c._onHoverCardHide=function(){c.setState({selectedLegendPoints:[],selectedColorBarLegend:[],isSelectedLegend:!1})},c._closeCallout=function(){c.setState({isCalloutVisible:!1})},c._getBoxWidthOfShape=function(t,n,i){var e=c.props,r=e.allowMultipleShapesForPoints,o=void 0!==r&&r,u=e.strokeWidth,a=void 0===u?4:u,l=c.state.activePoint;return o?l===t?fv.hoverSize:1===n||i?2.5*a:fv.invisibleSize:l===t?fv.hoverSize:fv.invisibleSize},c._getPath=function(t,n,i,e,r,o){var u=c.props.allowMultipleShapesForPoints,a=void 0!==u&&u,l=c._getBoxWidthOfShape(i,e,r),s=a?o%Object.keys(Vs).length:0,f=Vs[s].widthRatio;return function(t,n,i,e){return["M".concat(t-i/2," ").concat(n,"\n A").concat(i/2," ").concat(i/2," 0 1 0 ").concat(t+i/2," ").concat(n,"\n M").concat(t-i/2," ").concat(n,"\n A ").concat(i/2," ").concat(i/2," 0 1 1 ").concat(t+i/2," ").concat(n,"\n "),"M".concat(t-i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n+i/2,"\n Z"),"M".concat(t-i/2," ").concat(n-.2886*i,"\n H ").concat(t+i/2,"\n L").concat(t," ").concat(n+.5774*i," Z"),"M".concat(t," ").concat(n-i/2,"\n L").concat(t+i/2," ").concat(n,"\n L").concat(t," ").concat(n+i/2,"\n L").concat(t-i/2," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.5774*i,"\n L").concat(t+i/2," ").concat(n+.2886*i,"\n L").concat(t-i/2," ").concat(n+.2886*i," Z"),"M".concat(t-.5*i," ").concat(n-.866*i,"\n L").concat(t+.5*i," ").concat(n-.866*i,"\n L").concat(t+i," ").concat(n,"\n L").concat(t+.5*i," ").concat(n+.866*i,"\n L").concat(t-.5*i," ").concat(n+.866*i,"\n L").concat(t-i," ").concat(n,"\n Z"),"M".concat(t," ").concat(n-.851*i,"\n L").concat(t+.6884*i," ").concat(n-.2633*i,"\n L").concat(t+.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.5001*i," ").concat(n+.6884*i,"\n L").concat(t-.6884*i," ").concat(n-.2633*i,"\n Z"),"M".concat(t-.5001*i," ").concat(n-1.207*i,"\n L").concat(t+.5001*i," ").concat(n-1.207*i,"\n L").concat(t+1.207*i," ").concat(n-.5001*i,"\n L").concat(t+1.207*i," ").concat(n+.5001*i,"\n L").concat(t+.5001*i," ").concat(n+1.207*i,"\n L").concat(t-.5001*i," ").concat(n+1.207*i,"\n L").concat(t-1.207*i," ").concat(n+.5001*i,"\n L").concat(t-1.207*i," ").concat(n-.5001*i,"\n Z")][e]}(t,n,l=f>1?l/f:l,s)},c._getPointFill=function(t,n,i,e){var r=c.state.activePoint,o=c.props,u=o.theme;return o.allowMultipleShapesForPoints,r===n?u.semanticColors.bodyBackground:t},c._createColorFillBars=function(t){var n,i=[];c.state.isSelectedLegend?c._colorFillBars=c.state.selectedColorBarLegend:c._colorFillBars=c.props.colorFillBars;for(var e=Cs(c._points),r=0;r<c._colorFillBars.length;r++){var o=c._colorFillBars[r],a=p("string"==typeof o.legend?o.legend.replace(/\W/g,""):""),l=Ql(o.color,null===(n=c.props.theme)||void 0===n?void 0:n.isInverted);o.applyPattern&&i.push(c._getStripePattern(l,r));for(var s=0;s<o.data.length;s++){var f=o.data[s].startX,d=o.data[s].endX,v=c._legendHighlighted(o.legend)||c._noLegendHighlighted()||c.state.isSelectedLegend?c._getColorFillBarOpacity(o):.1;i.push(u.createElement("rect",{fill:o.applyPattern?"url(#".concat(c._colorFillBarPatternId,"_").concat(r,")"):l,fillOpacity:v,x:c._isRTL?c._xAxisScale(d):c._xAxisScale(f),y:c._yScalePrimary(e.endValue)-3,width:Math.abs(c._xAxisScale(d)-c._xAxisScale(f)),height:c._yScalePrimary(c.props.yMinValue||0)-c._yScalePrimary(e.endValue)+3,key:"".concat(a).concat(s)}))}}return i},c._getStripePattern=function(t,n){return u.createElement("pattern",{id:"".concat(c._colorFillBarPatternId,"_").concat(n),width:16,height:16,key:"".concat(c._colorFillBarPatternId,"_").concat(n),patternUnits:"userSpaceOnUse"},u.createElement("path",{d:"M-4,4 l8,-8 M0,16 l16,-16 M12,20 l8,-8",stroke:t,strokeWidth:1.25}))},c._checkInGap=function(t,n,i){for(var e=i,r=!1;e<n.length&&t>n[e].endIndex;)e++;return e<n.length&&t>n[e].startIndex&&t<=n[e].endIndex&&(r=!0),{isInGap:r,gapIndex:e}},c._onMouseOverLargeDataset=function(t,n,i,e){e.persist();var r=c.props.data.lineChartData,o=c._xAxisScale.invert(Hd(e)[0],document.getElementById(c._rectId)),u=vv(r[t].data,o),a=r[t].data[u-1],l=r[t].data[u],s=null,f=null;if(void 0===a&&void 0!==l)s=l.x,f=u;else if(void 0!==a&&void 0===l)s=a.x,f=u-1;else{var d=void 0,v=void 0,h=void 0;switch(Ls(r[t].data[0].x,!0)){case jl.DateAxis:d=new Date(o).getTime(),v=a.x.getTime(),h=l.x.getTime(),s=Math.abs(d-v)>Math.abs(d-h)?l.x:a.x,f=Math.abs(d-v)>Math.abs(d-h)?u:u-1;break;case jl.NumericAxis:d=o,v=a.x,h=l.x,s=Math.abs(d-v)>Math.abs(d-h)?l.x:a.x,f=Math.abs(d-v)>Math.abs(d-h)?u:u-1}}var p=r[t].data[f],g=p.xAxisCalloutData,y=p.xAxisCalloutAccessibilityData,b=s instanceof Date?(0,_n.Yn)(s,c.props.culture,c.props.useUTC):s,x=s instanceof Date?s.getTime():s,w=m(c._calloutPoints,(function(t){return t.x===x})),C=r[t].data[f],M=null===c.state.nearestCircleToHighlight||null!==c.state.nearestCircleToHighlight&&null!==C&&(c.state.nearestCircleToHighlight.x!==C.x||c.state.nearestCircleToHighlight.y!==C.y);w&&M&&(c._uniqueCallOutID="#".concat(c._staticHighlightCircle,"_").concat(t),nl("#".concat(c._staticHighlightCircle,"_").concat(t)).attr("cx","".concat(c._xAxisScale(C.x))).attr("cy","".concat(i(C.y))).attr("visibility","visibility"),nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(c._xAxisScale(C.x),", ").concat(i(C.y),")")})).attr("visibility","visibility").attr("y2","".concat(n-i(C.y))),c.setState({nearestCircleToHighlight:C,isCalloutVisible:!0,refSelected:"#".concat(c._staticHighlightCircle,"_").concat(t),stackCalloutProps:w,YValueHover:w.values,dataPointCalloutProps:w,hoverXValue:g||b,xAxisCalloutAccessibilityData:y,activePoint:"",activeLine:t})),w||c.setState({isCalloutVisible:!1,nearestCircleToHighlight:C,activePoint:"",activeLine:t})},c._handleFocus=function(t,n,i,e,r){c._uniqueCallOutID=e;var o=n instanceof Date?(0,_n.Yn)(n,c.props.culture,c.props.useUTC):n,u=n instanceof Date?n.getTime():n,a=m(c._calloutPoints,(function(t){return t.x===u}));if(a){var l=c;nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(l._xAxisScale(n),", 0)")})).attr("visibility","visibility"),c._refArray.forEach((function(n){n.index===t&&c.setState({isCalloutVisible:!0,refSelected:n.refElement,hoverXValue:i||""+o,YValueHover:a.values,stackCalloutProps:a,dataPointCalloutProps:a,activePoint:e,xAxisCalloutAccessibilityData:r})}))}else c.setState({activePoint:e})},c._handleHover=function(t,n,i,e,r,o,u,a,l,s){s.persist();var f=t instanceof Date?(0,_n.Yn)(t,c.props.culture,c.props.useUTC):t,d=t instanceof Date?t.getTime():t,v=n instanceof Date?n.getTime():n,h=c,p=m(c._calloutPoints,(function(t){return t.x===d})),g=void 0;if(!1===c.props.isCalloutForStack&&(null==p?void 0:p.values)){var y=m(p.values,(function(t){return(null==t?void 0:t.y)===v}));y&&(g={x:d,values:[y]})}p?(nl("#".concat(c._verticalLine)).attr("transform",(function(){return"translate(".concat(h._xAxisScale(t),", ").concat(u(n),")")})).attr("visibility","visibility").attr("y2","".concat(i-u(n))),c._uniqueCallOutID!==r&&(c._uniqueCallOutID=r,c.setState({isCalloutVisible:!0,refSelected:"#".concat(r),hoverXValue:e||""+f,YValueHover:p.values,YValue:v,legendVal:a,lineColor:l,stackCalloutProps:p,dataPointCalloutProps:g,activePoint:r,xAxisCalloutAccessibilityData:o,nearestCircleToHighlight:null,activeLine:null}))):c.setState({activePoint:r,nearestCircleToHighlight:null,activeLine:null})},c._getClickHandler=function(t){return t?{onClick:t}:{}},c._handleMouseOut=function(){nl("#".concat(c._verticalLine)).attr("visibility","hidden")},c._handleChartMouseLeave=function(){c._uniqueCallOutID=null,c.setState({isCalloutVisible:!1,activePoint:"",activeLine:null})},c._handleLegendClick=function(t,n){t.onLegendClick&&t.onLegendClick(n)},c._handleMultipleLineLegendSelectionAction=function(t){var n,i=c.state.selectedLegendPoints.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedLegendPoints,!0),[t],!1):c.state.selectedLegendPoints.slice(0,i).concat(c.state.selectedLegendPoints.slice(i+1)),c.props.data&&n.length===c.props.data.lineChartData.length&&(c.props.colorFillBars&&c.props.colorFillBars.length===c.state.selectedColorBarLegend.length||!c.props.colorFillBars)?c._clearMultipleLegendSelections():n.length||c.state.selectedColorBarLegend.length?c.setState({selectedLegendPoints:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._handleMultipleColorFillBarLegendSelectionAction=function(t){var n,i=c.state.selectedColorBarLegend.reduce((function(n,i,e){return n>-1||i.legend!==t.legend?n:e}),-1);(n=-1===i?(0,o.fX)((0,o.fX)([],c.state.selectedColorBarLegend,!0),[t],!1):c.state.selectedColorBarLegend.slice(0,i).concat(c.state.selectedColorBarLegend.slice(i+1))).length===(c.props.colorFillBars&&c.props.colorFillBars.length)&&(c.props.data&&c.props.data.lineChartData.length===c.state.selectedLegendPoints.length||!c.props.data)?c._clearMultipleLegendSelections():n.length||c.state.selectedLegendPoints.length?c.setState({selectedColorBarLegend:n,isSelectedLegend:!0}):c._clearMultipleLegendSelections();var e=n.map((function(t){return t.legend}));c._handleLegendClick(t,e)},c._clearMultipleLegendSelections=function(){c.setState({selectedColorBarLegend:[],selectedLegendPoints:[],isSelectedLegend:!1})},c._legendHighlighted=function(t){return c.state.selectedLegend===t||""===c.state.selectedLegend&&c.state.activeLegend===t},c._noLegendHighlighted=function(){return""===c.state.selectedLegend&&""===c.state.activeLegend},c._getColorFillBarOpacity=function(t){return t.applyPattern?1:.4},c._getAriaLabel=function(t,n){var i,e=c._points[t],r=e.data[n],o=r.x instanceof Date?(0,_n.Yn)(r.x,c.props.culture,c.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},c._getChartTitle=function(){var t=c.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Line chart with ".concat((null==i?void 0:i.length)||0," lines. ")},lc(c),c.state={hoverXValue:"",activeLegend:"",YValueHover:[],YValue:"",legendVal:"",refSelected:"",selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",isCalloutVisible:!1,selectedLegendPoints:c._injectIndexPropertyInLineChartData(c.props.data.lineChartData,!0),selectedColorBarLegend:[],isSelectedLegend:(null!==(s=null===(a=null===(r=c.props.legendProps)||void 0===r?void 0:r.selectedLegends)||void 0===a?void 0:a.length)&&void 0!==s?s:0)>0,activePoint:"",nearestCircleToHighlight:null,activeLine:null},c._refArray=[],c._points=c._injectIndexPropertyInLineChartData(c.props.data.lineChartData),c._colorFillBars=[],c._calloutPoints=ds(c._points)||[],c._circleId=p("circle"),c._lineId=p("lineID"),c._borderId=p("borderID"),c._verticalLine=p("verticalLine"),c._colorFillBarPatternId=p("colorFillBarPattern"),c._tooltipId=p("LineChartTooltipId_"),c._rectId=p("containerRectLD"),c._staticHighlightCircle=p("staticHighlightCircle"),c._createLegendsMemoized=(0,an.J9)((function(t){return c._createLegends(t)})),c._firstRenderOptimization=!0,c._emptyChartId=p("_LineChart_empty"),c._cartesianChartRef=u.createRef(),c._legendsRef=u.createRef(),n.eventAnnotationProps&&n.eventAnnotationProps.labelHeight&&(c.eventLabelHeight=n.eventAnnotationProps.labelHeight),c}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r,o,u,a,l,s;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)===(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&Bs(null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends,null===(r=this.props.legendProps)||void 0===r?void 0:r.selectedLegends)||this.setState({selectedLegend:null!==(u=null===(o=this.props.legendProps)||void 0===o?void 0:o.selectedLegend)&&void 0!==u?u:"",selectedLegendPoints:this._injectIndexPropertyInLineChartData(this.props.data.lineChartData,!0),isSelectedLegend:(null!==(s=null===(l=null===(a=this.props.legendProps)||void 0===a?void 0:a.selectedLegends)||void 0===l?void 0:l.length)&&void 0!==s?s:0)>0}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData),this._calloutPoints=ds(this._points)||[])},n.prototype.render=function(){var t=this,n=this.props,i=n.tickValues,e=n.tickFormat,r=n.eventAnnotationProps,a=n.legendProps,l=n.data;this._points=this._injectIndexPropertyInLineChartData(l.lineChartData),this._isXAxisDateType=gs(this._points);var s=this._points;a&&a.canSelectMultipleLegends&&(s=this.state.selectedLegendPoints.length>=1?this.state.selectedLegendPoints:this._points,this._calloutPoints=ds(s));var c=null;this.props.hideLegend||(c=this._createLegendsMemoized(this._points));var f=(0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,YValue:this.state.YValue,legend:this.state.legendVal,color:this.state.lineColor,XValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,onDismiss:this._closeCallout,preventDismissOnEvent:function(){return!0},hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),descriptionMessage:this.props.getCalloutDescriptionMessage&&this.state.stackCalloutProps?this.props.getCalloutDescriptionMessage(this.state.stackCalloutProps):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps),d={tickValues:i,tickFormat:e};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:s,chartType:zl.LineChart,calloutProps:f,tickParams:d,legendBars:c,createYAxis:ss,getmargins:this._getMargins,getMinMaxOfYAxis:this._getNumericMinMaxOfY,getGraphData:this._initializeLineChartData,xAxisType:this._isXAxisDateType?jl.DateAxis:jl.NumericAxis},this._isScatterPolar?{yMaxValue:1,yMinValue:-1}:{},{customizedCallout:this._getCustomizedCallout(),getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:fs,onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){return t._xAxisScale=n.xScale,t._yScalePrimary=n.yScalePrimary,t._yScaleSecondary=n.yScaleSecondary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:n.containerHeight,stroke:"#323130",id:t._verticalLine,visibility:"hidden",strokeDasharray:"5,5"}),t.props.optimizeLargeData?u.createElement("rect",{id:t._rectId,width:n.containerWidth,height:n.containerHeight,fill:"transparent"}):u.createElement(u.Fragment,null),u.createElement("g",null,t._renderedColorFillBars,t.lines),r&&u.createElement(sv,(0,o.Cl)({theme:t.props.theme},r,{scale:n.xScale,chartYTop:t.margins.top+t.eventLabelHeight,chartYBottom:n.containerHeight-35}))))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._createLegends=function(t){var n=this,i=this.props,e=i.legendProps,r=i.allowMultipleShapesForPoints,a=void 0!==r&&r,l=!(!e||!e.canSelectMultipleLegends),s={};t.forEach((function(t){t.legend&&(s[t.legend]||(s[t.legend]=[]),s[t.legend].push(t))}));var c=Object.entries(s).map((function(t){var i=t[0],e=t[1],r=e[0];return(0,o.Cl)((0,o.Cl)({title:i,color:r.color,action:function(){l?e.forEach((function(t){return n._handleMultipleLineLegendSelectionAction(t)})):e.forEach((function(t){return n._handleSingleLegendSelectionAction(t)}))},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:i})}},r.legendShape&&{shape:r.legendShape}),a&&{shape:As[r.index%Object.keys(Vs).length]})})),f=this.props.colorFillBars?this.props.colorFillBars.map((function(t,i){var e,r=t.legend,o=Ql(t.color,null===(e=n.props.theme)||void 0===e?void 0:e.isInverted);return{title:r,color:o,action:function(){l?n._handleMultipleColorFillBarLegendSelectionAction(t):n._handleSingleLegendSelectionAction(t)},onMouseOutAction:function(){n.setState({activeLegend:""})},hoverAction:function(){n._handleChartMouseLeave(),n.setState({activeLegend:r})},opacity:n._getColorFillBarOpacity(t),stripePattern:t.applyPattern}})):[];return u.createElement(jf,(0,o.Cl)({legends:(0,o.fX)((0,o.fX)([],c,!0),f,!0),enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},l&&{onLegendHoverCardLeave:this._onHoverCardHide},this.props.legendProps,{ref:this._legendsRef}))},n.prototype._createLines=function(t,n){var i,e,r,a,l,s,c,f,d,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,$,z,j,Y,X=this,G=[];this.state.isSelectedLegend?this._points=this.state.selectedLegendPoints:this._points=this._injectIndexPropertyInLineChartData(this.props.data.lineChartData);for(var q=ri(this._points,(function(t){return ri(t.data,(function(t){return t.markerSize}))})),U=dv(this.props.styles,{theme:this.props.theme}),Z=function(t){var Z=[],J=[],Q=[],tt=K._points[t].legend,nt=K._points[t].color,it=K.state.activePoint,et=K.props.theme,rt=n-K.margins.bottom+6,ot=!(!K._points[t].useSecondaryYScale||!K._yScaleSecondary),ut=ot?K._yScaleSecondary:K._yScalePrimary,at=K._hasMarkersMode?Ks({data:K._points,xScale:K._xAxisScale,yScalePrimary:K._yScalePrimary,yScaleSecondary:K._yScaleSecondary,useSecondaryYScale:ot,xScaleType:K.props.xScaleType,yScaleType:K.props.yScaleType,secondaryYScaleType:K.props.secondaryYScaleType}):0;if(1===K._points[t].data.length){var lt=K._points[t].data[0],st=lt.x,ct=lt.y,ft=lt.xAxisCalloutData,dt=lt.xAxisCalloutAccessibilityData,vt=K._xAxisScale(st),ht=ut(ct);if(Us(vt,ht)){var pt="".concat(K._circleId,"_").concat(t),gt=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,yt=K._points[t].data[0].markerSize,mt=null===(e=null===(i=K._points[t].lineOptions)||void 0===i?void 0:i.mode)||void 0===e?void 0:e.includes("text"),bt=K._points[t].data[0].text;Q.push(u.createElement(u.Fragment,{key:"".concat(pt,"_fragment")},u.createElement("circle",(0,o.Cl)({id:pt,key:pt,r:yt?yt*at/q:it===pt?5.5:3.5,cx:vt,cy:ht,fill:it===pt?et.semanticColors.bodyBackground:nt,opacity:gt?1:.1,onMouseOver:K._handleHover.bind(K,st,ct,rt,ft,pt,dt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,st,ct,rt,ft,pt,dt,ut,tt,nt),onMouseOut:K._handleMouseOut,strokeWidth:it===pt?4:0,stroke:it===pt?nt:"",role:"img","aria-label":K._getAriaLabel(t,0),"data-is-focusable":gt,ref:function(t){X._refCallback(t,pt)},onFocus:function(){return X._handleFocus(pt,st,ft,pt,dt)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[0].onDataPointClick))),!K._isScatterPolar&&mt&&bt&&u.createElement("text",{key:"".concat(pt,"-label"),x:vt,y:ht+Math.max(yt?yt*at/q:3.5,4)+12,className:U.markerLabel,opacity:gt?1:.1},bt)))}}var xt=0,wt=null!==(a=null===(r=K._points[t].gaps)||void 0===r?void 0:r.sort((function(t,n){return t.startIndex-n.startIndex})))&&void 0!==a?a:[],Ct=null===(l=K._points[t].lineOptions)||void 0===l?void 0:l.curve;if((K.props.optimizeLargeData||Ct)&&K._points[t].data.length>1){for(var Mt=Rd().x((function(t){return X._xAxisScale(t[0])})).y((function(t){return ut(t[1])})).curve(Ws(Ct)).defined((function(t){return Us(X._xAxisScale(t[0]),ut(t[1]))})),kt="".concat(K._lineId,"_").concat(t),At="".concat(K._borderId,"_").concat(t),St=(null===(s=K._points[t].lineOptions)||void 0===s?void 0:s.strokeWidth)||K.props.strokeWidth||4,Lt=(gt=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,[]),Vt=0;Vt<K._points[t].data.length;Vt++)Lt.push([K._points[t].data[Vt].x instanceof Date?K._points[t].data[Vt].x.getTime():K._points[t].data[Vt].x,K._points[t].data[Vt].y]);if(gt){var Dt=(null===(c=K._points[t].lineOptions)||void 0===c?void 0:c.lineBorderWidth)?Number.parseFloat(K._points[t].lineOptions.lineBorderWidth.toString()):0;Dt>0&&J.push(u.createElement("path",{id:At,key:At,d:Mt(Lt),fill:"transparent",strokeLinecap:null!==(d=null===(f=K._points[t].lineOptions)||void 0===f?void 0:f.strokeLinecap)&&void 0!==d?d:"round",strokeWidth:Number.parseFloat(St.toString())+Dt,stroke:(null===(v=K._points[t].lineOptions)||void 0===v?void 0:v.lineBorderColor)||et.semanticColors.bodyBackground,opacity:1})),Z.push(u.createElement("path",(0,o.Cl)({id:kt,key:kt,d:Mt(Lt),fill:"transparent","data-is-focusable":!0,stroke:nt,strokeWidth:St,strokeLinecap:null!==(p=null===(h=K._points[t].lineOptions)||void 0===h?void 0:h.strokeLinecap)&&void 0!==p?p:"round",strokeDasharray:null===(g=K._points[t].lineOptions)||void 0===g?void 0:g.strokeDasharray,onMouseMove:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOver:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOut:K._handleMouseOut},K._getClickHandler(K._points[t].onLineClick),{opacity:1})))}else Z.push(u.createElement("path",{id:kt,key:kt,d:Mt(Lt),fill:"transparent","data-is-focusable":!1,stroke:nt,strokeWidth:St,strokeLinecap:null!==(m=null===(y=K._points[t].lineOptions)||void 0===y?void 0:y.strokeLinecap)&&void 0!==m?m:"round",strokeDasharray:null===(b=K._points[t].lineOptions)||void 0===b?void 0:b.strokeDasharray,opacity:.1}));var Nt=null!==K.state.activeLine&&K.state.activeLine===t;Q.push(u.createElement("circle",{id:"".concat(K._staticHighlightCircle,"_").concat(t),key:"".concat(K._staticHighlightCircle,"_").concat(t),r:5.5,cx:0,cy:0,fill:et.semanticColors.bodyBackground,strokeWidth:4,stroke:nt,visibility:Nt?"visibility":"hidden",onMouseMove:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOver:K._onMouseOverLargeDataset.bind(K,t,rt,ut),onMouseOut:K._handleMouseOut}))}else if(!K.props.optimizeLargeData)for(var Ot=function(n){var i=K._checkInGap(n,wt,xt),e=i.isInGap;xt=i.gapIndex;var r="".concat(K._lineId,"_").concat(t,"_").concat(n),a="".concat(K._borderId,"_").concat(t,"_").concat(n),l="".concat(K._circleId,"_").concat(t,"_").concat(n),s=K._points[t].data[n-1],c=s.x,f=s.y,d=s.xAxisCalloutData,v=s.xAxisCalloutAccessibilityData,h=K._points[t].data[n],p=h.x,g=h.y,y=K._xAxisScale(c),m=ut(f),b=K._xAxisScale(p),Y=ut(g),G=(null===(x=K._points[t].lineOptions)||void 0===x?void 0:x.strokeWidth)||K.props.strokeWidth||4,ot=K._legendHighlighted(tt)||K._noLegendHighlighted()||K.state.isSelectedLegend,lt=K._points[t].hideNonActiveDots&&it!==l,st=null===(C=null===(w=K._points[t].lineOptions)||void 0===w?void 0:w.mode)||void 0===C?void 0:C.includes("text"),ct=K._points[t].data[n-1].text,ft=K._points[t].data[n-1].markerSize;if(Us(y,m)){var dt=K._getPath(y,m,l,n,!1,K._points[t].index);Q.push((null===(k=null===(M=K._points[t].lineOptions)||void 0===M?void 0:M.mode)||void 0===k?void 0:k.includes("markers"))||st?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:l,key:l,r:ft?ft*at/q:4,cx:y,cy:m,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,c,d,l,v)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n-1].onDataPointClick),{opacity:ot&&!lt?1:.01,fill:K._getPointFill(nt,l,n,!1),stroke:nt,strokeWidth:G,role:"img","aria-label":null!==(A=K._points[t].data[n-1].text)&&void 0!==A?A:K._getAriaLabel(t,n-1)})),!K._isScatterPolar&&st&&ct&&u.createElement("text",{key:"".concat(l,"-label"),x:y,y:m+Math.max(ft?ft*at/q:4,4)+12,className:U.markerLabel,opacity:ot&&!lt?1:.01},ct)):u.createElement("path",(0,o.Cl)({id:l,key:l,d:dt,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,c,d,l,v)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n-1].onDataPointClick),{opacity:ot&&!lt?1:.01,fill:K._getPointFill(nt,l,n,!1),stroke:nt,strokeWidth:G,role:"img","aria-label":K._getAriaLabel(t,n-1)})))}if(n+1===K._points[t].data.length){var vt="".concat(l).concat(n,"L"),ht="".concat(l).concat(n,"D"),pt=K._points[t].hideNonActiveDots&&it!==vt,gt=K._points[t].data[n],yt=gt.xAxisCalloutData,mt=gt.xAxisCalloutAccessibilityData;ft=K._points[t].data[n].markerSize;var bt=null===(L=null===(S=K._points[t].lineOptions)||void 0===S?void 0:S.mode)||void 0===L?void 0:L.includes("text"),Ct=K._points[t].data[n].text;Us(b,Y)&&(dt=K._getPath(b,Y,vt,n,!0,K._points[t].index),Q.push(u.createElement(u.Fragment,{key:"".concat(vt,"_container")},(null===(D=null===(V=K._points[t].lineOptions)||void 0===V?void 0:V.mode)||void 0===D?void 0:D.includes("markers"))||bt?u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:vt,key:vt,r:ft?ft*at/q:4,cx:b,cy:Y,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,p,yt,vt,mt)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n].onDataPointClick),{opacity:ot&&!pt?1:.01,fill:K._getPointFill(nt,vt,n,!0),stroke:nt,strokeWidth:G,role:"img","aria-label":null!==(N=K._points[t].data[n].text)&&void 0!==N?N:K._getAriaLabel(t,n)})),!K._isScatterPolar&&bt&&Ct&&u.createElement("text",{key:"".concat(vt,"-label"),x:b,y:Y+Math.max(ft?ft*at/q:4,4)+12,className:U.markerLabel,opacity:ot&&!lt?1:.01},ct)):u.createElement("path",(0,o.Cl)({id:vt,key:vt,d:dt,"data-is-focusable":ot,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,onFocus:function(){return X._handleFocus(r,p,yt,vt,mt)},onBlur:K._handleMouseOut},K._getClickHandler(K._points[t].data[n].onDataPointClick),{opacity:ot&&!pt?1:.01,fill:K._getPointFill(nt,vt,n,!0),stroke:nt,strokeWidth:G,role:"img","aria-label":K._getAriaLabel(t,n)})),u.createElement("circle",{id:ht,key:ht,r:8,cx:b,cy:Y,opacity:0,width:0,onMouseOver:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseMove:K._handleHover.bind(K,p,g,rt,yt,vt,mt,ut,tt,nt),onMouseOut:K._handleMouseOut,strokeWidth:0,focusable:!1,onBlur:K._handleMouseOut}))))}if(Us(y,m)&&Us(b,Y)&&(!K._hasMarkersMode||(null===(T=null===(O=K._points[t].lineOptions)||void 0===O?void 0:O.mode)||void 0===T?void 0:T.includes("lines"))))if(ot){if(!e){var Mt=(null===(E=K._points[t].lineOptions)||void 0===E?void 0:E.lineBorderWidth)?Number.parseFloat(K._points[t].lineOptions.lineBorderWidth.toString()):0;Mt>0&&J.push(u.createElement("line",{id:a,key:a,x1:y,y1:m,x2:b,y2:Y,strokeLinecap:null!==(B=null===(F=K._points[t].lineOptions)||void 0===F?void 0:F.strokeLinecap)&&void 0!==B?B:"round",strokeWidth:Number.parseFloat(G.toString())+Mt,stroke:(null===(P=K._points[t].lineOptions)||void 0===P?void 0:P.lineBorderColor)||et.semanticColors.bodyBackground,opacity:1})),Z.push(u.createElement("line",(0,o.Cl)({id:r,key:r,x1:y,y1:m,x2:b,y2:Y,strokeWidth:G,ref:function(t){X._refCallback(t,r)},onMouseOver:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseMove:K._handleHover.bind(K,c,f,rt,d,l,v,ut,tt,nt),onMouseOut:K._handleMouseOut,stroke:nt,strokeLinecap:null!==(H=null===(_=K._points[t].lineOptions)||void 0===_?void 0:_.strokeLinecap)&&void 0!==H?H:"round",strokeDasharray:null===(I=K._points[t].lineOptions)||void 0===I?void 0:I.strokeDasharray,strokeDashoffset:null===(W=K._points[t].lineOptions)||void 0===W?void 0:W.strokeDashoffset,opacity:1},K._getClickHandler(K._points[t].onLineClick))))}}else e||Z.push(u.createElement("line",{id:r,key:r,x1:y,y1:m,x2:b,y2:Y,strokeWidth:G,stroke:nt,strokeLinecap:null!==($=null===(R=K._points[t].lineOptions)||void 0===R?void 0:R.strokeLinecap)&&void 0!==$?$:"round",strokeDasharray:null===(z=K._points[t].lineOptions)||void 0===z?void 0:z.strokeDasharray,strokeDashoffset:null===(j=K._points[t].lineOptions)||void 0===j?void 0:j.strokeDashoffset,opacity:.1}))},Tt=1;Tt<K._points[t].data.length;Tt++)Ot(Tt);K._isScatterPolar&&Q.push.apply(Q,cv({xAxisScale:K._xAxisScale,yAxisScale:ut,className:U.markerLabel||"",lineOptions:null===(Y=K._points[t])||void 0===Y?void 0:Y.lineOptions})),G.push(u.createElement("g",{key:"line_".concat(t),role:"region","aria-label":"".concat(tt,", line ").concat(t+1," of ").concat(K._points.length," with ").concat(K._points[t].data.length," data points.")},J,Z,Q))},K=this,J=this._points.length-1;J>=0;J--)Z(J);if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var Q=nl(t).call(this._xAxisScale);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var tt={tooltipCls:U.tooltip,id:this._tooltipId,axis:Q};Q&&ps(tt)}return G},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&this.props.data.lineChartData.filter((function(t){return t.data.length})).length>0)},n.defaultProps={enableReflow:!0,useUTC:!0,isCalloutForStack:!0},n}(u.Component),pv=(0,r.I)(hv,(function(t){return{tooltip:Ed(t.theme),markerLabel:Pd(t.theme)}})),gv=(0,a.Z)(),yv=u.forwardRef((function(t,n){var i,e,r,a=u.useMemo((function(){return p("circle")}),[]),s=u.useMemo((function(){return p("seriesID")}),[]),c=u.useMemo((function(){return p("verticalLine")}),[]),f=u.useMemo((function(){return p("ScatterChartTooltipId_")}),[]),d=u.useMemo((function(){return p("_ScatterChart_empty")}),[]),v=u.useRef(ct(t.data.scatterChartData)),h=u.useMemo((function(){return ds(v.current)||[]}),[v]),g=u.useRef(""),y=u.useRef(""),b=u.useRef(null),x=u.useMemo((function(){return[]}),[]),w=u.useRef(null),C=u.useRef([]),M=u.useRef(0),k=u.useRef(null),A=u.useRef(null),S=u.useState(""),L=S[0],V=S[1],D=u.useState(""),N=D[0],O=D[1],T=u.useState([]),E=T[0],F=T[1],B=u.useState([]),P=B[0],_=B[1],H=u.useState(!1),I=H[0],W=H[1],R=u.useState(""),$=R[0],z=R[1],j=u.useState(),Y=j[0],X=j[1],G=u.useState(!1),q=G[0],U=G[1],Z=u.useState((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),K=Z[0],J=Z[1],Q=u.useState(""),tt=Q[0],nt=Q[1],it=u.useRef(void 0),et=u.useRef(!1),rt=u.useRef(!1),ot=gv(t.styles,{theme:t.theme});u.useEffect((function(){var n,i,e;it.current&&!Bs(it.current,null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&J((null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),it.current=null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends}),[null===(e=t.legendProps)||void 0===e?void 0:e.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=k.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Pf(null===(n=k.current)||void 0===n?void 0:n.chartContainer,null===(i=A.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var ut=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0?Ls(t.data.scatterChartData[0].data[0].x,!0):jl.StringAxis,at=t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData[0].data&&t.data.scatterChartData[0].data.length>0&&"string"==typeof t.data.scatterChartData[0].data[0].y?Yl.StringAxis:Yl.NumericAxis,lt=u.useRef([]),st=u.useRef([]);function ct(t){return t?t.map((function(t,n){var i;return i=void 0===t.color?Jl(n,0):Ql(t.color),(0,o.Cl)((0,o.Cl)({},t),{index:-1,color:i})})):[]}u.useEffect((function(){v.current===ct(t.data.scatterChartData)&&t.data===v.current||(lt.current=ct(t.data.scatterChartData),st.current=ds(lt.current))}),[t.height,t.width,t.data,v]);var ft=u.useCallback((function(t){w.current=t}),[]);function dt(){_([]),W(!1)}function vt(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?J(n):J(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}var ht=u.useCallback((function(n,i){var e=t.theme;return $===i?e.semanticColors.bodyBackground:n}),[$,t]),pt=u.useCallback((function(n,i,e,r,o,u,a,l){return u===jl.NumericAxis?ys(n,i,e,o,t.xScaleType,!0):u===jl.DateAxis?ws(n,i,e,o,l,r):xs(i,e,o)}),[t.xScaleType]),gt=u.useCallback((function(n,i,e,r,o){b.current=r;var u=i instanceof Date?(0,_n.Yn)(i,t.culture,t.useUTC):i,a=i instanceof Date?i.getTime():i,l=m(h,(function(t){return t.x===a}));l?(nl("#".concat(c)).attr("transform",(function(){var t;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,i))+M.current,", 0)")})).attr("visibility","visibility"),x.forEach((function(t){t.index===n&&(U(!0),V(e||""+u),nt("#".concat(r)),F(l.values),z(r))}))):z(r)}),[c,g,M,h,x,t.culture,t.useUTC]),yt=u.useCallback((function(n,i,e,r,o,u,a){var l;null==a||a.persist();var s=n instanceof Date?(0,_n.Yn)(n,t.culture,t.useUTC):n,f=n instanceof Date?n.getTime():n,d=m(h,(function(t){return t.x===f}));d?(nl("#".concat(c)).attr("transform",(function(){var t,e;return"translate(".concat((null===(t=g.current)||void 0===t?void 0:t.call(g,n))+M.current,", ").concat(null===(e=y.current)||void 0===e?void 0:e.call(y,i),")")})).attr("visibility","visibility").attr("y2","".concat(e-(null===(l=y.current)||void 0===l?void 0:l.call(y,i)))),b.current!==o&&(b.current=o,U(!0),V(r||""+s),nt("#".concat(o)),F(d.values),X(d),z(o))):z(o)}),[c,g,M,h,t.culture,t.useUTC]),mt=u.useCallback((function(){nl("#".concat(c)).attr("visibility","hidden")}),[c]),bt=u.useCallback((function(){b.current=null,z(""),q&&U(!1)}),[b,q,z,U]),xt=u.useCallback((function(){return K.length>0?K:N?[N]:[]}),[K,N]),wt=u.useCallback((function(){return 0===xt().length}),[xt]),Ct=u.useCallback((function(t){return xt().includes(t)}),[xt]),Mt=u.useCallback((function(n,i){var e,r,o=null===(e=v.current)||void 0===e?void 0:e[n],u=o.data[i],a=u.x instanceof Date?(0,_n.Yn)(u.x,t.culture,t.useUTC):u.x,l=u.xAxisCalloutData||a,s=o.legend,c=u.yAxisCalloutData||u.y;return(null===(r=u.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(l,". ").concat(s,", ").concat(c,".")}),[v,t.culture,t.useUTC]),kt=u.useCallback((function(n,i){var e,r,l,c,d,h,p,m,b,x,C,k,A,S,L,V,D,N,O,T,E,F,B,_,H,W,R,z,j,Y,X,G,q,U,Z=[];v.current=I?P:ct(t.data.scatterChartData),ut===jl.StringAxis&&(M.current=(null===(e=g.current)||void 0===e?void 0:e.bandwidth())/2);for(var K=ri(v.current,(function(t){return ri(t.data,(function(t){return t.markerSize}))})),J=ut!==jl.StringAxis&&at!==Yl.StringAxis?Ks({data:v.current,xScale:g.current,yScalePrimary:y.current,xScaleType:t.xScaleType,yScaleType:t.yScaleType}):0,Q=function(t){for(var n=[],e=null===(c=null===(l=v.current)||void 0===l?void 0:l[t])||void 0===c?void 0:c.legend,r=null===(h=null===(d=v.current)||void 0===d?void 0:d[t])||void 0===h?void 0:h.color,f=i-(null!==(m=null===(p=w.current)||void 0===p?void 0:p.bottom)&&void 0!==m?m:0)+6,P=function(i){var l=null===(A=null===(k=v.current)||void 0===k?void 0:k[t])||void 0===A?void 0:A.data[i],c=l.x,d=l.y,h=l.xAxisCalloutData,p=l.xAxisCalloutAccessibilityData,m=null===(S=g.current)||void 0===S?void 0:S.call(g,c),b=at===Yl.StringAxis?(null===(L=y.current)||void 0===L?void 0:L.call(y,d))+((null===(V=y.current)||void 0===V?void 0:V.bandwidth)?y.current.bandwidth()/2:0):null===(D=y.current)||void 0===D?void 0:D.call(y,d);if(!Us(m,b))return"continue";var x,w="".concat(s,"_").concat(t,"_").concat(i),C="".concat(a,"_").concat(t,"_").concat(i),P=(null===(O=null===(N=v.current)||void 0===N?void 0:N[t])||void 0===O?void 0:O.data[i]).markerSize,j=P&&0!==K?ut!==jl.StringAxis?P*J/K:4+(P-4)/(K-4)*12:$===C?6:4,Y=Ct(e)||wt()||I,X=(null===(E=null===(T=v.current)||void 0===T?void 0:T[t])||void 0===E?void 0:E.hideNonActiveDots)&&$!==C,G=null===(B=null===(F=v.current)||void 0===F?void 0:F[t].data[i])||void 0===B?void 0:B.text;rt.current||n.push(u.createElement(u.Fragment,null,u.createElement("circle",(0,o.Cl)({id:C,key:C,r:Math.max(j,4),cx:m+M.current,cy:b,"data-is-focusable":Y,onMouseOver:function(t){return yt(c,d,f,h,C,p,t)},onMouseMove:function(t){return yt(c,d,f,h,C,p,t)},onMouseOut:mt,onFocus:function(){return gt(w,c,h,C,p)},onBlur:mt},(x=null===(W=null===(H=null===(_=v.current)||void 0===_?void 0:_[t])||void 0===H?void 0:H.data[i])||void 0===W?void 0:W.onDataPointClick)?{onClick:x}:{},{opacity:Y&&!X?1:.1,fill:ht(r,C),stroke:r,role:"img","aria-label":Mt(t,i),tabIndex:""!==(null===(z=null===(R=v.current)||void 0===R?void 0:R[t])||void 0===z?void 0:z.legend)?0:void 0})))),rt&&G&&n.push(u.createElement("text",{key:"".concat(C,"-label"),x:m+M.current,y:b+Math.max(j+12,16),className:ot.markerLabel},G))},Q=0;Q<(null===(C=null===(x=null===(b=v.current)||void 0===b?void 0:b[t])||void 0===x?void 0:x.data)||void 0===C?void 0:C.length);Q++)P(Q);et.current&&n.push.apply(n,cv({xAxisScale:g.current,yAxisScale:y.current,className:ot.markerLabel||"",lineOptions:null===(Y=null===(j=v.current)||void 0===j?void 0:j[t])||void 0===Y?void 0:Y.lineOptions})),Z.push(u.createElement("g",{key:"series_".concat(t),role:"region","aria-label":"".concat(e,", series ").concat(t+1," of ").concat(null===(X=v.current)||void 0===X?void 0:X.length," with ").concat(null===(U=null===(q=null===(G=v.current)||void 0===G?void 0:G[t])||void 0===q?void 0:q.data)||void 0===U?void 0:U.length," data points.")},n))},tt=(null===(r=v.current)||void 0===r?void 0:r.length)-1;tt>=0;tt--)Q(tt);if(!t.showXAxisLablesTooltip)try{document.getElementById(f)&&document.getElementById(f).remove()}catch(t){}if(!t.wrapXAxisLables&&t.showXAxisLablesTooltip){var nt=nl(n).call(g.current);try{document.getElementById(f)&&document.getElementById(f).remove()}catch(t){}var it={tooltipCls:ot.tooltip,id:f,xAxis:nt};nt&&ps(it)}return Z}),[g,y,t.data.scatterChartData,t.showXAxisLablesTooltip,t.wrapXAxisLables,a,Mt,ht,gt,yt,mt,Ct,wt,s,f,ut,at,$,I,P,ot,t.xScaleType,t.yScaleType]),At=u.useCallback((function(t,n,i,e,r){g.current=t,y.current=n,et.current=js(v.current),rt.current=function(t){return t.some((function(t){var n;return"string"==typeof(null===(n=t.lineOptions)||void 0===n?void 0:n.mode)&&"text"===t.lineOptions.mode}))}(v.current),C.current=kt(r,i)}),[C,g,y,kt]),St=u.useCallback((function(n,i){var e=Cs(n,0,void 0,t.yScaleType),r=e.startValue,o=e.endValue,u=Gs(r,o,t.yScaleType);return{startValue:r-u.start,endValue:o+u.end}}),[t.yScaleType]),Lt=t.legendProps,Vt=t.tickValues,Dt=t.tickFormat;v.current=ct(t.data.scatterChartData);var Nt=v.current;Lt&&Lt.canSelectMultipleLegends&&(Nt=P.length>=1?P:v.current,h=ds(Nt));var Ot=null;t.hideLegend||rt.current||(Ot=function(n){var i=t.legendProps,e=!(!i||!i.canSelectMultipleLegends),r={};n.forEach((function(t){t.legend&&(r[t.legend]||(r[t.legend]=[]),r[t.legend].push(t))}));var a=Object.entries(r).map((function(t){var n=t[0],i=t[1][0];return(0,o.Cl)({title:n,color:i.color,onMouseOutAction:function(){O("")},hoverAction:function(){bt(),O(n)}},i.legendShape&&{shape:i.legendShape})}));return u.createElement(jf,(0,o.Cl)({legends:(0,o.fX)([],a,!0),enabledWrapLines:t.enabledLegendsWrapLines,overflowProps:t.legendsOverflowProps,focusZonePropsInHoverCard:t.focusZonePropsForLegendsInHoverCard,overflowText:t.legendsOverflowText},e&&{onLegendHoverCardLeave:dt},{onChange:vt},t.legendProps))}(v.current));var Tt=(0,o.Cl)({isCalloutVisible:q,directionalHint:3,YValueHover:E,hoverXValue:L,id:"toolTip".concat(b.current),target:tt,isBeakVisible:!1,gapSpace:15,onDismiss:function(){U(!1)},preventDismissOnEvent:function(){return!0},hidden:!(!t.hideTooltip&&q),descriptionMessage:t.getCalloutDescriptionMessage&&Y?t.getCalloutDescriptionMessage(Y):void 0,"data-is-focusable":!0,xAxisCalloutAccessibilityData:{}},t.calloutProps),Et={tickValues:Vt,tickFormat:Dt},Ft=v.current.map((function(t){return t.data.map((function(t){return t.x}))})).flat();r=Array.from(new Set(Ft));var Bt=function(){var n;if(at!==Yl.StringAxis||"default"===t.yAxisCategoryOrder){for(var i=new Set,e=v.current.length-1;e>=0;e--){var r=v.current[e];if(r.data&&Array.isArray(r.data))for(var o=0,u=r.data;o<u.length;o++){var a=u[o];"string"==typeof a.y&&i.add(a.y)}}return Array.from(i)}return $s((n={},v.current.forEach((function(t){t.data&&Array.isArray(t.data)&&t.data.forEach((function(t){"string"==typeof t.y&&(n[t.y]||(n[t.y]=[]),"number"==typeof t.x&&n[t.y].push(t.x))}))})),n),t.yAxisCategoryOrder)}();return t.data&&t.data.scatterChartData&&t.data.scatterChartData.length>0&&t.data.scatterChartData.filter((function(t){return t.data.length})).length>0?u.createElement(qd,(0,o.Cl)({},t,{ref:k,chartTitle:t.data.chartTitle,isCalloutForStack:!0,points:Nt,chartType:zl.ScatterChart,calloutProps:Tt,tickParams:Et,legendBars:Ot,getmargins:ft,getMinMaxOfYAxis:St,getDomainNRangeValues:pt,createYAxis:ss,createStringYAxis:fs,getGraphData:At,xAxisType:ut,yAxisType:at},at===Yl.StringAxis?{stringDatasetForYAxisDomain:Bt}:{},{onChartMouseLeave:bt,enableFirstRenderOptimization:!0,datasetForXAxisDomain:r,componentRef:k},et.current?{yMaxValue:1,yMinValue:-1}:{},{children:function(t){return g.current=t.xScale,y.current=t.yScalePrimary,u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("line",{x1:0,y1:0,x2:0,y2:t.containerHeight,stroke:"#323130",id:c,visibility:"hidden",strokeDasharray:"5,5"}),u.createElement("g",null,C.current)))}})):u.createElement("div",{id:d,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));yv.displayName="ScatterChart";var mv=(0,r.I)(yv,(function(t){return{tooltip:Ed(t.theme),markerLabel:Pd(t.theme)}}));function bv(t,n){if((r=t.length)>1)for(var i,e,r,o=1,u=t[n[0]],a=u.length;o<r;++o)for(e=u,u=t[n[o]],i=0;i<a;++i)u[i][1]+=u[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function xv(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function wv(t,n){return t[n]}function Cv(t){const n=[];return n.key=t,n}function Mv(t){return t<0?-1:1}function kv(t,n,i){var e=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(e||r<0&&-0),u=(i-t._y1)/(r||e<0&&-0),a=(o*r+u*e)/(e+r);return(Mv(o)+Mv(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Av(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Sv(t,n,i){var e=t._x0,r=t._y0,o=t._x1,u=t._y1,a=(o-e)/3;t._context.bezierCurveTo(e+a,r+a*n,o-a,u-a*i,o,u)}function Lv(t){this._context=t}function Vv(t){this._context=t}function Dv(t){return new Lv(t)}function Nv(t,n,i){var e=null,r=Xf(!0),o=null,u=rl,a=null,l=hd(s);function s(s){var c,f,d,v,h,p=(s=Yf(s)).length,g=!1,y=new Array(p),m=new Array(p);for(null==o&&(a=u(h=l())),c=0;c<=p;++c){if(!(c<p&&r(v=s[c],c,s))===g)if(g=!g)f=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=c-1;d>=f;--d)a.point(y[d],m[d]);a.lineEnd(),a.areaEnd()}g&&(y[c]=+t(v,c,s),m[c]=+n(v,c,s),a.point(e?+e(v,c,s):y[c],i?+i(v,c,s):m[c]))}if(h)return a=null,h+""||null}function c(){return Rd().defined(r).curve(u).context(o)}return t="function"==typeof t?t:void 0===t?Id:Xf(+t),n="function"==typeof n?n:Xf(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?Wd:Xf(+i),s.x=function(n){return arguments.length?(t="function"==typeof n?n:Xf(+n),e=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:Xf(+n),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Xf(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:Xf(+t),i=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:Xf(+t),s):n},s.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Xf(+t),s):i},s.lineX0=s.lineY0=function(){return c().x(t).y(n)},s.lineY1=function(){return c().x(t).y(i)},s.lineX1=function(){return c().x(e).y(n)},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Xf(!!t),s):r},s.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),s):u},s.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),s):o},s}Lv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Sv(this,this._t0,Av(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Sv(this,Av(this,i=kv(this,t,n)),i);break;default:Sv(this,this._t0,i=kv(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(function(t){this._context=new Vv(t)}.prototype=Object.create(Lv.prototype)).point=function(t,n){Lv.prototype.point.call(this,n,t)},Vv.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,r,o){this._context.bezierCurveTo(n,t,e,i,o,r)}};var Ov,Tv=(0,a.Z)(),Ev=vi((function(t){return t.x})).left;!function(t){t.show="visibility",t.hide="hidden"}(Ov||(Ov={}));var Fv=function(t){function n(n){var i,e=t.call(this,n)||this;return e._containsSecondaryYAxis=!1,e._hasDuplicateXValues=!1,e._hasMissingXValues=!1,e.toImage=function(t){var n,i;return Pf(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},e._getMinMaxOfYAxis=function(t,n,i){return Cs(t,0,i)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a){return o===jl.NumericAxis?ys(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}},e._getMargins=function(t){e.margins=t},e._onRectMouseMove=function(t){t.persist();var n=e.props.data.lineChartData,i=e._xAxisRectScale.invert(Hd(t)[0],document.getElementById(e._rectId)),r=Ev(n[0].data,i),u=n[0].data[r-1],a=n[0].data[r],l=null,s=null,c=n[0].data.length>0?Ls(n[0].data[0].x,!0):null;if(void 0===u&&void 0!==a)l=a.x,s=r;else if(void 0!==u&&void 0===a)l=u.x,s=r-1;else{var f=void 0,d=void 0,v=void 0;switch(c){case jl.DateAxis:f=new Date(i).getTime(),d=u.x.getTime(),v=a.x.getTime(),l=Math.abs(f-d)>Math.abs(f-v)?a.x:u.x,s=Math.abs(f-d)>Math.abs(f-v)?r:r-1;break;case jl.NumericAxis:f=i,d=u.x,v=a.x,l=Math.abs(f-d)>Math.abs(f-v)?a.x:u.x,s=Math.abs(f-d)>Math.abs(f-v)?r:r-1}}var h=n[0].data[s],p=h.xAxisCalloutData,g=h.xAxisCalloutAccessibilityData,y=l instanceof Date?(0,_n.Yn)(l,e.props.culture,e.props.useUTC):l,b=l instanceof Date?l.getTime():l,x=m(e._calloutPoints,(function(t){return t.x===b})),w=c===jl.DateAxis?l.getTime():l,C=e.state.nearestCircleToHighlight!==w;if(x&&C&&!e.state.isShowCalloutPending){var M=e._getFilteredLegendValues(x.values);e.setState({nearestCircleToHighlight:w,isCalloutVisible:!1,isShowCalloutPending:!0,lineXValue:e._xAxisRectScale(l),displayOfLine:Ov.show,isCircleClicked:!1,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},x),{values:M}),YValueHover:M,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},x),{values:M}),hoverXValue:p||y,xAxisCalloutAccessibilityData:g,activePoint:""})}x||e.setState({isCalloutVisible:!1,nearestCircleToHighlight:w,displayOfLine:Ov.hide,isCircleClicked:!1})},e._onRectMouseOut=function(){},e._handleChartMouseLeave=function(){e.setState({refSelected:null,isCalloutVisible:!1,nearestCircleToHighlight:null,lineXValue:0,displayOfLine:Ov.hide,isCircleClicked:!1,stackCalloutProps:void 0,dataPointCalloutProps:void 0,hoverXValue:void 0,YValueHover:[]})},e._getDataPoints=function(t,n){var i,r=[],o=0;if(e._shouldFillToZeroY())t.forEach((function(t,i){var e=[];n.forEach((function(n){e.push({values:[0,n[t]],xVal:n.xVal}),n[t]>o&&(o=n[t])})),r.push(e)}));else{var u=function(){var t=Xf([]),n=xv,i=bv,e=wv;function r(r){var o,u,a=Array.from(t.apply(this,arguments),Cv),l=a.length,s=-1;for(const t of r)for(o=0,++s;o<l;++o)(a[o][s]=[0,+e(t,a[o].key,s,r)]).data=t;for(o=0,u=Yf(n(a));o<l;++o)a[u[o]].index=o;return i(a,u),a}return r.keys=function(n){return arguments.length?(t="function"==typeof n?n:Xf(Array.from(n)),r):t},r.value=function(t){return arguments.length?(e="function"==typeof t?t:Xf(+t),r):e},r.order=function(t){return arguments.length?(n=null==t?xv:"function"==typeof t?t:Xf(Array.from(t)),r):n},r.offset=function(t){return arguments.length?(i=null==t?bv:t,r):i},r}().keys(t)(n);o=ri(u[u.length-1],(function(t){return t[1]})),u.forEach((function(t){var n=[];t.forEach((function(t){n.push({values:t,xVal:t.data.xVal})})),r.push(n)}))}return e._isMultiStackChart=!!((null===(i=e.props.legendProps)||void 0===i?void 0:i.selectedLegends)?(null==r?void 0:r.length)>=1:(null==r?void 0:r.length)>1),{renderData:r,maxOfYVal:e._containsSecondaryYAxis?Cs(e.props.data.lineChartData).endValue:o}},e._createDataSet=function(t){if(e.props.enablePerfOptimization&&e._enableComputationOptimization&&!e._hasDuplicateXValues){var n=[],i=[],r=[],o=[],u=ds(t);t&&t.length&&t.forEach((function(t){r.push(t.color),o.push(t.opacity||1),n.push.apply(n,t.data)}));var a={};n.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;a[n]?a[n].push(t):a[n]=[t]})),Object.keys(a).forEach((function(t){var n=a[t],e={};n.forEach((function(t,n){e.xVal=t.x,e["chart".concat(n)]=t.y})),i.push(e)}));for(var l=i&&Object.keys(i[0]).length,s=[],c=0;c<l-1;c++){var f="chart".concat(c);s.push(f)}var d=e._getDataPoints(s,i);return{colors:r,opacity:o,keys:s,data:d,calloutPoints:u}}var v=[],h=[],p=[],g=[],y=(u=ds(t),d={},s=[],0);if(t&&t.length&&t.forEach((function(t){e._hasDuplicateXValues&&!t.legend&&(t.legend="chart".concat(y),++y),t.data.forEach((function(n){n.legend=t.legend})),p.push(t.color),g.push(t.opacity||1),v.push.apply(v,t.data)})),e._hasDuplicateXValues){var m=e._createDatasetForXCoordinateWithMultipleYValues(v);d=e._getDataPoints(m.keys,m.filteredDataSet)}else{for(var b=v,x=function(){var t=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x,n=b.filter((function(n){return(n.x instanceof Date?n.x.toLocaleString():n.x)===t})),i={};n.forEach((function(t,n){i.xVal=t.x,i["chart".concat(n)]=t.y})),h.push(i);var e=b[0].x instanceof Date?b[0].x.toLocaleString():b[0].x;b=b.filter((function(t){return(t.x instanceof Date?t.x.toLocaleString():t.x)!==e}))};b.length;)x();for(l=h&&Object.keys(h[0]).length,c=0;c<l-1;c++)f="chart".concat(c),s.push(f);d=e._getDataPoints(s,h)}return{colors:p,opacity:g,keys:s,data:d,calloutPoints:u}},e._createDatasetForXCoordinateWithMultipleYValues=function(t){var n=[],i={};t.forEach((function(t){var n=t.x instanceof Date?t.x.toLocaleString():t.x;i[n]||(i[n]=[]),i[n].push(t)})),Object.keys(i).forEach((function(t){var e=i[t];e.forEach((function(t,i){var r={xVal:e[0].x};r[t.legend?t.legend:"chart".concat(i)]=t.y,n.push(r)}))}));var e=[];n.forEach((function(t){Object.keys(t).forEach((function(t){"xVal"===t||e.includes(t)||e.push(t)}))})),n.forEach((function(t){e.forEach((function(n){t[n]||(t[n]=0)}))}));var r=n.filter((function(t){return e.some((function(n){return 0!==t[n]}))}));return{keys:Array.from(new Set(r.flatMap((function(t){return Object.keys(t).filter((function(t){return"xVal"!==t}))})))),filteredDataSet:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._getGraphData=function(t,n,i,r,o,u,a){e._chart=e._drawGraph(i,t,n,a,o)},e._getLegendData=function(t){var n=[];return t.forEach((function(t){var i=t.color;if(!(n.filter((function(n){return n.title===t.legend&&n.color===i})).length>0)){var r={title:t.legend,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(t.legend)},onMouseOutAction:function(){e._onLegendLeave()}};n.push(r)}})),u.createElement(jf,(0,o.Cl)({legends:n,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._onDataPointClick=function(t){t&&t(),e.setState({isCircleClicked:!0})},e._getOpacity=function(t){return e._isMultiStackChart?e._legendHighlighted(t)||e._noLegendHighlighted()?.7:.1:.7},e._getLineOpacity=function(t){if(e._isMultiStackChart){var n=.3;return e.state.isCalloutVisible&&(n=1),e._noLegendHighlighted()||(n=e._legendHighlighted(t)?0:.1),n}return 1},e._updateCircleFillColor=function(t,n,i){var r=n;return e.state.nearestCircleToHighlight!==t&&e.state.activePoint!==i||(e._highlightedCircleId=i,e.state.isCircleClicked||(r=e.props.theme.semanticColors.bodyBackground)),r},e._drawGraph=function(t,n,i,r,a){var l,s=e._addDefaultColors(e.props.data.lineChartData),c=e.props.data,f=c.pointOptions,d=c.pointLineOptions,v=[];e._data.forEach((function(t,a){var l,c,f,d,h,p,g,y,m,b,x,w,C=(null===(l=s[a])||void 0===l?void 0:l.useSecondaryYScale)&&r?r:i,M=Ws(null===(f=null===(c=s[a])||void 0===c?void 0:c.lineOptions)||void 0===f?void 0:f.curve,Dv),k=Nv().x((function(t){return n(t.xVal)})).y0((function(t){return C(t.values[0])})).y1((function(t){return C(t.values[1])})).curve(M),A=Rd().x((function(t){return n(t.xVal)})).y((function(t){return C(t.values[1])})).curve(M),S=e._shouldFillToZeroY()?.8:e._opacity[a];v.push(u.createElement(u.Fragment,{key:"".concat(a,"-graph-").concat(e._uniqueIdForGraph)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:"gradient_".concat(a),x1:"0%",x2:"0%",y1:"0%",y2:"100%"},u.createElement("stop",{offset:"0",stopColor:e._colors[a]}),u.createElement("stop",{offset:"100%",stopColor:"transparent"}))),u.createElement("path",{id:"".concat(a,"-line-").concat(e._uniqueIdForGraph),d:A(t),fill:"transparent",strokeWidth:null!==(p=null===(h=null===(d=s[a])||void 0===d?void 0:d.lineOptions)||void 0===h?void 0:h.strokeWidth)&&void 0!==p?p:3,stroke:e._colors[a],opacity:e._getLineOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove,strokeDasharray:null===(y=null===(g=s[a])||void 0===g?void 0:g.lineOptions)||void 0===y?void 0:y.strokeDasharray,strokeDashoffset:null===(b=null===(m=s[a])||void 0===m?void 0:m.lineOptions)||void 0===b?void 0:b.strokeDashoffset,strokeLinecap:null===(w=null===(x=s[a])||void 0===x?void 0:x.lineOptions)||void 0===w?void 0:w.strokeLinecap}),1===t.length?u.createElement("circle",{id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),cx:n(t[0].xVal),cy:C(t[0].values[1]),r:6,stroke:e._colors[a],strokeWidth:3,fill:e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove}):u.createElement("path",(0,o.Cl)({id:"".concat(a,"-graph-").concat(e._uniqueIdForGraph),d:k(t),fill:e.props.enableGradient?"url(#gradient_".concat(a,")"):e._colors[a],opacity:S,fillOpacity:e._getOpacity(s[a].legend),onMouseMove:e._onRectMouseMove,onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e.props.optimizeLargeData&&{"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),role:"img","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")}))))}));var h=f&&f.r?Number(f.r):8;e._data.forEach((function(t,a){var c;if(s.length!==a){var d=(null===(c=s[a])||void 0===c?void 0:c.useSecondaryYScale)&&r?r:i;e.props.optimizeLargeData&&1!==t.length?t.forEach((function(t,i){var r=t.xVal instanceof Date?t.xVal.getTime():t.xVal;if(e.state.nearestCircleToHighlight===r){var c="".concat(e._circleId,"_").concat(a*e._data[0].length+i);l=s[a].color;var p=s[a].legend;v.push(u.createElement("circle",(0,o.Cl)({key:c,id:c,cx:n(t.xVal),cy:d(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(r,l,c),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),Fs(f),{r:e._getCircleRadius(r,h,c,p)})))}})):v.push(u.createElement("g",{key:"".concat(a,"-dots-").concat(e._uniqueIdForGraph),clipPath:"url(#clip)",role:"region","aria-label":"".concat(s[a].legend,", series ").concat(a+1," of ").concat(s.length," with ").concat(s[a].data.length," data points.")},t.map((function(t,i){var r="".concat(e._circleId,"_").concat(a*e._data[0].length+i),c=t.xVal instanceof Date?t.xVal.getTime():t.xVal;l=s[a].color;var v=s[a].legend;return u.createElement("circle",(0,o.Cl)({key:r,id:r,"data-is-focusable":e._legendHighlighted(s[a].legend)||e._noLegendHighlighted(),cx:n(t.xVal),cy:d(t.values[1]),stroke:l,strokeWidth:3,fill:e._updateCircleFillColor(c,l,r),onMouseOut:e._onRectMouseOut,onMouseOver:e._onRectMouseMove},e._getOnClickHandler(s,a,i),{onFocus:function(){return e._handleFocus(a,i,r)},onBlur:e._handleBlur},Fs(f),{r:e._getCircleRadius(c,h,r,v),role:"img","aria-label":!e._hasDuplicateXValues&&!e._hasMissingXValues&&e._getAriaLabel(a,i)||void 0}))}))))}})),v.push(u.createElement("line",(0,o.Cl)({id:e._verticalLineId,key:e._verticalLineId,x1:e.state.lineXValue,y1:0,x2:e.state.lineXValue,y2:t,strokeWidth:1,strokeDasharray:5.5,stroke:l,opacity:.5,visibility:e.state.displayOfLine},Fs(d))));var p=Tv(e.props.styles,{theme:e.props.theme});if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=nl(a).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:p.tooltip,id:e._tooltipId,axis:g};g&&ps(y)}return v},e._getOnClickHandler=function(t,n,i){return!e._hasDuplicateXValues&&!e._hasMissingXValues&&{onClick:e._onDataPointClick.bind(e,t[n].data[i].onDataPointClick)}},e._getCircleRadius=function(t,n,i,r){var o=e.state,u=o.isCircleClicked,a=o.nearestCircleToHighlight,l=o.activePoint;return e._noLegendHighlighted()||e._legendHighlighted(r)?u&&a===t?1:a===t||l===i?n:0:0},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._addDefaultColors=function(t){if(e._hasMissingXValues){var n=new Set;t&&t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))})),t&&t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||t.data.push({x:"string"==typeof n?new Date(n):n,y:0,legend:t.legend})})),t.data.sort((function(t,n){var i=t.x instanceof Date?t.x.getTime():t.x,e=n.x instanceof Date?n.x.getTime():n.x;return i<e?-1:i>e?1:0}))}))}return t?t.map((function(t,n){var i,r,u;return u=void 0===t.color?Jl(n,0,null===(i=e.props.theme)||void 0===i?void 0:i.isInverted):Ql(t.color,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),(0,o.Cl)((0,o.Cl)({},t),{color:u})})):[]},e._handleFocus=function(t,n,i){var r=e.props.data.lineChartData[t].data[n],u=r.x,a=r.y,l=r.xAxisCalloutData,s=u instanceof Date?(0,_n.Yn)(u,e.props.culture,e.props.useUTC):u,c=u instanceof Date?u.getTime():u,f=e._calloutPoints.find((function(t){return t.x===c}));f.values=f.values.filter((function(t){return t.y===a}));var d=e._getFilteredLegendValues(f.values);e.setState({refSelected:"#".concat(i),isCalloutVisible:!0,hoverXValue:l||s,YValueHover:d,stackCalloutProps:(0,o.Cl)((0,o.Cl)({},f),{values:d}),dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},f),{values:d}),activePoint:i})},e._getFilteredLegendValues=function(t){return e._noLegendHighlighted()?t:t.filter((function(t){return e._legendHighlighted(t.legend)}))},e._handleBlur=function(){e.setState({refSelected:null,isCalloutVisible:!1,hoverXValue:void 0,YValueHover:[],stackCalloutProps:void 0,dataPointCalloutProps:void 0,activePoint:""})},e._getChartTitle=function(){var t=e.props.data,n=t.chartTitle,i=t.lineChartData;return(n?"".concat(n,". "):"")+"Area chart with ".concat((null==i?void 0:i.length)||0," data series. ")},lc(e),e._createSet=(0,an.J9)(e._createDataSet),e.state={selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,hoverXValue:"",isCalloutVisible:!1,refSelected:null,YValueHover:[],lineXValue:0,displayOfLine:Ov.hide,isCircleClicked:!1,nearestCircleToHighlight:null,isShowCalloutPending:!1,activePoint:""},e._hasMissingXValues=e._containsMissingXValues(),e._uniqueIdForGraph=p("areaChart_"),e._verticalLineId=p("verticalLine_"),e._circleId=p("circle"),e._rectId=p("rectangle"),e._tooltipId=p("AreaChartTooltipID"),e._enableComputationOptimization=!0,e._firstRenderOptimization=!0,e._emptyChartId=p("_AreaChart_empty"),e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),this.state.isShowCalloutPending&&this.setState({refSelected:"#".concat(this._highlightedCircleId),isCalloutVisible:!0,isShowCalloutPending:!1})},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props.data.lineChartData,i=this._addDefaultColors(n);this._hasDuplicateXValues=this._xCoordinateContainsMultipleY(),this._containsSecondaryYAxis=!!this.props.secondaryYScaleOptions&&i.some((function(t){return t.useSecondaryYScale}));var e=this._createSet(i),r=e.colors,a=e.opacity,l=e.data,s=e.calloutPoints;this._calloutPoints=s;var c=gs(i);this._colors=r,this._opacity=a,this._data=l.renderData;var f=this._getLegendData(i),d={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat},v=(0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible&&!this._hasDuplicateXValues&&!this._hasMissingXValues,directionalHint:3,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,id:"toolTip".concat(this._uniqueCallOutID),gapSpace:15,isBeakVisible:!1,onDismiss:this._closeCallout,"data-is-focusable":!0,xAxisCalloutAccessibilityData:this.state.xAxisCalloutAccessibilityData},this.props.calloutProps);return u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:i,chartType:zl.AreaChart,calloutProps:v,legendBars:f,createYAxis:ss,isCalloutForStack:!0,xAxisType:c?jl.DateAxis:jl.NumericAxis,tickParams:d,maxOfYVal:l.maxOfYVal,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:fs,getmargins:this._getMargins,getMinMaxOfYAxis:this._getMinMaxOfYAxis,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,enableFirstRenderOptimization:this.props.enablePerfOptimization&&this._firstRenderOptimization,ref:this._cartesianChartRef,children:function(n){t._xAxisRectScale=n.xScale;var i=t._xAxisRectScale.ticks(),e=t._xAxisRectScale(i[i.length-1]),r=n.containerHeight-t.margins.top;return u.createElement(u.Fragment,null,u.createElement("g",null,u.createElement("rect",{id:t._rectId,width:e,height:r,fill:"transparent",onMouseMove:t._onRectMouseMove,onMouseOut:t._onRectMouseOut,onMouseOver:t._onRectMouseMove})),u.createElement("g",null,t._chart))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._getAriaLabel=function(t,n){var i,e=this.props.data.lineChartData[t],r=e.data[n],o=r.x instanceof Date?(0,_n.Yn)(r.x,this.props.culture,this.props.useUTC):r.x,u=r.xAxisCalloutData||o,a=e.legend,l=r.yAxisCalloutData||r.y;return(null===(i=r.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(u,". ").concat(a,", ").concat(l,".")},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n.prototype._xCoordinateContainsMultipleY=function(){var t=this.props.data.lineChartData;if(!t)return!1;for(var n=0,i=t;n<i.length;n++)for(var e={},r=0,o=i[n].data;r<o.length;r++){var u=o[r],a=u.x instanceof Date?u.x.toLocaleString():u.x;if(e[a]||(e[a]=[]),e[a].push(u.y),e[a].length>1)return!0}return!1},n.prototype._containsMissingXValues=function(){var t=this.props.data.lineChartData;if(!t)return!1;var n=new Set;t.forEach((function(t){t.data.forEach((function(t){var i=t.x instanceof Date?t.x.toLocaleString():t.x;n.add(i)}))}));var i=!1;return t.forEach((function(t){n.forEach((function(n){t.data.find((function(t){return t.x instanceof Date?t.x.toLocaleString()===n:t.x===n}))||(i=!0)}))})),i},n.prototype._shouldFillToZeroY=function(){return"tozeroy"===this.props.mode||this._containsSecondaryYAxis},n.defaultProps={useUTC:!0},n}(u.Component),Bv=(0,r.I)(Fv,(function(t){return{tooltip:Ed(t.theme)}})),Pv=function(t,n){var i,e=t.color;return{arcRoot:{fill:e},arcRootFocussed:{fill:e,stroke:(null==n?void 0:n.palette.black)||It.bp.black,strokeWidth:2},arc:{outline:"none"},arcText:{fill:(null==n?void 0:n.semanticColors.bodyText)||It.bp.black,outline:"none",selectors:(i={},i[It.up]={fill:"CanvasText"},i)}}},_v=function(t){function n(n){var i=t.call(this,n)||this;return i.updateChart=function(t){Iv(t)},i._onFocus=function(){i.setState({isArcFocused:!0})},i._onBlur=function(){i.setState({isArcFocused:!1})},i.state={isArcFocused:!1},i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.getDerivedStateFromProps=function(t){return Iv(t),null},n.prototype.render=function(){var t,n=this,i=this.props.arc,e=(0,a.Z)()((function(t){return Pv(t,n.props.theme)}),(0,o.Cl)({},this.props));return u.createElement("path",{d:i(this.props.data),className:"".concat(this.state.isArcFocused?e.arcRootFocussed:e.arcRoot),onClick:null===(t=this.props.data)||void 0===t?void 0:t.data.onClick})},n.defaultProps={arc:wd()},n}(u.Component),Hv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._arcId=p("piechart_arc"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var n,i,e=this,r=this.props,o=r.data,l=r.culture,s=wd().centroid({endAngle:(null==o?void 0:o.endAngle)||0,startAngle:(null==o?void 0:o.startAngle)||0,padAngle:null==o?void 0:o.padAngle,innerRadius:(null===(n=this.props)||void 0===n?void 0:n.outerRadius)||0,outerRadius:(null===(i=this.props)||void 0===i?void 0:i.outerRadius)||4}),c=s[0],f=s[1],d=(0,a.Z)()((function(t){return Pv(t,e.props.theme)})),v=(((null==o?void 0:o.startAngle)||0)+((null==o?void 0:o.endAngle)||0))/2,h="".concat(null==o?void 0:o.data.x,"-").concat((0,_n.c$)(null==o?void 0:o.data.y,l));return u.createElement("g",{className:"".concat(d.arc," arc"),"data-is-focusable":!0,id:this._arcId,onFocus:this._onFocus,onBlur:this._onBlur,"aria-label":h,role:"img"},t.prototype.render.call(this),u.createElement($d,{content:h,textProps:{x:c+(v>Math.PI?-10:10),y:f+(v>Math.PI/2&&v<3*Math.PI/2?10:-10),dominantBaseline:v>Math.PI/2&&v<3*Math.PI/2?"hanging":"auto",textAnchor:!this._isRTL&&v>Math.PI||this._isRTL&&v<Math.PI?"end":"start","aria-label":"".concat(null==o?void 0:o.data.x,"-").concat((0,_n.c$)(null==o?void 0:o.data.y,l)),className:d.arcText},isTooltipVisibleProp:this.state.isArcFocused,shouldReceiveFocus:!1,maxWidth:40,wrapContent:vs}))},n}(_v);function Iv(t){t.arc.innerRadius(t.innerRadius),t.arc.outerRadius(t.outerRadius)}var Wv,Rv=function(t){function n(n){var i=t.call(this,n)||this;return i.arcGenerator=function(t,n){return u.createElement(Hv,{culture:i.props.culture,key:n,data:t,innerRadius:i.props.innerRadius,outerRadius:i.props.outerRadius,color:"".concat(i.colors(n)),theme:i.props.theme})},i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this,n=this.props,i=n.pie,e=n.data,r=n.width,o=n.height,a=n.chartTitle,l=n.theme,s=[];if(e&&!this.props.colors)for(var c=0;c<e.length;c++)s.push(Jl(c,0,null==l?void 0:l.isInverted));var f=this.props.colors,d=void 0===f?s:f;this.colors=Mu().range(d.map((function(t){return Ql(t)})));var v=i(e),h="translate(".concat(r/2,", ").concat(o/2,")");return u.createElement(Dc,{direction:Ys.domOrder},u.createElement("svg",{width:r,height:o,"aria-label":a},u.createElement("g",{className:"pie",transform:h},v.map((function(n,i){return t.arcGenerator(n,i)})))))},n.defaultProps={pie:ad().padAngle(.01).sort(null).value((function(t){return t.y}))},n}(u.Component),$v=(0,a.Z)(),zv=function(t){function n(n){var i=t.call(this,n)||this;return i._emptyChartId=p("_PieChart_empty"),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t=this.props,n=t.data,i=t.width,e=t.height,r=t.colors,o=t.chartTitle,a=this.props,l=a.theme,s=a.className,c=a.styles,f=a.culture;this._classNames=$v(c,{theme:l,width:i,height:e,className:s});var d=Math.min(i-80,e-32)/2;return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement("div",{className:this._classNames.root},this.props.chartTitle&&u.createElement("p",{className:this._classNames.chartTitle},this.props.chartTitle),u.createElement(Rv,{culture:f,width:i+8,height:e+8,outerRadius:d,innerRadius:1,data:n,colors:r,chartTitle:o,theme:l}))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.y>0})).length>0)},n.defaultProps={data:[],width:600,height:350},n}(u.Component),jv=(0,r.I)(zv,(function(t){var n=t.className,i=t.theme,e=t.width+30,r=t.height+10;return{root:[i.fonts.medium,"ms-PieChart",n,{width:e+40}],chart:[{padding:20,width:e,height:r,boxSizing:"content-box"}],chartTitle:[(0,o.Cl)((0,o.Cl)({textAlign:"center"},i.fonts.mediumPlus),{color:i.semanticColors.bodyText})]}}));!function(t){t.PartToWhole="part-to-whole",t.AbsoluteScale="absolute-scale"}(Wv||(Wv={}));var Yv,Xv=(0,a.Z)(),Gv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._adjustProps=function(){var t=i.props,n=t.theme,e=t.className,r=t.styles,o=t.width,u=t.barHeight;i._classNames=Xv(r,{legendColor:i.state.color,theme:n,width:o,className:e,barHeight:u})},i._getLegendData=function(t,n,e){var r=[e.blueLight,e.blue,e.blueMid,e.red,e.black],a=[];return t.forEach((function(t,e){var o=t.chartData.filter((function(t){return!t.placeHolder}));o.length<3?void 0!==n[e]&&n[e]&&o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}})):o.forEach((function(t,n){var e,o,u=t.color?t.color:r[Math.floor(4*Math.random()+1)];if(i.props.enableGradient&&(u=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(n,0,null===(o=i.props.theme)||void 0===o?void 0:o.isInverted)[0]),!(a.filter((function(n){return n.title===t.legend&&n.color===u})).length>0)){var l={title:t.legend,color:u,action:function(){i._onClick(t.legend)},hoverAction:function(){i._handleChartMouseLeave(),i._onHover(t.legend)},onMouseOutAction:function(){i._onLeave()}};a.push(l)}}))})),u.createElement(jf,(0,o.Cl)({legends:a,overflowProps:i.props.legendsOverflowProps,focusZonePropsInHoverCard:i.props.focusZonePropsForLegendsInHoverCard,overflowText:i.props.legendsOverflowText},i.props.legendProps))},i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i._computeLongestBarTotalValue=function(){var t=0;return i.props.data.forEach((function(n){var i=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0);t=Math.max(t,i)})),t},i.state={isCalloutVisible:!1,refArray:[],selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._onLeave=i._onLeave.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i.barChartSvgRef=u.createRef(),i._emptyChartId=p("_MSBC_empty"),i._barId=p("_MSBC_rect_"),i._barIdPlaceholderPartToWhole=p("_MSBC_rect_partToWhole_"),i._barIdEmpty=p("_MSBC_rect_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.data,e=n.theme,r=n.culture;this._adjustProps();var a=e.palette,l=this._getLegendData(i,this.props.hideRatio,a),s=this.state.isCalloutVisible;this._classNames=Xv(this.props.styles,{legendColor:this.state.color,theme:e,variant:this.props.variant,hideLabels:this.props.hideLabels});var c=this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,f=this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard;this._longestBarTotalValue=this._computeLongestBarTotalValue();var d=i.map((function(n,i){var e=t._createBarsAndLegends(n,t.props.barHeight,a,t.props.hideRatio[i],t.props.hideDenominator[i],t.props.href,i);return u.createElement("div",{key:i,id:"_MSBC_bar-".concat(i)},e)}));return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},d,!this.props.hideLegend&&u.createElement("div",{className:this._classNames.legendContainer},l),u.createElement(Pn,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&s),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:c,YValue:f,color:this.state.color,culture:r}))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._createBarsAndLegends=function(t,n,i,e,r,a,l){var s,c,f=this,d=(null===(s=t.chartData)||void 0===s?void 0:s.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,v=this.state.barSpacingInPercent*(d-1),h=this.props.culture,g=[i.blueLight,i.blue,i.blueMid,i.red,i.black],y=[],m=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),b=this.props.variant===Wv.AbsoluteScale?this._longestBarTotalValue:m,x=0;if(t.chartData.map((function(t,n){var i=(t.data?t.data:0)/b*100||0;return i<1&&0!==i?i=1:i>99&&100!==i&&(i=99),x+=i})),this.props.variant===Wv.AbsoluteScale){var w=0===b?0:(b-m)/b*100;w<1&&0!==w?w=1:w>99&&100!==w&&(w=99),x+=w}var C=0!==x?x/(100-v):1,M=0,k=0,A=t.chartData.map((function(t,e){var r,o,s,c,d=t.color?t.color:t.placeHolder?i.neutralLight:g[Math.floor(4*Math.random()+1)],v=d;f.props.enableGradient&&(d=(null===(r=t.gradient)||void 0===r?void 0:r[0])||oc(e,0,null===(o=f.props.theme)||void 0===o?void 0:o.isInverted)[0],v=(null===(s=t.gradient)||void 0===s?void 0:s[1])||oc(e,0,null===(c=f.props.theme)||void 0===c?void 0:c.isInverted)[1]);var h=t.data?t.data:0;e>0&&(M+=k),(k=h/b*100?h/b*100:0)<1&&0!==k?k=1/C:k>99&&100!==k?k=99/C:k/=C,y.push(M);var m=f.props.styles,x=!(!f._legendHighlighted(t.legend)&&!f._noLegendHighlighted()),w=t.placeHolder?f.props.theme.semanticColors.bodyText:d;f._classNames=Xv(m,{theme:f.props.theme,shouldHighlight:x,href:a,variant:f.props.variant,hideLabels:f.props.hideLabels});var A=p("MSBC_Gradient")+"_".concat(l,"_").concat(e);return u.createElement("g",{key:e,className:t.placeHolder?f._classNames.placeHolderOnHover:f._classNames.opacityChangeOnHover,ref:function(n){f._refCallback(n,t.legend)},"data-is-focusable":!f.props.hideTooltip&&x,onFocus:f._onBarFocus.bind(f,h,w,t),onBlur:f._onBarLeave,role:"img","aria-label":f._getAriaLabel(t),onMouseOver:f._onBarHover.bind(f,h,w,t),onMouseMove:f._onBarHover.bind(f,h,w,t),onMouseLeave:f._onBarLeave,onClick:a?t.placeHolder?void 0:f._redirectToUrl.bind(f,a):t.onClick},f.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:A},u.createElement("stop",{offset:"0",stopColor:d}),u.createElement("stop",{offset:"100%",stopColor:v}))),u.createElement("rect",{key:e,id:"".concat(f._barId,"-").concat(l,"-").concat(e),x:"".concat(f._isRTL?100-y[e]-k-f.state.barSpacingInPercent*e:y[e]+f.state.barSpacingInPercent*e,"%"),y:0,width:k+"%",height:n,rx:f.props.roundCorners?3:0,fill:f.props.enableGradient?"url(#".concat(A,")"):d}))}));if(this.props.variant!==Wv.AbsoluteScale||this.props.hideLabels)0===t.chartData.length&&A.push(u.createElement("g",{key:0,className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdPlaceholderPartToWhole,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0}))),0===m&&A.push(u.createElement("g",{key:"empty",className:this._classNames.noData,onClick:this._redirectToUrl.bind(this,a)},u.createElement("rect",{key:0,id:this._barIdEmpty,x:"0%",y:0,width:"100%",height:n,fill:i.neutralLight,rx:this.props.roundCorners?3:0})));else{var S=!1,L=0;this._noLegendHighlighted()?(S=!0,L=m):null===(c=t.chartData)||void 0===c||c.forEach((function(t){f._legendHighlighted(t.legend)&&(S=!0,L+=t.data?t.data:0)})),S&&A.push(u.createElement("text",{key:"text",x:"".concat(this._isRTL?100-(y[y.length-1]||0)-k-v:(y[y.length-1]||0)+k+v,"%"),textAnchor:"start",y:n/2,dominantBaseline:"central",transform:"translate(".concat(this._isRTL?-4:4,")"),className:this._classNames.barLabel,"aria-label":"Total: ".concat(L),role:"img"},Ns(L)))}var V=void 0!==e&&e,D=this.props.variant!==Wv.AbsoluteScale&&!V&&2===t.chartData.length,N=this.props.variant!==Wv.AbsoluteScale&&!V&&1===t.chartData.length,O=function(){return(0,_n.c$)(t.chartData[0].data?t.chartData[0].data:0,h)};return u.createElement("div",{className:this._classNames.singleChartRoot},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartTitle},t.chartTitle&&u.createElement(Rc,{className:this._classNames.chartTitleLeft,content:t.chartTitle,accessibilityData:t.chartTitleAccessibilityData}),D&&u.createElement("div",(0,o.Cl)({},Ds(t.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},O()),!r&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,_n.c$)(m,h))),N&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Ds(t.chartDataAccessibilityData,"text",!1)),O()))),u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartWrapper},u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==t?void 0:t.chartTitle},A))))},n.prototype._onBarFocus=function(t,n,i){var e=this;this.state.refArray.forEach((function(r){r.legendText===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._refCallback=function(t,n){this.state.refArray.push({legendText:n,refElement:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&0===this.props.data.filter((function(t){return t.chartData&&0===t.chartData.length&&(!t.chartTitle||""===t.chartTitle)})).length)},n.defaultProps={barHeight:12,hideRatio:[],hideDenominator:[]},n}(u.Component),qv=(0,r.I)(Gv,(function(t){var n,i=t.className,e=t.width,r=t.barHeight,u=t.shouldHighlight,a=t.theme,l=t.href,s=t.variant,c=t.hideLabels;return{root:[a.fonts.medium,"ms-StackedBarChart",{display:"flex",flexDirection:"column",width:e||"100%"},i],items:{marginBottom:"11px"},chart:{width:"100%",height:r||12,display:"block",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},a.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:a.palette.neutralPrimary,marginBottom:s===Wv.AbsoluteScale?"4px":"5px"},singleChartRoot:{width:e||"100%",display:"flex",flexDirection:"column",marginBottom:s===Wv.AbsoluteScale?"16px":"10px"},opacityChangeOnHover:{opacity:u?"":"0.1",cursor:l?"pointer":"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:a.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:a.palette.neutralPrimary},placeHolderOnHover:{opacity:u?"":"0.1",cursor:"default",selectors:{"&:focus":{stroke:a.palette.black,strokeWidth:"2px"}}},legendContainer:{margin:"5px 0px 0px 4px"},noData:{cursor:l?"pointer":"default"},barLabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:a.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartWrapper:{paddingRight:s!==Wv.AbsoluteScale||c?0:40}}})),Uv=(0,a.Z)(),Zv=function(t){function n(n){var i=t.call(this,n)||this;return i._isRTL=(0,l.jI)(),i._handleChartMouseLeave=function(){i._calloutAnchorPoint=null,i.setState({isCalloutVisible:!1})},i._closeCallout=function(){i.setState({isCalloutVisible:!1})},i._legendHighlighted=function(t){return i.state.selectedLegend===t||""===i.state.selectedLegend&&i.state.activeLegend===t},i._noLegendHighlighted=function(){return""===i.state.selectedLegend&&""===i.state.activeLegend},i._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.legend,e=t.yAxisCalloutData||t.data||0;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||(i?"".concat(i,", "):t.placeHolder?"Remaining, ":"")+"".concat(e,".")},i.state={isCalloutVisible:!1,selectedLegend:"",activeLegend:"",refSelected:null,dataForHoverCard:0,color:"",xCalloutValue:"",yCalloutValue:"",calloutLegend:"",barSpacingInPercent:0},i._refArray=[],i._onLeave=i._onLeave.bind(i),i._refCallback=i._refCallback.bind(i),i._onBarLeave=i._onBarLeave.bind(i),i._calloutId=p("callout"),i._emptyChartId=p("_SBC_empty"),i.barChartSvgRef=u.createRef(),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t,n=(null===(t=this.barChartSvgRef.current)||void 0===t?void 0:t.getBoundingClientRect().width)||0;if(n){var i=3/n*100;this.setState({barSpacingInPercent:i})}},n.prototype.render=function(){if(!this._isChartEmpty()){this._adjustProps();var t=this.props,n=t.data,i=t.benchmarkData,e=t.targetData,r=t.hideNumberDisplay,a=t.ignoreFixStyle,l=t.culture,s=this.props.theme.palette,c=a||n.chartData.length>2?this.props.barHeight:12;i&&(i.color=i.color||s.neutralTertiary),e&&(e.color=e.color||s.neutralSecondary);var f=this._createBarsAndLegends(n,c,s,i,e),d=!1===r&&!a&&2===n.chartData.length,v=!1===r&&!a&&1===n.chartData.length,h=n.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),p=0;i&&h&&(p=i.data/h*100);var g=0;e&&h&&(g=e.data/h*100);var y=!1===this.props.hideLegend&&(a||n.chartData.length>2);this._classNames=Uv(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,benchmarkColor:i?i.color:"",benchmarkRatio:p,targetColor:e?e.color:"",targetRatio:g,showTriangle:!(!i&&!e)});var m=function(){return(0,_n.c$)(n.chartData[0].data?n.chartData[0].data:0,l)};return u.createElement("div",{className:this._classNames.root,onMouseLeave:this._handleChartMouseLeave},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",{className:this._classNames.chartTitle},n.chartTitle&&u.createElement(Rc,{className:this._classNames.chartTitleLeft,content:n.chartTitle,accessibilityData:n.chartTitleAccessibilityData}),d&&u.createElement("div",(0,o.Cl)({},Ds(n.chartDataAccessibilityData,"text",!1)),u.createElement("span",{className:this._classNames.ratioNumerator},m()),!this.props.hideDenominator&&u.createElement("span",{className:this._classNames.ratioDenominator}," / "+(0,_n.c$)(h,l))),v&&u.createElement("div",(0,o.Cl)({className:this._classNames.ratioNumerator},Ds(n.chartDataAccessibilityData,"text",!1)),m())),(i||e)&&u.createElement("div",{className:this._classNames.benchmarkContainer},i&&u.createElement("div",{className:this._classNames.benchmark,role:"text"}),e&&u.createElement("div",{className:this._classNames.target,role:"text"}))),u.createElement(Dc,{direction:Ys.horizontal},u.createElement("div",null,u.createElement("svg",{ref:this.barChartSvgRef,className:this._classNames.chart,"aria-label":null==n?void 0:n.chartTitle},u.createElement("g",null,f[0]),u.createElement(Pn,(0,o.Cl)({gapSpace:15,isBeakVisible:!1,target:this.state.refSelected,setInitialFocus:!0,hidden:!(!this.props.hideTooltip&&this.state.isCalloutVisible),directionalHint:3,id:this._calloutId,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0,shouldUpdateWhenHidden:!0},this.props.calloutProps,Ds(this.state.callOutAccessibilityData,"text",!1)),u.createElement(u.Fragment,null,this.props.onRenderCalloutPerDataPoint?this.props.onRenderCalloutPerDataPoint(this.state.dataPointCalloutProps):u.createElement(Js.ChartHoverCard,{Legend:this.state.xCalloutValue?this.state.xCalloutValue:this.state.calloutLegend,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,color:this.state.color,culture:l})))))),y&&u.createElement("div",{className:this._classNames.legendContainer},f[1]))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},n.prototype._adjustProps=function(){this._classNames=Uv(this.props.styles,{legendColor:this.state.color,theme:this.props.theme,width:this.props.width,barHeight:this.props.barHeight,className:this.props.className})},n.prototype._createBarsAndLegends=function(t,n,i,e,r){var a,l=this,s=(null===(a=t.chartData)||void 0===a?void 0:a.reduce((function(t,n){return t+((n.data||0)>0?1:0)}),0))||1,c=this.state.barSpacingInPercent*(s-1),f=[i.blueLight,i.blue,i.blueMid,i.red,i.black],d=[],v=[],h=t.chartData.reduce((function(t,n){return t+(n.data?n.data:0)}),0),g=0,y=0,m=0;t.chartData.map((function(t,n){var i=t.data?t.data:0;return(y=i/h*100)<1&&0!==y?y=1:y>99&&100!==y&&(y=99),m+=y}));var b=0!==m?m/(100-c):1,x=t.chartData.map((function(t,i){var e,r,o,a,s=t.color?t.color:f[Math.floor(4*Math.random()+1)],c=s;l.props.enableGradient&&(s=(null===(e=t.gradient)||void 0===e?void 0:e[0])||oc(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted)[0],c=(null===(o=t.gradient)||void 0===o?void 0:o[1])||oc(i,0,null===(a=l.props.theme)||void 0===a?void 0:a.isInverted)[1]);var m=t.data?t.data:0,x={title:t.legend,color:s,action:h>0?function(){l._onClick(t.legend)}:void 0,hoverAction:h>0?function(){l._handleChartMouseLeave(),l._onHover(t.legend)}:void 0,onMouseOutAction:h>0?function(){l._onLeave()}:void 0};t.placeHolder||d.push(x),i>0&&(g+=y),(y=m/h*100)<1&&0!==y?y=1/b:y>99&&100!==y?y=99/b:y/=b,v.push(g);var w=l.props.styles,C=!(!l._legendHighlighted(t.legend)&&!l._noLegendHighlighted()),M=t.placeHolder?l.props.theme.semanticColors.bodyText:s;l._classNames=Uv(w,{theme:l.props.theme,shouldHighlight:C,href:l.props.href});var k=p("SBC_Gradient")+"_".concat(i);return u.createElement("g",{key:i,className:l._classNames.opacityChangeOnHover,ref:function(t){l._refCallback(t,x.title)},"data-is-focusable":!l.props.hideTooltip&&C,onFocus:l._onBarFocus.bind(l,m,M,t),onBlur:l._onBarLeave,"aria-label":l._getAriaLabel(t),role:"img",onMouseOver:l._onBarHover.bind(l,m,M,t),onMouseMove:l._onBarHover.bind(l,m,M,t),onMouseLeave:l._onBarLeave,pointerEvents:"all",onClick:l.props.href?l._redirectToUrl.bind(l,l.props.href):t.onClick},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:k},u.createElement("stop",{offset:"0",stopColor:s}),u.createElement("stop",{offset:"100%",stopColor:c}))),u.createElement("rect",{key:i,id:p("_SBC_bar"),x:"".concat(l._isRTL?100-v[i]-y-l.state.barSpacingInPercent*i:v[i]+l.state.barSpacingInPercent*i,"%"),y:0,width:y+"%",height:n,rx:l.props.roundCorners?3:0,fill:l.props.enableGradient?"url(#".concat(k,")"):s}))}));this._addLegend(d,e),this._addLegend(d,r);var w=u.createElement(jf,(0,o.Cl)({legends:d,enabledWrapLines:this.props.enabledLegendsWrapLines,overflowProps:this.props.legendsOverflowProps,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps));return[0===h?[this._generateEmptyBar(n,this.props.barBackgroundColor?this.props.barBackgroundColor:i.neutralLight)]:x,w]},n.prototype._onBarFocus=function(t,n,i){var e=this;this._refArray.forEach((function(r){r.index===i.legend&&e.setState({refSelected:r.refElement,isCalloutVisible:""===e.state.selectedLegend||e.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData})}))},n.prototype._addLegend=function(t,n){if(n){var i={title:n.legend,color:n.color,shape:"triangle"};t.push(i)}},n.prototype._generateEmptyBar=function(t,n){return u.createElement("g",{key:0,className:this._classNames.opacityChangeOnHover},u.createElement("rect",{key:0,id:p("_SBC_empty_bar_"),x:"0%",y:0,width:"100%",height:t,fill:n}))},n.prototype._refCallback=function(t,n){this._refArray.push({index:n,refElement:t})},n.prototype._onClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._onHover=function(t){this.setState({activeLegend:t})},n.prototype._onLeave=function(){this.setState({activeLegend:""})},n.prototype._onBarHover=function(t,n,i,e){e.persist(),this._calloutAnchorPoint!==i&&(this._calloutAnchorPoint=i,this.setState({refSelected:e,isCalloutVisible:""===this.state.selectedLegend||this.state.selectedLegend===i.legend,calloutLegend:i.legend?i.legend:i.placeHolder?"Remaining":"",dataForHoverCard:t,color:n,xCalloutValue:i.xAxisCalloutData,yCalloutValue:i.yAxisCalloutData,dataPointCalloutProps:(0,o.Cl)((0,o.Cl)({},i),{color:n}),callOutAccessibilityData:i.callOutAccessibilityData}))},n.prototype._onBarLeave=function(){},n.prototype._redirectToUrl=function(t){t&&(window.location.href=t)},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.chartData&&this.props.data.chartData.length>0)},n.defaultProps={barHeight:12,hideNumberDisplay:!1,hideLegend:!1,ignoreFixStyle:!1},n}(u.Component),Kv=(0,r.I)(Zv,(function(t){var n,i,e=t.className,r=t.width,u=t.barHeight,a=t.shouldHighlight,l=t.theme,s=t.href,c=t.benchmarkColor,f=t.benchmarkRatio,d=t.targetColor,v=t.targetRatio,h=t.showTriangle;return{root:[l.fonts.medium,"ms-StackedBarChart",{width:r||"100%",display:"flex",flexDirection:"column"},e],chart:{width:"100%",height:u||12,display:"block",marginBottom:h?"16px":"10px",overflow:"visible"},chartTitle:(0,o.Cl)((0,o.Cl)({},l.fonts.small),{display:"flex",justifyContent:"space-between"}),chartTitleLeft:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"block",color:l.palette.neutralPrimary,marginBottom:"5px"},legendContainer:{margin:"4px 0px 0px 4px"},opacityChangeOnHover:{opacity:a?"":"0.1",cursor:s?"pointer":"default",selectors:{"&:focus":{stroke:l.palette.black,strokeWidth:"2px"}}},ratioNumerator:{fontSize:It.s.medium,fontWeight:It.BO.semibold,color:l.palette.neutralPrimary},ratioDenominator:{fontSize:It.s.medium,color:l.palette.neutralPrimary},benchmarkContainer:{position:"relative",height:"7px",marginTop:"-3px",marginBottom:"-1px"},benchmark:{position:"absolute",left:"calc("+f+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:c,marginBottom:"4px",selectors:(n={},n[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(c,", ").concat(c,")")},n)},target:{position:"absolute",left:"calc("+v+"% - 4px)",width:"0",height:"0",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"7px solid",borderTopColor:d,marginBottom:"4px",selectors:(i={},i[It.up]={border:"0px",height:"7px",width:"7px",clipPath:"polygon(50% 100%, 0 0, 100% 0)",backgroundImage:"linear-gradient(to right, ".concat(d,", ").concat(d,")")},i)}}})),Jv=function(t){if(!(t.length<2)){t=t.sort((function(t,n){return t instanceof Date?t.getTime()-n.getTime():t-n}));for(var n=Number.MAX_VALUE,i=1;i<t.length;i++){var e=t[i]instanceof Date?t[i].getTime()-t[i-1].getTime():t[i]-t[i-1];n=Math.min(n,e)}return[n,t[0]instanceof Date?t[t.length-1].getTime()-t[0].getTime():t[t.length-1]-t[0]]}},Qv=function(t,n,i){var e=Jv(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1];return Math.floor(n*r*(1-i)/(o+r*(1-i)))},th=function(t,n,i){return void 0===i&&(i=0),t-(n.left||0)-(n.right||0)-2*i},nh=function(t,n){return t+n/(1-n)*(t-1)},ih=function(t,n,i){return t*nh(n,i)},eh=function(t,n,i){return t/nh(n,i)};!function(t){t.show="visibility",t.hide="hidden"}(Yv||(Yv={}));var rh=(0,a.Z)(),oh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.toImage=function(t){var n,i;return Pf(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?function(t,n,i,e){var r=ri(t,(function(t){return t.x})),o=ei(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}:{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}}(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):xs(n,i,r)},e._createLine=function(t,n,i,r,o){var a;void 0===i&&(i=0),void 0===r&&(r=0);var l=e._xAxisType===jl.StringAxis,s=e._getScales(i,r).xBarScale,c=e._createColors(),f=e.props.theme,d=e.props,v=d.data,h=d.lineLegendColor,g=void 0===h?f.palette.yellow:h,y=d.lineLegendText,m=[],b=[];v&&v.forEach((function(t,n){var i;t.lineData&&t.lineData.y&&m.push({x:t.x,y:t.lineData.y,useSecondaryYScale:null!==(i=t.lineData.useSecondaryYScale)&&void 0!==i&&i,point:t,index:n})}));var x=Rd().x((function(n){return l?s(n.x)+.5*s.bandwidth():t(n.x)})).y((function(t){return t.useSecondaryYScale&&o?o(t.y):n(t.y)})),w=!(!e._legendHighlighted(y)&&!e._noLegendHighlighted()),C=(null===(a=e.props.lineOptions)||void 0===a?void 0:a.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0;C>0&&b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3+2*C,stroke:f.semanticColors.bodyBackground})),b.push(u.createElement("path",{key:p("_VBC_line_"),id:p("_VBC_line_"),opacity:w?1:.1,d:x(m),fill:"transparent",strokeLinecap:"square",strokeWidth:3,stroke:g}));var M=m.map((function(i,r){var a,f={refElement:null};return u.createElement("circle",{key:r,id:p("_VBC_point_"),cx:l?s(i.x)+.5*s.bandwidth():t(i.x),cy:i.useSecondaryYScale&&o?o(i.y):n(i.y),onMouseOver:e._legendHighlighted(y)?e._lineHover.bind(e,i.point):e._onBarHover.bind(e,i.point,c(i.y)),onMouseOut:e._onBarLeave,r:e._getCircleVisibilityAndRadius(i.x,y).radius,stroke:g,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,visibility:e._getCircleVisibilityAndRadius(i.x,y).visibility,onClick:null===(a=i.point.lineData)||void 0===a?void 0:a.onClick,"data-is-focusable":e._legendHighlighted(y),ref:function(t){return f.refElement=t},onFocus:e._lineFocus.bind(e,i.point,f),onBlur:e._handleChartMouseLeave})}));return u.createElement(u.Fragment,null,b,M)},e._getCircleVisibilityAndRadius=function(t,n){var i=e.state.activeXdataPoint;return e._noLegendHighlighted()?{visibility:i===t?Yv.show:Yv.hide,radius:8}:t===i&&e._legendHighlighted(n)?{visibility:Yv.show,radius:8}:e._legendHighlighted(n)?{visibility:Yv.show,radius:.3}:{visibility:Yv.hide,radius:0}},e._checkForLine=function(){return e.props.data.some((function(t){var n;return void 0!==(null===(n=null==t?void 0:t.lineData)||void 0===n?void 0:n.y)}))},e._getMargins=function(t){e.margins=t},e._renderContentForBothLineAndBars=function(t){var n=e._getCalloutContentForLineAndBar(t),i=n.YValueHover,r=n.hoverXValue,a=i.map((function(t,n){return u.createElement(Js.ChartHoverCard,(0,o.Cl)({key:n,Legend:t.legend},0===n&&{XValue:"".concat(r||t.data)},{color:t.color,YValue:t.data||t.y,culture:e.props.culture}))}));return u.createElement(u.Fragment,null,a)},e._renderContentForOnlyBars=function(t){var n=e.props.useSingleColor,i=void 0!==n&&n;return u.createElement(u.Fragment,null,u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x,Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:!i&&t.color?t.color:e._createColors()(t.y),culture:e.props.culture}))},e._renderCallout=function(t){return t?e._isHavingLine?e._renderContentForBothLineAndBars(t):e._renderContentForOnlyBars(t):null},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._getGraphData=function(t,n,i,r,o){return e._bars=e._xAxisType===jl.NumericAxis?e._createNumericBars(i,r,o):e._xAxisType===jl.DateAxis?e._createDateBars(i,r,o):e._createStringBars(i,r,o)},e._refCallback=function(t,n){e._refArray.push({index:n,refElement:t})},e._getCalloutContentForLineAndBar=function(t){var n,i,r,o,u,a=[],l=e.props,s=l.theme,c=l.useSingleColor,f=void 0!==c&&c,d=l.enableGradient,v=e.props,h=v.data,p=v.lineLegendText,g=v.lineLegendColor,y=void 0===g?s.palette.yellow:g,m=h.filter((function(n){return n.x===t.x})),b=h.indexOf(m[0]),x=f?e._createColors()(1):m[0].color?m[0].color:e._createColors()(m[0].y);e._isHavingLine&&void 0!==(null===(n=m[0].lineData)||void 0===n?void 0:n.y)&&(e._legendHighlighted(p)||e._noLegendHighlighted())&&a.push({legend:p,color:y,y:null===(i=m[0].lineData)||void 0===i?void 0:i.y,data:null===(r=m[0].lineData)||void 0===r?void 0:r.yAxisCalloutData,yAxisCalloutData:null===(o=m[0].lineData)||void 0===o?void 0:o.yAxisCalloutData}),(e._legendHighlighted(m[0].legend)||e._noLegendHighlighted())&&a.push({legend:m[0].legend,y:m[0].y,color:d?f?oc(0,0)[0]:(null===(u=m[0].gradient)||void 0===u?void 0:u[0])||oc(b,0)[0]:x,data:m[0].yAxisCalloutData,yAxisCalloutData:m[0].yAxisCalloutData});var w=t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString();return{YValueHover:a,hoverXValue:t.xAxisCalloutData||w}},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},e._onBarFocus=function(t,n,i){var r=e._getCalloutContentForLineAndBar(t),o=r.YValueHover,u=r.hoverXValue;e._refArray.forEach((function(r,a){r.index===t.legend&&n===a&&e.setState({refSelected:r.refElement,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.y,color:t.color||i,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:o,hoverXValue:u,callOutAccessibilityData:t.callOutAccessibilityData})}))},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){var i=e.props.theme,r=e.props,o=r.lineLegendText,u=void 0===o?"":o,a=r.lineLegendColor,l=void 0===a?i.palette.yellow:a;e.setState({refSelected:n,isCalloutVisible:!0,calloutLegend:u,dataForHoverCard:t.lineData.y,color:l,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x.toString()),yCalloutValue:t.lineData.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:t.x})},e._getScales=function(t,n){var i,r=Iu().domain([e.props.supportNegativeData?e._yMin:0,e._yMax]).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===jl.NumericAxis){var o=ri(e._points,(function(t){return t.x})),u=ei(e._points,(function(t){return t.x}));i=Iu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),Es(e.props.xAxisInnerPadding,e.props.xAxisPadding)||"histogram"===e.props.mode||i.nice()}else if(e._xAxisType===jl.DateAxis){var a=ei(e._points,(function(t){return t.x})),l=ri(e._points,(function(t){return t.x}));(i=e.props.useUTC?yu():gu()).domain([a,l]).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin])}else i=ku().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding);return{xBarScale:i,yBarScale:r}},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(t,n){var i=e.props,r=i.theme,a=i.useSingleColor,l=e.props,s=l.lineLegendText,c=l.lineLegendColor,f=void 0===c?r.palette.yellow:c,d=[],v={};if(t.forEach((function(t,n){var i,o,u,l=a?e._createColors()(1):t.color;if(e.props.enableGradient){var s=Math.max((null===(i=e.props.data)||void 0===i?void 0:i.findIndex((function(n){return n.legend===t.legend})))||0,0);l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(s,0,null==r?void 0:r.isInverted)[0],a&&(l=oc(0,0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted)[0])}v[t.legend]=l})),Object.entries(v).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};d.push(r)})),e._isHavingLine&&s&&f){var h={title:s,color:f,hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(s)},onMouseOutAction:function(){e._onLegendLeave()},isLineLegendInBarChart:!0};d.unshift(h)}return u.createElement(jf,(0,o.Cl)({legends:d,enabledWrapLines:e.props.enabledLegendsWrapLines,overflowProps:e.props.legendsOverflowProps,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard,overflowText:e.props.legendsOverflowText},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0),e._yMin=Math.min(n[0],e.props.yMinValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t){var n,i,r,o=t.xAxisCalloutData?t.xAxisCalloutData:t.x instanceof Date?(0,_n.Yn)(t.x,e.props.culture,e.props.useUTC):t.x,u=t.legend,a=t.yAxisCalloutData||t.y,l=e.props.lineLegendText||"Line",s=(null===(n=t.lineData)||void 0===n?void 0:n.yAxisCalloutData)||(null===(i=t.lineData)||void 0===i?void 0:i.y);return(null===(r=t.callOutAccessibilityData)||void 0===r?void 0:r.ariaLabel)||"".concat(o,". ")+(u?"".concat(u,", "):"")+"".concat(a,".")+(void 0!==s?" ".concat(l,", ").concat(s,"."):"")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i={};null===(n=e.props.data)||void 0===n||n.forEach((function(t){t.x instanceof Date?i[t.x.getTime()]=t.x:i[t.x]=t.x}));var r=Object.values(i),u=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis){if(Es(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth&&"histogram"!==e.props.mode)e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth),u>=(d=ih(e._barWidth,r.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(u-d)/2);else if(["plotly","histogram"].includes(e.props.mode)&&r.length>1){var a=eh(u,r.length,e._xAxisInnerPadding),l=Os(e.props.barWidth,e.props.maxBarWidth,a,e.props.mode),s=(u-(d=ih(l,r.length,e._xAxisInnerPadding)))/2,c=Number.POSITIVE_INFINITY;if("histogram"!==e.props.mode){var f=hs(r)+20;c=(u-(d=(r.length-e._xAxisInnerPadding)*f))/2}e._domainMargin=8+Math.max(0,Math.min(s,c))}}else{if("histogram"===e.props.mode){l=e.props.maxBarWidth;var d=ih(l,r.length,e._xAxisInnerPadding);e._domainMargin+=Math.max(0,(u-d)/2)}e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,Qv(r,th(t,e.margins,e._domainMargin),e._xAxisInnerPadding),e.props.mode),e._domainMargin+=e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," bars")+(e._isHavingLine?" and 1 line":"")+". "},e._getOrderedXAxisLabels=function(){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(){var t={};return e._points.forEach((function(n){var i=n.x;t[i]||(t[i]=[]),t[i].push(n.y),n.lineData&&t[i].push(n.lineData.y)})),t},lc(e),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",calloutLegend:""},e._isHavingLine=e._checkForLine(),e._calloutId=p("callout"),e._tooltipId=p("VCTooltipID_"),e._refArray=[],e._emptyChartId=p("_VBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._xAxisLabels=this._getOrderedXAxisLabels(),this._yMax=Math.max(ri(this._points,(function(t){return t.y})),this.props.yMaxValue||0),this._yMin=Math.min(ei(this._points,(function(t){return t.y})),this.props.yMinValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=rh(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1},this._isHavingLine&&{YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue}),{gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0}),this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._points,supportNegativeData:this.props.supportNegativeData,chartType:zl.VerticalBarChart,xAxisType:this._xAxisType,createYAxis:ss,calloutProps:i,tickParams:e},this._isHavingLine&&(this._noLegendHighlighted()||this._getHighlightedLegend().length>1)&&{isCalloutForStack:!0},{legendBars:n,datasetForXAxisDomain:this._xAxisLabels,barwidth:this._barWidth,focusZoneDirection:Ys.horizontal,customizedCallout:this._getCustomizedCallout(),createStringYAxis:fs,getmargins:this._getMargins,getMinMaxOfYAxis:Ms,getGraphData:this._getGraphData,getDomainNRangeValues:this._getDomainNRangeValues,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Es(this.props.xAxisInnerPadding,this.props.xAxisPadding)&&"histogram"!==this.props.mode,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),t._isHavingLine&&u.createElement("g",null,t._createLine(n.xScale,n.yScalePrimary,n.containerHeight,n.containerWidth,n.yScaleSecondary)))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._xAxisType=this.props.data&&this.props.data.length>0?Ls(this.props.data[0].x,!0):jl.StringAxis,this._points=this.props.data||[],this._barWidth=Os(this.props.barWidth,this.props.maxBarWidth,void 0,this.props.mode);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark],this._isHavingLine=this._checkForLine(),this._xAxisInnerPadding="histogram"===this.props.mode?0:Ts(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===jl.StringAxis?2/3:.5),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding,this.props.xAxisPadding,0)},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._yMax);return Iu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForLineAndBar(t),r=e.YValueHover,o=e.hoverXValue;this._calloutAnchorPoint!==t&&(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:this._noLegendHighlighted()||this._legendHighlighted(t.legend),dataForHoverCard:t.y,calloutLegend:t.legend,color:t.color||n,xCalloutValue:t.xAxisCalloutData||(t.x instanceof Date?(0,_n.Yn)(t.x,this.props.culture,this.props.useUTC):t.x.toString()),yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,activeXdataPoint:this._noLegendHighlighted()||this._legendHighlighted(t.legend)?t.x:null,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._calculateMinBarHeight=function(t,n,i,e){var r=n<0?Math.abs(t-i):Math.max(Math.abs(n-i),Math.abs(t-i));return Math.ceil(e(r)/100)},n.prototype._createNumericBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),f=this._yMax<0?this._yMax:0,d=this._points.map((function(n,i){var r,a,d,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=rh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(f),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,f,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x)-e._barWidth/2,M=t-e.margins.bottom-(b?-1*w:w)-s(f),k=t-e.margins.bottom-s(f),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(d=n.gradient)||void 0===d?void 0:d[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&ps(h)}return d},n.prototype._createStringBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),f=this._yMax<0?this._yMax:0,d=this._points.map((function(n,i){var r,a,d,v,h,g,y=e._legendHighlighted(n.legend)||e._noLegendHighlighted();e._classNames=rh(e.props.styles,{theme:e.props.theme,shouldHighlight:y});var m=s(n.y)-s(f),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,f,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x),M=t-e.margins.bottom-(b?-1*w:w)-s(f),k=t-e.margins.bottom-s(f);e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,l.bandwidth(),e.props.mode);var A=n.color?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(d=n.gradient)||void 0===d?void 0:d[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i),transform:"translate(".concat(.5*(l.bandwidth()-e._barWidth),", 0)")},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,height:w,"aria-label":e._getAriaLabel(n),role:"img",ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),onMouseLeave:e._onBarLeave,onBlur:e._onBarLeave,"data-is-focusable":!e.props.hideTooltip&&y,onFocus:e._onBarFocus.bind(e,n,i,A),fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v,showTooltip:this.props.showXAxisLablesTooltip};v&&ps(h)}return d},n.prototype._createDateBars=function(t,n,i){var e=this,r=this.props.useSingleColor,o=void 0!==r&&r,a=this._getScales(t,n),l=a.xBarScale,s=a.yBarScale,c=this._createColors(),f=this._yMax<0?this._yMax:0,d=this._points.map((function(n,i){var r,a,d,v,h,g,y=!(!e._legendHighlighted(n.legend)&&!e._noLegendHighlighted());e._classNames=rh(e.props.styles,{theme:e.props.theme,legendColor:e.state.color,shouldHighlight:y});var m=s(n.y)-s(f),b=m<0;m=Math.abs(m);var x=e._calculateMinBarHeight(e._yMin,e._yMax,f,s),w=m;if(0===m||b&&!e.props.supportNegativeData)return u.createElement(u.Fragment,{key:n.x}," ");m<=x&&(w=x);var C=l(n.x)-e._barWidth/2,M=t-e.margins.bottom-(b?-1*w:w)-s(f),k=t-e.margins.bottom-s(f),A=n.color&&!o?n.color:c(n.y),S=A;e.props.enableGradient&&(A=(null===(r=n.gradient)||void 0===r?void 0:r[0])||oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted)[0],S=(null===(d=n.gradient)||void 0===d?void 0:d[1])||oc(i,0,null===(v=e.props.theme)||void 0===v?void 0:v.isInverted)[1],o&&(A=oc(0,0,null===(h=e.props.theme)||void 0===h?void 0:h.isInverted)[0],S=oc(0,0,null===(g=e.props.theme)||void 0===g?void 0:g.isInverted)[1]),e._points[i].color=A);var L=p("VBC_Gradient")+"_".concat(i,"_").concat(A);return u.createElement("g",{key:n.x instanceof Date?"".concat(n.x.getTime(),"_").concat(i):"".concat(n.x,"_").concat(i)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:L,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:S}))),u.createElement("rect",{id:p("_VBC_bar_"),x:C,className:e._classNames.opacityChangeOnHover,y:b?k:M,width:e._barWidth,"data-is-focusable":!e.props.hideTooltip&&y,height:w,ref:function(t){e._refCallback(t,n.legend)},onClick:n.onClick,onMouseOver:e._onBarHover.bind(e,n,A),"aria-label":e._getAriaLabel(n),role:"img",onMouseLeave:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,i,A),onBlur:e._onBarLeave,fill:e.props.enableGradient?"url(#".concat(L,")"):A,rx:e.props.roundCorners?3:0}),e._renderBarLabel(C,M,n.y,n.legend,b))}));if(!this.props.showXAxisLablesTooltip)try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}if(!this.props.wrapXAxisLables&&this.props.showXAxisLablesTooltip){var v=nl(i).call(l);try{document.getElementById(this._tooltipId)&&document.getElementById(this._tooltipId).remove()}catch(t){}var h={tooltipCls:this._classNames.tooltip,id:this._tooltipId,axis:v};v&&ps(h)}return d},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._renderBarLabel=function(t,n,i,e,r){return this.props.hideLabels||this._barWidth<16||!this._legendHighlighted(e)&&!this._noLegendHighlighted()?null:u.createElement("text",{x:t+this._barWidth/2,y:r?n+12:n-6,textAnchor:"middle",className:this._classNames.barLabel,"aria-hidden":!0},"function"==typeof this.props.yAxisTickFormat?this.props.yAxisTickFormat(i):Ns(i))},n.prototype._isChartEmpty=function(){return 0===this._points.length||this._points.every((function(t){return 0===t.y}))&&!this._isHavingLine},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default"},n}(u.Component),uh=(0,r.I)(oh,(function(t){var n=t.shouldHighlight,i=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1"},xAxisTicks:[],yAxisTicks:[{transform:"scaleX(-1)"}],yAxisDomain:[{transform:"scaleX(-1)"}],tooltip:Ed(i),barLabel:Bd(i)}})),ah=(0,a.Z)(),lh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e.Y_ORIGIN=0,e._yAxisLabels=[],e.toImage=function(t){var n,i;return Pf(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._toFocusWholeStack=function(t){var n=e.props.isCalloutForStack,i=void 0!==n&&n;return t?1!==e._getHighlightedLegend().length:i},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis?function(t,n,i,e){var r=ei(t,(function(t){return t.x})),o=ri(t,(function(t){return t.x})),u=n.left,a=i-n.right;return e?{dStartValue:o,dEndValue:r,rStartValue:u,rEndValue:a}:{dStartValue:r,dEndValue:o,rStartValue:u,rEndValue:a}}(t,n,i,r):o===jl.DateAxis?ws(t,n,i,r,a,e):xs(n,i,r)},e._getFormattedLineData=function(t){var n=[],i={};return t.forEach((function(t,i){t.lineData&&t.lineData.forEach((function(e){n.push((0,o.Cl)((0,o.Cl)({},e),{index:i,xItem:t}))}))})),n.forEach((function(t){i[t.legend]?i[t.legend].push(t):i[t.legend]=[t]})),i},e._getLineLegends=function(t){var n=e._lineObject,i=[];return Object.keys(n).forEach((function(t){i.push({title:t,color:n[t][0].color})})),i},e._createLines=function(t,n,i,r,a){var l,s=e._getFormattedLineData(e.props.data),c=[],f=[],d=[],v=e.props.theme,h=(null===(l=e.props.lineOptions)||void 0===l?void 0:l.lineBorderWidth)?Number.parseFloat(e.props.lineOptions.lineBorderWidth.toString()):0,p=e._xAxisType!==jl.StringAxis?0:t.bandwidth()/2;return Object.keys(s).forEach((function(i,r){for(var o,l,d,g,y,m=e._isLegendHighlighted(i)||e._noLegendHighlighted(),b=1;b<s[i].length;b++){var x=t(s[i][b-1].xItem.xAxisPoint),w=s[i][b-1].useSecondaryYScale&&s[i][b].useSecondaryYScale&&a,C=w?a(s[i][b-1].y):n(s[i][b-1].y),M=t(s[i][b].xItem.xAxisPoint),k=w?a(s[i][b].y):n(s[i][b].y),A=w||e._yAxisType!==Yl.StringAxis?0:n.bandwidth()/2;h>0&&f.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-BorderLine"),x1:x,y1:C,x2:M,y2:k,opacity:m?1:.1,strokeWidth:3+2*h,fill:"transparent",strokeLinecap:"round",stroke:v.semanticColors.bodyBackground,transform:"translate(".concat(p,", ").concat(A,")")})),c.push(u.createElement("line",{key:"".concat(r,"-").concat(b,"-line"),x1:x,y1:C,x2:M,y2:k,opacity:m?1:.1,strokeWidth:null!==(l=null===(o=s[i][0].lineOptions)||void 0===o?void 0:o.strokeWidth)&&void 0!==l?l:3,strokeLinecap:null!==(g=null===(d=s[i][0].lineOptions)||void 0===d?void 0:d.strokeLinecap)&&void 0!==g?g:"round",strokeDasharray:null===(y=s[i][0].lineOptions)||void 0===y?void 0:y.strokeDasharray,stroke:s[i][b].color,transform:"translate(".concat(p,", ").concat(A,")"),onMouseOver:e._lineHover.bind(e,s[i][b-1]),onMouseLeave:e._handleMouseOut}))}})),Object.keys(s).forEach((function(i,r){s[i].forEach((function(l,s){var c={refElement:null},f=0===l.xItem.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length,v=l.useSecondaryYScale||e._yAxisType!==Yl.StringAxis?0:n.bandwidth()/2;d.push(u.createElement("circle",(0,o.Cl)({key:"".concat(r,"-").concat(s,"-dot"),cx:t(l.xItem.xAxisPoint),cy:l.useSecondaryYScale&&a?a(l.y):n(l.y),onMouseOver:e._lineHover.bind(e,l),onMouseLeave:e._handleMouseOut,r:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).radius,stroke:l.color,fill:e.props.theme.semanticColors.bodyBackground,strokeWidth:3,opacity:e._getCircleOpacityAndRadius(l.xItem.xAxisPoint,l.legend).opacity,transform:"translate(".concat(p,", ").concat(v,")"),ref:function(t){return c.refElement=t}},f&&(e._noLegendHighlighted()||e._isLegendHighlighted(i))?{"data-is-focusable":!e.props.hideTooltip,onFocus:e._lineFocus.bind(e,l,c),onBlur:e._handleMouseOut,role:"img","aria-label":e._getAriaLabel(l.xItem,l,!0)}:{})))}))})),u.createElement(u.Fragment,null,f,c,d)},e._getCircleOpacityAndRadius=function(t,n){var i=e.state.activeXAxisDataPoint;return e._noLegendHighlighted()?{opacity:i===t?1:0,radius:8}:t===i&&e._isLegendHighlighted(n)?{opacity:1,radius:8}:e._isLegendHighlighted(n)?{opacity:1,radius:.3}:{opacity:0,radius:0}},e._getMargins=function(t){e.margins=t},e._getCustomizedCallout=function(){var t=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0}));return e.props.onRenderCalloutPerStack?e.props.onRenderCalloutPerStack(e.state.stackCalloutProps):e.props.onRenderCalloutPerDataPoint&&!t?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps,e._renderCallout):null},e._lineHover=function(t,n){n.persist(),e._lineHoverFocus(t,n)},e._lineFocus=function(t,n){n.refElement&&e._lineHoverFocus(t,n.refElement)},e._lineHoverFocus=function(t,n){1===e._getHighlightedLegend().length?(e._noLegendHighlighted()||e._isLegendHighlighted(t.legend))&&e.setState({refSelected:n,isCalloutVisible:!0,xCalloutValue:"".concat(t.xItem.xAxisPoint),yCalloutValue:"".concat(t.yAxisCalloutData||t.data||t.y),activeXAxisDataPoint:t.xItem.xAxisPoint,color:t.color}):e._onStackHoverFocus(t.xItem,n)},e._handleMouseOut=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1,activeXAxisDataPoint:""})},e._createBar=function(t,n,i,r){var a=e.props,l=a.barCornerRadius,s=void 0===l?0:l,c=a.barMinimumHeight,f=void 0===c?0:c,d=e.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),v=e._toFocusWholeStack(d);e._xAxisType===jl.StringAxis&&(e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,t.bandwidth()));var h=e._points.map((function(r,a){var l=t((e._xAxisType===jl.NumericAxis||(e._xAxisType,jl.DateAxis),r.xAxisPoint)),c=e._xAxisType!==jl.StringAxis?-e._barWidth/2:(t.bandwidth()-e._barWidth)/2,d=0,h=r.chartData.filter((function(t){return 0!==t.data&&""!==t.data&&!(e._yAxisType===Yl.StringAxis&&void 0===n(t.data))}));if(h.length){var g=e._getBarGapAndScale(h,n),y=g.gapHeight,m=g.heightValueScale,b=g.absStackTotal;if(!(m<0)){var x=i-e.margins.bottom-(e._yAxisType===Yl.StringAxis?0:n(e.Y_ORIGIN)),w=x,C=x,M=0,k=0,A=h.map((function(t,g){var x,A,S,L,V=t.color?t.color:e._colors[g],D=V;e.props.enableGradient&&(V=(null===(x=t.gradient)||void 0===x?void 0:x[0])||oc(g,0,null===(A=e.props.theme)||void 0===A?void 0:A.isInverted)[0],D=(null===(S=t.gradient)||void 0===S?void 0:S[1])||oc(g,0,null===(L=e.props.theme)||void 0===L?void 0:L.isInverted)[1],r.chartData[g].color=V);var N={},O=!(!e._isLegendHighlighted(t.legend)&&!e._noLegendHighlighted());e._classNames=ah(e.props.styles,{theme:e.props.theme,shouldHighlight:O,href:e.props.href});var T,E=!v&&O&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r,t),onMouseOver:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseMove:e._onRectHover.bind(e,r.xAxisPoint,t,V),onMouseLeave:e._handleMouseOut,onFocus:e._onRectFocus.bind(e,t,r.xAxisPoint,V,N),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,t),role:"img"},F=g?y:0;if(e._yAxisType===Yl.StringAxis)T=Math.max(i-e.margins.bottom-(n(t.data)+n.bandwidth()/2)-F,f,1),M=w-=T+F;else{T=Math.abs(m*t.data);var B=Math.max(m*b/100,f);T<B&&(T=B),t.data>=e.Y_ORIGIN?M=w-=T+F:C=(M=C+F)+T,d+=t.data,k=g===h.length-1?T:0}var P=p("VSBC_Gradient")+"_".concat(a,"_").concat(g);return s&&T>s&&g===h.length-1?u.createElement(u.Fragment,{key:g+a+"".concat(v)},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("path",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,d:"\n M ".concat(l," ").concat(M+s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(-s,"\n h ").concat(e._barWidth-2*s,"\n a ").concat(s," ").concat(s," 0 0 1 ").concat(s," ").concat(s,"\n v ").concat(T-s,"\n h ").concat(-e._barWidth,"\n z\n "),fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){return N.refElement=t},transform:"translate(".concat(c,", 0)")},E))):T<0?u.createElement(u.Fragment,{key:g+a}," "):u.createElement(u.Fragment,{key:g+a},e.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:P,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:V}),u.createElement("stop",{offset:"100%",stopColor:D}))),u.createElement("rect",(0,o.Cl)({className:e._classNames.opacityChangeOnHover,x:l,y:M,width:e._barWidth,height:T,fill:e.props.enableGradient?"url(#".concat(P,")"):V,rx:e.props.roundCorners?3:0,ref:function(t){return N.refElement=t}},E,{transform:"translate(".concat(c,", 0)")})))})),S={},L=r.chartData.filter((function(t){return e._noLegendHighlighted()||e._isLegendHighlighted(t.legend)})).length>0,V=v&&L&&{"data-is-focusable":!e.props.hideTooltip,"aria-label":e._getAriaLabel(r),onMouseOver:e._onStackHover.bind(e,r),onMouseMove:e._onStackHover.bind(e,r),onMouseLeave:e._handleMouseOut,onFocus:e._onStackFocus.bind(e,r,S),onBlur:e._handleMouseOut,onClick:e._onClick.bind(e,r),role:"img"},D=!1,N=0;return e.props.hideLabels||e._yAxisType===Yl.StringAxis||(e._noLegendHighlighted()?(D=!0,N=d):h.forEach((function(t){e._isLegendHighlighted(t.legend)&&(D=!0,N+=t.data)}))),u.createElement("g",{key:a+"".concat(v)},u.createElement("g",(0,o.Cl)({id:"".concat(a,"-singleBar"),ref:function(t){return S.refElement=t}},V),A),!e.props.hideLabels&&e._barWidth>=16&&D&&u.createElement("text",{x:l+e._barWidth/2,y:N>=e.Y_ORIGIN?M-6:M+k+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-label":"Total: ".concat(N),role:"img",transform:"translate(".concat(c,", 0)")},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(N):Ns(N)))}}}));if(!e.props.showXAxisLablesTooltip)try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}if(!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var g=nl(r).call(t);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var y={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:g};g&&ps(y)}return h.filter((function(t){return!!t}))},e._getScales=function(t,n){var i=[Math.min(e.Y_ORIGIN,e._yMin),Math.max(e.Y_ORIGIN,e._yMax)],r=Iu().domain(i).range([0,t-e.margins.bottom-e.margins.top]);if(e._xAxisType===jl.NumericAxis){var o=ri(e._dataset,(function(t){return t.x})),u=ei(e._dataset,(function(t){return t.x})),a=Iu().domain(e._isRtl?[o,u]:[u,o]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]);return Es(e.props.xAxisInnerPadding,e.props.xAxisPadding)||a.nice(),{xBarScale:a,yBarScale:r}}if(e._xAxisType===jl.DateAxis){var l=ei(e._dataset,(function(t){return t.x})),s=ri(e._dataset,(function(t){return t.x})),c=e.props.useUTC?yu():gu();return c.domain(e._isRtl?[s,l]:[l,s]).range([e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]),{xBarScale:c,yBarScale:r}}return{xBarScale:ku().domain(e._xAxisLabels).range(e._isRtl?[n-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,n-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding),yBarScale:r}},e._getGraphData=function(t,n,i,r,o){var u=e._getScales(i,r),a=u.xBarScale,l=u.yBarScale;return e._bars=e._createBar(a,e._yAxisType===Yl.StringAxis?n:l,i,o)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||e.Y_ORIGIN),e._yMin=Math.min(n[0],e.props.yMinValue||e.Y_ORIGIN)}},e._isLegendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n,i){var r,o,u;if(!n){var a=t.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),l=t.chartData.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" "),s=null===(r=t.lineData)||void 0===r?void 0:r.map((function(t){var n=t.legend,i=t.yAxisCalloutData||t.data||t.y;return e._noLegendHighlighted()||e._isLegendHighlighted(n)?"".concat(n,", ").concat(i,"."):""})).filter((function(t){return""!==t})).join(" ");return(null===(o=t.stackCallOutAccessibilityData)||void 0===o?void 0:o.ariaLabel)||"".concat(a,". ").concat(l)+(s?" ".concat(s):"")}var c=t.xAxisCalloutData||!i&&n.xAxisCalloutData||(t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,e.props.culture,e.props.useUTC):t.xAxisPoint),f=n.legend,d=n.yAxisCalloutData||(i?n.data||n.y:n.data);return!i&&(null===(u=n.callOutAccessibilityData)||void 0===u?void 0:u.ariaLabel)||"".concat(c,". ").concat(f,", ").concat(d,".")},e._getDomainMargins=function(t){var n;e._domainMargin=8;var i=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis){if(Es(e.props.xAxisOuterPadding,e.props.xAxisPadding))e._domainMargin=0;else if("auto"!==e.props.barWidth)e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth),i>=(r=ih(e._barWidth,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(i-r)/2);else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=eh(i,e._xAxisLabels.length,e._xAxisInnerPadding),a=Os(e.props.barWidth,e.props.maxBarWidth,u),l=(i-(r=ih(a,e._xAxisLabels.length,e._xAxisInnerPadding)))/2,s=hs(e._xAxisLabels)+20,c=(i-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*s))/2;e._domainMargin=8+Math.max(0,Math.min(l,c))}}else{var f=(null===(n=e.props.data)||void 0===n?void 0:n.map((function(t){return t.xAxisPoint})))||[];e._barWidth=Os(e.props.barWidth,e.props.maxBarWidth,Qv(f,i,e._xAxisInnerPadding)),e._domainMargin=8+e._barWidth/2}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props,n=t.chartTitle,i=t.data,r=Object.keys(e._lineObject).length;return(n?"".concat(n,". "):"")+"Vertical bar chart with ".concat((null==i?void 0:i.length)||0," stacked bars")+(r>0?" and ".concat(r," lines"):"")+". "},e._getMinMaxOfYAxis=function(t,n,i){if(!i)return function(t){var n=ri(t,(function(t){return t.y}));return{startValue:ei(t,(function(t){return t.y})),endValue:n}}(t);var r=[];return e.props.data.forEach((function(t){var n;null===(n=t.lineData)||void 0===n||n.forEach((function(t){t.useSecondaryYScale&&r.push(t.y)}))})),{startValue:ei(r),endValue:ri(r)}},e._initYAxisParams=function(){e._points[0].chartData.length>0?e._yAxisType=Ls(e._points[0].chartData[0].data,!1):Object.keys(e._lineObject).forEach((function(t){e._lineObject[t][0].useSecondaryYScale||(e._yAxisType=Ls(e._lineObject[t][0].y,!1))})),e._yAxisLabels=e._getOrderedYAxisLabels()},e._getYDomainMargins=function(t){var n=0,i=t-e.margins.bottom-e.margins.top;if(e._yAxisType===Yl.StringAxis){var r=0;e._points.forEach((function(t){var n=0;t.chartData.forEach((function(t){n+=e._yAxisLabels.indexOf("".concat(t.data))+1})),r=Math.max(r,n)})),n+=(0===r?0:i/r)*(r-e._yAxisLabels.length)}return(0,o.Cl)((0,o.Cl)({},e.margins),{top:e.margins.top+n})},e._getOrderedXAxisLabels=function(){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(),e.props.xAxisCategoryOrder)},e._getOrderedYAxisLabels=function(){return e._yAxisType!==Yl.StringAxis?[]:$s(e._mapCategoryToValues(!0),e.props.yAxisCategoryOrder)},e._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return e._points.forEach((function(i){var e;i.chartData.forEach((function(e){var r=t?e.data:i.xAxisPoint,o=t?i.xAxisPoint:e.data;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)})),null===(e=i.lineData)||void 0===e||e.forEach((function(e){if(!t||!e.useSecondaryYScale){var r=t?e.y:i.xAxisPoint,o=t?i.xAxisPoint:e.y;n[r]||(n[r]=[]),"number"==typeof o&&n[r].push(o)}}))})),n},lc(e),e.state={isCalloutVisible:!1,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],activeLegend:void 0,refSelected:null,dataForHoverCard:0,color:"",hoverXValue:"",YValueHover:[],xCalloutValue:"",yCalloutValue:"",activeXAxisDataPoint:"",calloutLegend:""},e._handleMouseOut=e._handleMouseOut.bind(e),e._calloutId=p("callout"),e._tooltipId=p("VSBCTooltipId_"),e._isChartEmpty()||(e._adjustProps(),e._dataset=e._createDataSetLayer()),e._createLegendsForLine=(0,an.J9)((function(t){return e._getLineLegends(t)})),e._emptyChartId=p("_VSBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]}),t.height===this.props.height&&t.width===this.props.width&&t.data===this.props.data||(this._adjustProps(),this._dataset=this._createDataSetLayer())},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){this._adjustProps();var n=this.props.data.some((function(t){return t.lineData&&t.lineData.length>0})),i=this._toFocusWholeStack(n),e=this.props.isCalloutForStack,r=void 0!==e&&e;this._dataset=this._createDataSetLayer();var a=this._getLegendData(this._points,this.props.theme.palette,this._createLegendsForLine(this.props.data));this._classNames=ah(this.props.styles,{theme:this.props.theme,href:this.props.href});var l=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),s={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._dataset,chartType:zl.VerticalStackedBarChart,xAxisType:this._xAxisType,calloutProps:l,createYAxis:ss,tickParams:s,legendBars:a,getMinMaxOfYAxis:this._getMinMaxOfYAxis,datasetForXAxisDomain:this._xAxisLabels,isCalloutForStack:i,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:fs,barwidth:this._barWidth,focusZoneDirection:r||n?Ys.horizontal:Ys.vertical,getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,customizedCallout:this._getCustomizedCallout(),onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{ref:this._cartesianChartRef,showRoundOffXTickValues:!Es(this.props.xAxisInnerPadding,this.props.xAxisPadding),yAxisType:this._yAxisType,stringDatasetForYAxisDomain:(0,o.fX)([""],this._yAxisLabels,!0),getYDomainMargins:this._getYDomainMargins,children:function(i){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars),u.createElement("g",null,n&&t._createLines(i.xScale,i.yScalePrimary,i.containerHeight,i.containerWidth,i.yScaleSecondary)))}}))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barWidth=Os(this.props.barWidth,this.props.maxBarWidth);var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.red,t.black],this._xAxisType=Ls(this.props.data[0].xAxisPoint,!0),this._lineObject=this._getFormattedLineData(this.props.data),this._xAxisInnerPadding=Ts(this.props.xAxisInnerPadding,this.props.xAxisPadding,this._xAxisType===jl.StringAxis?2/3:.5),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding,this.props.xAxisPadding,0),this._initYAxisParams()},n.prototype._createDataSetLayer=function(){var t=this,n=this._points.map((function(n){if(t._yAxisType===Yl.StringAxis)return{x:n.xAxisPoint,y:0};var i=0;return n.chartData.forEach((function(t){i+=t.data})),{x:n.xAxisPoint,y:i}}));return this._xAxisLabels=this._getOrderedXAxisLabels(),n},n.prototype._renderCallout=function(t){return t?u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData,Legend:t.legend,YValue:t.yAxisCalloutData,color:t.color,culture:this.props.culture}):null},n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:void 0})},n.prototype._getLegendData=function(t,n,i){var e=this;if(this.props.hideLegend)return u.createElement(u.Fragment,null);var r=[n.blueLight,n.blue,n.blueMid,n.red,n.black],a=[],l=this.props,s=l.allowHoverOnLegend,c=void 0===s||s,f=l.theme;t.forEach((function(t){t.chartData.forEach((function(n){var i,o,u=n.color?n.color:r[Math.floor(4*Math.random()+1)];if(e.props.enableGradient){var l=Math.max((null===(i=t.chartData)||void 0===i?void 0:i.findIndex((function(t){return t.legend===n.legend})))||0,0);u=(null===(o=n.gradient)||void 0===o?void 0:o[0])||oc(l,0,null==f?void 0:f.isInverted)[0]}if(!(a.filter((function(t){return t.title===n.legend&&t.color===u})).length>0)){var s={title:n.legend,color:u,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(n.legend)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};a.push(s)}}))}));var d=[];i&&i.length>0&&i.forEach((function(t){var n={title:t.title,color:t.color,isLineLegendInBarChart:!0,hoverAction:c?function(){e._handleChartMouseLeave(),e._onLegendHover(t.title)}:void 0,onMouseOutAction:c?function(){return e._onLegendLeave()}:void 0};d.push(n)}));var v=d.concat(a);return u.createElement(jf,(0,o.Cl)({legends:v,overflowProps:this.props.legendsOverflowProps,enabledWrapLines:this.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:this.props.focusZonePropsForLegendsInHoverCard,overflowText:this.props.legendsOverflowText},this.props.legendProps,{onChange:this._onLegendSelectionChange.bind(this),ref:this._legendsRef}))},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._onRectHover=function(t,n,i,e){e.persist(),this._onRectFocusHover(t,n,i,e)},n.prototype._onRectFocusHover=function(t,n,i,e){var r,o;if((null===(r=this._calloutAnchorPoint)||void 0===r?void 0:r.chartDataPoint)!==n||(null===(o=this._calloutAnchorPoint)||void 0===o?void 0:o.xAxisDataPoint)!==t){this._calloutAnchorPoint={chartDataPoint:n,xAxisDataPoint:t instanceof Date?(0,_n.Yn)(t,this.props.culture,this.props.useUTC):t.toString()};var u=n.xAxisCalloutData||(t instanceof Date?(0,_n.Yn)(t,this.props.culture,this.props.useUTC):t.toString());this.setState({refSelected:e,isCalloutVisible:this._noLegendHighlighted()||this._isLegendHighlighted(n.legend),calloutLegend:n.legend,dataForHoverCard:n.data,color:i,xCalloutValue:u,yCalloutValue:n.yAxisCalloutData,dataPointCalloutProps:n,callOutAccessibilityData:n.callOutAccessibilityData})}},n.prototype._onStackHover=function(t,n){n.persist(),this._onStackHoverFocus(t,n)},n.prototype._onStackHoverFocus=function(t,n){var i,e,r,u=this;this._noLegendHighlighted()||(t=(0,o.Cl)((0,o.Cl)({},t),{chartData:t.chartData.filter((function(t){return u._isLegendHighlighted(t.legend)})),lineData:null===(i=t.lineData)||void 0===i?void 0:i.filter((function(t){return u._isLegendHighlighted(t.legend)}))}));var a=t.lineData,l=void 0!==a&&a.length>0;l&&a.forEach((function(t){t.data=t.data||t.y,t.shouldDrawBorderBottom=!0})),this.setState({refSelected:n,isCalloutVisible:t.chartData.length>0||(null!==(r=null===(e=t.lineData)||void 0===e?void 0:e.length)&&void 0!==r?r:0)>0,YValueHover:l?(0,o.fX)((0,o.fX)([],a.sort((function(t,n){return t.data<n.data?1:-1})),!0),t.chartData.slice().reverse(),!0):t.chartData.slice().reverse(),hoverXValue:t.xAxisPoint instanceof Date?(0,_n.Yn)(t.xAxisPoint,this.props.culture,this.props.useUTC):t.xAxisPoint,stackCalloutProps:t,activeXAxisDataPoint:t.xAxisPoint,callOutAccessibilityData:t.stackCallOutAccessibilityData})},n.prototype._onRectFocus=function(t,n,i,e){e.refElement&&this._onRectFocusHover(n,t,i,e.refElement)},n.prototype._onStackFocus=function(t,n){n.refElement&&this._onStackHoverFocus(t,n.refElement)},n.prototype._onClick=function(t,n){var i,e;null===(e=(i=this.props).onBarClick)||void 0===e||e.call(i,n,t),this.props.href&&(window.location.href=this.props.href)},n.prototype._getBarGapAndScale=function(t,n,i){var e,r,o=this.props.barGapMax,u=void 0===o?0:o,a=0,l=0;this._yAxisType===Yl.StringAxis?e=null!=i?i:t.reduce((function(t,i){return t+n(i.data)}),0):(a=t.reduce((function(t,n){return t+Math.abs(n.data)}),0),e=null!=i?i:Math.abs(n(a)-n(this.Y_ORIGIN)),t.forEach((function(t){var n=Math.abs(t.data)/a*100;n<1&&0!==n&&(n=1),l+=n})),r=0!==l?l/100:1);var s=u&&t.length-1,c=s&&Math.max(1,Math.min(u,.2*e/s));return{gapHeight:c,heightValueScale:this._yAxisType===Yl.StringAxis?0:(e-c*s)/(a*r),absStackTotal:a}},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.some((function(t){return t.chartData.length>0||t.lineData&&t.lineData.length>0})))},n.defaultProps={maxBarWidth:24,useUTC:!0,xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),sh=(0,r.I)(lh,(function(t){var n=t.shouldHighlight,i=t.href,e=t.theme;return{opacityChangeOnHover:{opacity:n?"":"0.1",cursor:i?"pointer":"default"},tooltip:Ed(e),barLabel:Bd(e)}})),ch=(0,a.Z)(),fh=.1,dh=function(t){function n(n){var i,e=t.call(this,n)||this;return e._isRtl=(0,l.jI)(),e._legendColorMap={},e.Y_ORIGIN=0,e.toImage=function(t){var n,i;return Pf(null===(n=e._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=e._legendsRef.current)||void 0===i?void 0:i.toSVG,e._isRtl,t)},e._getMinMaxOfYAxis=function(t,n,i){var e=[];return t.forEach((function(t){t.groupSeries.forEach((function(t){!i==!t.useSecondaryYScale&&e.push(t.data)}))})),{startValue:ei(e),endValue:ri(e)}},e._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){return o===jl.NumericAxis||o===jl.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:xs(n,i,r)},e._getGraphData=function(t,n,i,r,o,u,a){var l=e._createX0Scale(r);e._barWidth=Os(e.props.barwidth,e.props.maxBarWidth,eh(l.bandwidth(),e._legends.length,fh)),e._groupWidth=ih(e._barWidth,e._legends.length,fh);var s=e._createX1Scale(),c=[];e._datasetForBars.forEach((function(t){c.push(e._buildGraph(t,l,s,n,a,i,o))})),e._groupedVerticalBarGraph=c},e._getMargins=function(t){return e.margins=t},e._createDataSetOfGVBC=function(t){var n=new Set,i=e._getOrderedXAxisLabels(t);t.forEach((function(t){t.series.forEach((function(t){n.add(t.legend)}))}));var r=e._createDataset(t);return{legends:Array.from(n),xAxisLabels:i,datasetForBars:r}},e._getCustomizedCallout=function(){return e.props.onRenderCalloutPerDataPoint?e.props.onRenderCalloutPerDataPoint(e.state.dataPointCalloutProps):null},e._onBarHover=function(t,n,i){i.persist(),e._calloutAnchorPoint!==t&&(e._calloutAnchorPoint=t,e.setState({refSelected:i,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.data,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:e.props.isCalloutForStack?n.stackCallOutAccessibilityData:t.callOutAccessibilityData,YValueHover:n.groupSeries,hoverXValue:t.xAxisCalloutData}))},e._onBarLeave=function(){},e._handleChartMouseLeave=function(){e._calloutAnchorPoint=null,e.setState({isCalloutVisible:!1})},e._onBarFocus=function(t,n,i){e.setState({refSelected:i.currentTarget,isCalloutVisible:e._noLegendHighlighted()||e._legendHighlighted(t.legend),calloutLegend:t.legend,dataForHoverCard:t.data,color:t.color,xCalloutValue:t.xAxisCalloutData,yCalloutValue:t.yAxisCalloutData,dataPointCalloutProps:t,callOutAccessibilityData:e.props.isCalloutForStack?n.stackCallOutAccessibilityData:t.callOutAccessibilityData,YValueHover:n.groupSeries,hoverXValue:t.xAxisCalloutData})},e._redirectToUrl=function(t){t&&(window.location.href=t)},e._buildGraph=function(t,n,i,r,o,a,l){var s=[],c=[],f=Object.keys(t).filter((function(t){return t in e._legendColorMap})),d=ih(e._barWidth,f.length,fh),v=ku().domain(f).range(e._isRtl?[d,0]:[0,d]).paddingInner(fh);if(e._legends.forEach((function(n,i){var a,l=t[n];if(l){var f=l[0].useSecondaryYScale&&o?o:r,d=(null!==(a=v(n))&&void 0!==a?a:0)+(v.bandwidth()-e._barWidth)/2,h=e._legendHighlighted(n)||e._noLegendHighlighted(),g=h?"":"0.1",y=0,m=f(e.Y_ORIGIN),b=m,x=m,w=e.Y_ORIGIN;l.forEach((function(n,r){var o,a;if(n.data){var l=p("GVBC_Gradient")+"_".concat(t.indexNum,"_").concat(i,"_").concat(r);if(e.props.enableGradient){var c=(null===(o=n.gradient)||void 0===o?void 0:o[0])||n.color,v=(null===(a=n.gradient)||void 0===a?void 0:a[1])||n.color;s.push(u.createElement("defs",{key:"defs_".concat(l)},u.createElement("linearGradient",{id:l,x1:"0%",y1:"100%",x2:"0%",y2:"0%"},u.createElement("stop",{offset:"0%",stopColor:c}),u.createElement("stop",{offset:"100%",stopColor:v}))))}var m=.5*(r>0?2:0),C=Math.max(f(e.Y_ORIGIN)-f(Math.abs(n.data)),1),M=n.color;n.data>=e.Y_ORIGIN?w=b-=C+m:x=(w=x+m)+C,s.push(u.createElement("rect",{key:"".concat(t.indexNum,"-").concat(i,"-").concat(r),className:e._classNames.opacityChangeOnHover,height:C,width:e._barWidth,x:d,y:w,"data-is-focusable":!e.props.hideTooltip&&h,opacity:g,fill:e.props.enableGradient?"url(#".concat(l,")"):M,rx:e.props.roundCorners?3:0,onMouseOver:e._onBarHover.bind(e,n,t),onMouseMove:e._onBarHover.bind(e,n,t),onMouseOut:e._onBarLeave,onFocus:e._onBarFocus.bind(e,n,t),onBlur:e._onBarLeave,onClick:e.props.href?e._redirectToUrl.bind(e,e.props.href):n.onClick,"aria-label":e._getAriaLabel(n,t.xAxisPoint),role:"img"})),y+=n.data}})),null!==y&&!e.props.hideLabels&&e._barWidth>=16&&h&&c.push(u.createElement("text",{key:"".concat(t.indexNum,"-").concat(i),x:d+e._barWidth/2,y:y>=e.Y_ORIGIN?b-6:x+12,textAnchor:"middle",className:e._classNames.barLabel,"aria-hidden":!0},"function"==typeof e.props.yAxisTickFormat?e.props.yAxisTickFormat(y):Ns(y)))}})),!e.props.wrapXAxisLables&&e.props.showXAxisLablesTooltip){var h=nl(l).call(n);try{document.getElementById(e._tooltipId)&&document.getElementById(e._tooltipId).remove()}catch(t){}var g={tooltipCls:e._classNames.tooltip,id:e._tooltipId,axis:h};h&&ps(g)}return u.createElement("g",{key:t.indexNum,transform:"translate(".concat(n(t.xAxisPoint)+(n.bandwidth()-d)/2,", 0)")},s,c)},e._createDataset=function(t){var n=[];return t.forEach((function(t,i){var e={},r={};t.series.forEach((function(t){e[t.legend]?(e[t.legend].push((0,o.Cl)({},t)),r[t.legend].data+=t.data):(e[t.legend]=[(0,o.Cl)({},t)],r[t.legend]=(0,o.Cl)({},t))})),e.xAxisPoint=t.name,e.indexNum=i,e.groupSeries=Object.values(r),e.stackCallOutAccessibilityData=t.stackCallOutAccessibilityData,n.push(e)})),n},e._createX0Scale=function(t){return ku().domain(e._xAxisLabels).range(e._isRtl?[t-e.margins.right-e._domainMargin,e.margins.left+e._domainMargin]:[e.margins.left+e._domainMargin,t-e.margins.right-e._domainMargin]).paddingInner(e._xAxisInnerPadding).paddingOuter(e._xAxisOuterPadding)},e._createX1Scale=function(){return ku().domain(e._legends).range(e._isRtl?[e._groupWidth,0]:[0,e._groupWidth]).paddingInner(fh)},e._closeCallout=function(){e.setState({isCalloutVisible:!1})},e._getLegendData=function(){var t=[];return e._legends.forEach((function(n){var i={title:n,color:e._legendColorMap[n][0],hoverAction:function(){e._handleChartMouseLeave(),e._onLegendHover(n)},onMouseOutAction:function(){e._onLegendLeave()}};t.push(i)})),u.createElement(jf,(0,o.Cl)({legends:t,overflowProps:e.props.legendsOverflowProps,enabledWrapLines:e.props.enabledLegendsWrapLines,focusZonePropsInHoverCard:e.props.focusZonePropsForLegendsInHoverCard},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef}))},e._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;e._yMax=Math.max(n[n.length-1],e.props.yMaxValue||0)}},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._getAriaLabel=function(t,n){var i,e=t.xAxisCalloutData||n,r=t.legend,o=t.yAxisCalloutData||t.data;return(null===(i=t.callOutAccessibilityData)||void 0===i?void 0:i.ariaLabel)||"".concat(e,". ").concat(r,", ").concat(o,".")},e._getDomainMargins=function(t){e._domainMargin=8;var n=th(t,e.margins,8);if(e._xAxisType===jl.StringAxis)if(Es(e.props.xAxisOuterPadding))e._domainMargin=0;else if("auto"!==e.props.barwidth){e._barWidth=Os(e.props.barwidth,e.props.maxBarWidth);var i=ih(e._barWidth,e._legends.length,fh);n>=(r=ih(i,e._xAxisLabels.length,e._xAxisInnerPadding))&&(e._domainMargin=8+(n-r)/2)}else if("plotly"===e.props.mode&&e._xAxisLabels.length>1){var r,u=eh(n,e._xAxisLabels.length,e._xAxisInnerPadding),a=eh(u,e._legends.length,fh),l=Os(e.props.barwidth,e.props.maxBarWidth,a),s=(i=ih(l,e._legends.length,fh),(n-(r=ih(i,e._xAxisLabels.length,e._xAxisInnerPadding)))/2),c=hs(e._xAxisLabels)+20,f=(n-(r=(e._xAxisLabels.length-e._xAxisInnerPadding)*c))/2;e._domainMargin=8+Math.max(0,Math.min(s,f))}return(0,o.Cl)((0,o.Cl)({},e.margins),{left:e.margins.left+e._domainMargin,right:e.margins.right+e._domainMargin})},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Vertical bar chart with ".concat(e._xAxisLabels.length," groups of ").concat(e._legends.length," bars each. ")},e._adjustColor=function(t,n,i,e){var r=i?e?"#000000":"#ffffff":e?"#ffffff":"#000000";return Vo(Iu().domain([0,1]).range([t,r])(n)).formatRgb()},e._addDefaultColors=function(t){var n;e._legendColorMap={};var i=0;return null!==(n=null==t?void 0:t.map((function(t){var n,r;return(0,o.Cl)((0,o.Cl)({},t),{series:null!==(r=null===(n=t.series)||void 0===n?void 0:n.map((function(t){var n,r,u,a,l,s,c,f=t.color?t.color:Jl(i,0,null===(n=e.props.theme)||void 0===n?void 0:n.isInverted),d=f;if(e.props.enableGradient)if(t.color)f=e._adjustColor(t.color||d,.2,!1,null===(r=e.props.theme)||void 0===r?void 0:r.isInverted),d=e._adjustColor(t.color||f,.2,!0,null===(u=e.props.theme)||void 0===u?void 0:u.isInverted);else{var v=oc(i,0,null===(a=e.props.theme)||void 0===a?void 0:a.isInverted);f=(null===(l=t.gradient)||void 0===l?void 0:l[0])||v[0],d=(null===(s=t.gradient)||void 0===s?void 0:s[1])||v[1]}var h=[f,d];return e._legendColorMap[t.legend]||(e._legendColorMap[t.legend]=[f,d]),i+=1,(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:null!==(c=t.color)&&void 0!==c?c:e._legendColorMap[t.legend][0]}),e.props.enableGradient?{gradient:h}:{})})))&&void 0!==r?r:[]})})))&&void 0!==n?n:[]},e._getOrderedXAxisLabels=function(t){return e._xAxisType!==jl.StringAxis?[]:$s(e._mapCategoryToValues(t),e.props.xAxisCategoryOrder)},e._mapCategoryToValues=function(t){var n={};return t.forEach((function(t){n[t.name]||(n[t.name]=[]),t.series.forEach((function(i){n[t.name].push(i.data)}))})),n},lc(e),e._createSet=(0,an.J9)((function(t){return e._createDataSetOfGVBC(t)})),e.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,refSelected:null,selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],xCalloutValue:"",yCalloutValue:"",YValueHover:[],hoverXValue:"",calloutLegend:"",activeLegend:""},e._calloutId=p("callout"),e._tooltipId=p("GVBCTooltipId_"),e._emptyChartId=p("_GVBC_empty"),e._domainMargin=8,e._cartesianChartRef=u.createRef(),e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this,n=this._addDefaultColors(this.props.data);this._xAxisType=Ls(n[0].name,!0);var i=this._createSet(n),e=i.legends,r=i.xAxisLabels,a=i.datasetForBars;this._legends=e,this._xAxisLabels=r,this._datasetForBars=a;var l=this._getLegendData();this._adjustProps();var s=this._getMinMaxOfYAxis(this._datasetForBars).endValue;this._yMax=Math.max(s,this.props.yMaxValue||0),this._classNames=ch(this.props.styles,{theme:this.props.theme,href:this.props.href});var c=(0,o.Cl)((0,o.Cl)((0,o.Cl)({target:this.state.refSelected,isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),gapSpace:15,isBeakVisible:!1,setInitialFocus:!0,color:this.state.color,Legend:this.state.calloutLegend,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,YValueHover:this.state.YValueHover,hoverXValue:this.state.hoverXValue,onDismiss:this._closeCallout},this.props.calloutProps),{preventDismissOnLostFocus:!0}),Ds(this.state.callOutAccessibilityData,"text",!1)),f={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:this._datasetForBars,chartType:zl.GroupedVerticalBarChart,calloutProps:c,legendBars:l,xAxisType:this._xAxisType,createYAxis:ss,datasetForXAxisDomain:this._xAxisLabels,tickParams:f,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,createStringYAxis:fs,tickPadding:this.props.tickPadding||5,maxOfYVal:this._yMax,svgFocusZoneProps:{direction:Ys.horizontal},customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,getDomainMargins:this._getDomainMargins},this._xAxisType===jl.StringAxis&&{xAxisInnerPadding:this._xAxisInnerPadding,xAxisOuterPadding:this._xAxisOuterPadding},{barwidth:this._barWidth,ref:this._cartesianChartRef,children:function(){return u.createElement("g",null,t._groupedVerticalBarGraph)}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.activeLegend?[this.state.activeLegend]:[]},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0&&this.props.data.filter((function(t){return t.series.length})).length>0)},n.prototype._adjustProps=function(){this._barWidth=Os(this.props.barwidth,this.props.maxBarWidth),this._xAxisInnerPadding=Ts(this.props.xAxisInnerPadding,void 0,2/(2+nh(this._legends.length,fh))),this._xAxisOuterPadding=Ts(this.props.xAxisOuterPadding)},n.defaultProps={maxBarWidth:24,xAxisCategoryOrder:"default"},n}(u.Component),vh=(0,r.I)(dh,(function(t){var n=t.theme;return{opacityChangeOnHover:{cursor:t.href?"pointer":"default"},tooltip:Ed(n),barLabel:Bd(n)}})),hh=i(263),ph=(0,a.Z)(),gh=function(t){function n(n){var i,e,r=t.call(this,n)||this;return r._rectRefArray={},r.toImage=function(t){var n,i;return Pf(null===(n=r._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=r._legendsRef.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)},r._getMinMaxOfYAxis=function(){return{startValue:0,endValue:0}},r._getDomainNRangeValues=function(t,n,i,e,o,u,a,l,s){return u===jl.NumericAxis||u===jl.DateAxis?{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0}:xs(r.margins,i,o)},r._getXandY=function(){var t="",n="";return r.props.data.forEach((function(i){if(i.data&&i.data.length>0)return t=i.data[0].x,n=i.data[0].y,{x:t,y:n}})),{x:t,y:n}},r._getMargins=function(t){r.margins=t},r._getOpacity=function(t){return r._legendHighlighted(t)||r._noLegendHighlighted()?"1":"0.1"},r._rectRefCallback=function(t,n,i){r._rectRefArray[n]={data:i,refElement:t}},r._onRectFocus=function(t,n){r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData})},r._onRectMouseOver=function(t,n,i){i.persist(),r._calloutAnchorPoint!==n&&(r._calloutAnchorPoint=n,r.setState({target:r._rectRefArray[t].refElement,isCalloutVisible:""===r.state.selectedLegend||r.state.selectedLegend===n.legend,calloutYValue:"".concat(n.rectText),calloutTextColor:Number.isNaN(n.value)?r.props.theme.semanticColors.bodyText:r._colorScale(n.value),calloutLegend:n.legend,ratio:n.ratio||null,descriptionMessage:n.descriptionMessage||"",calloutId:t,callOutAccessibilityData:n.callOutAccessibilityData}))},r._onRectBlurOrMouseOut=function(){},r._handleChartMouseLeave=function(){r._calloutAnchorPoint=null,r.setState({isCalloutVisible:!1})},r._createRectangles=function(){var t=[];return r._stringYAxisDataPoints.slice().reverse().forEach((function(n){var i=0;r._stringXAxisDataPoints.forEach((function(e){var o,a,l,s="x".concat(e,"y").concat(n);if((null===(o=r._dataSet[n][i])||void 0===o?void 0:o.x)===e&&"number"==typeof(null===(a=r._dataSet[n][i])||void 0===a?void 0:a.value)){var c=r._dataSet[n][i],f=zs(r._colorScale(c.value),r.props.theme);l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(c),"data-is-focusable":r._legendHighlighted(c.legend)||r._noLegendHighlighted(),fillOpacity:r._getOpacity(c.legend),transform:"translate(".concat(r._xAxisScale(c.x),", ").concat(r._yAxisScale(c.y),")"),ref:function(t){r._rectRefCallback(t,s,c)},onFocus:r._onRectFocus.bind(r,s,c),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,c),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:r._colorScale(c.value),width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth(),onClick:c.onClick}),u.createElement("text",{dominantBaseline:"middle",textAnchor:"middle",className:r._classNames.text,transform:"translate(".concat(r._xAxisScale.bandwidth()/2,", ").concat(r._yAxisScale.bandwidth()/2,")"),fill:f},(0,_n.c$)(c.rectText,r.props.culture,r.props.useUTC))),i++}else{var d={x:e,y:n,value:NaN,rectText:"No data available",legend:""};l=u.createElement("g",{key:s,role:"img","aria-label":r._getAriaLabel(d),"data-is-focusable":r._noLegendHighlighted(),transform:"translate(".concat(r._xAxisScale(d.x),", ").concat(r._yAxisScale(d.y),")"),ref:function(t){r._rectRefCallback(t,s,d)},onFocus:r._onRectFocus.bind(r,s,d),onBlur:r._onRectBlurOrMouseOut,onMouseOver:r._onRectMouseOver.bind(r,s,d),onMouseOut:r._onRectBlurOrMouseOut},u.createElement("rect",{fill:"transparent",width:r._xAxisScale.bandwidth(),height:r._yAxisScale.bandwidth()}))}t.push(l)}))})),t},r._createLegendBars=function(){var t=r.props,n=t.data,i=t.legendProps,e=[];return n.forEach((function(t){var n={title:t.legend,color:r._colorScale(t.value),action:function(){r._onLegendClick(t.legend)},hoverAction:function(){r._handleChartMouseLeave(),r._onLegendHover(t.legend)},onMouseOutAction:function(){r._onLegendLeave()}};e.push(n)})),u.createElement(jf,(0,o.Cl)({},i,{legends:e,ref:r._legendsRef}))},r._getColorScale=function(){var t=r.props,n=t.domainValuesForColorScale,i=t.rangeValuesForColorScale;return Iu().domain(n).range(i)},r._getXIndex=function(t){return r._xAxisType===jl.DateAxis?"".concat(t.getTime()):r._xAxisType===jl.StringAxis?t:r._xAxisType===jl.NumericAxis?"".concat(t):""},r._getYIndex=function(t){return r._yAxisType===Yl.DateAxis?"".concat(t.getTime()):r._yAxisType===Yl.StringAxis?t:r._yAxisType===Yl.NumericAxis?"".concat(t):""},r._createNewDataSet=function(t,n,i,e,u){var a=[];t.forEach((function(t){t.data.forEach((function(n){a.push((0,o.Cl)((0,o.Cl)({},n),{legend:t.legend}))}))}));var l={},s={},c={};return a.forEach((function(t){var n=r._getXIndex(t.x),i=r._getYIndex(t.y);c[n]="1",s[i]="1",l[i]?l[i]=(0,o.fX)((0,o.fX)([],l[i],!0),[t],!1):l[i]=[t]})),Object.keys(l).forEach((function(t){l[t]=r._getOrderedXPoints(l[t]),l[t].forEach((function(t){r._xAxisType===jl.DateAxis&&(t.x=r._getStringFormattedDate(t.x,n)),r._xAxisType===jl.NumericAxis&&(t.x=r._getStringFormattedNumber(t.x,i)),r._xAxisType===jl.StringAxis&&(t.x=r._getFormattedLabelForXAxisDataPoint(t.x)),r._yAxisType===Yl.DateAxis&&(t.y=r._getStringFormattedDate(t.y,e)),r._yAxisType===Yl.NumericAxis&&(t.y=r._getStringFormattedNumber(t.y,u)),r._yAxisType===Yl.StringAxis&&(t.y=r._getFormattedLabelForYAxisDataPoint(t.y))}))})),Object.keys(l).forEach((function(t){r._yAxisType===Yl.DateAxis?l[r._getStringFormattedDate(t,e)]=l[t]:r._yAxisType===Yl.NumericAxis?l["".concat(r._getStringFormattedNumber(t,u))]=l[t]:l[r._getFormattedLabelForYAxisDataPoint(t)]=l[t]})),{dataSet:l,yAxisPoints:r._getYAxisDataPoints(s),xAxisPoints:r._getXAxisDataPoints(c)}},r._getXAxisDataPoints=function(t){return r._getOrderedXAxisLabels(t).map((function(t){return r._xAxisType===jl.DateAxis?r._getStringFormattedDate(t,r.props.xAxisDateFormatString):r._xAxisType===jl.NumericAxis?r._getStringFormattedNumber(t,r.props.xAxisNumberFormatString):r._getFormattedLabelForXAxisDataPoint(t)}))},r._getYAxisDataPoints=function(t){return r._getOrderedYAxisLabels(t).map((function(t){return r._yAxisType===Yl.DateAxis?r._getStringFormattedDate(t,r.props.yAxisDateFormatString):r._yAxisType===Yl.NumericAxis?r._getStringFormattedNumber(t,r.props.yAxisNumberFormatString):r._getFormattedLabelForYAxisDataPoint(t)}))},r._getStringFormattedDate=function(t,n){var i=new Date;return i.setTime(+t),He(n||"%b/%d")(i)},r._getStringFormattedNumber=function(t,n){return Bu(n||".2~s")(+t)},r._getFormattedLabelForXAxisDataPoint=function(t){var n=r.props.xAxisStringFormatter;return n?n(t):t},r._getFormattedLabelForYAxisDataPoint=function(t){var n=r.props.yAxisStringFormatter;return n?n(t):t},r._closeCallout=function(){r.setState({isCalloutVisible:!1})},r._legendHighlighted=function(t){return r.state.selectedLegend===t||""===r.state.selectedLegend&&r.state.activeLegend===t},r._noLegendHighlighted=function(){return""===r.state.selectedLegend&&""===r.state.activeLegend},r._getAriaLabel=function(t){var n,i=t.x,e=t.y,r=t.legend,o=t.ratio?"".concat(t.ratio[0],"/").concat(t.ratio[1]):t.rectText||t.value,u=t.descriptionMessage;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,", ").concat(e,". ").concat(r,", ").concat(o,".")+(u?" ".concat(u,"."):"")},r._getChartTitle=function(){var t=r.props.chartTitle,n=r.props.data.reduce((function(t,n){return t+n.data.length}),0);return(t?"".concat(t,". "):"")+"Heat map chart with ".concat(n," data points. ")},r._getOrderedXAxisLabels=function(t){return r._shouldOrderXAxisLabelsByCategoryOrder()?$s(r._mapCategoryToValues(),r.props.xAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._xAxisType===jl.DateAxis||r._xAxisType===jl.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedYAxisLabels=function(t){return r._shouldOrderYAxisLabelsByCategoryOrder()?$s(r._mapCategoryToValues(!0),r.props.yAxisCategoryOrder):Object.keys(t).sort((function(t,n){return r._yAxisType===Yl.DateAxis||r._yAxisType===Yl.NumericAxis?+t-+n:"none"===r.props.sortOrder?0:t.toLowerCase()>n.toLowerCase()?1:-1}))},r._getOrderedXPoints=function(t){if(!r._shouldOrderXAxisLabelsByCategoryOrder())return t.sort((function(t,n){return r._xAxisType===jl.StringAxis?"none"===r.props.sortOrder?0:t.x.toLowerCase()>n.x.toLowerCase()?1:-1:r._xAxisType===jl.DateAxis?t.x.getTime()-n.x.getTime():r._xAxisType===jl.NumericAxis?+t.x>+n.x?1:-1:t.x>n.x?1:-1}));var n=[],i={};return t.forEach((function(t){var n=t.x;i[n]||(i[n]=[]),i[n].push(t)})),r._getOrderedXAxisLabels({}).forEach((function(t){i[t]&&n.push.apply(n,i[t])})),n},r._shouldOrderXAxisLabelsByCategoryOrder=function(){return r._xAxisType===jl.StringAxis&&"default"!==r.props.xAxisCategoryOrder},r._shouldOrderYAxisLabelsByCategoryOrder=function(){return r._yAxisType===Yl.StringAxis&&"default"!==r.props.yAxisCategoryOrder},r._mapCategoryToValues=function(t){void 0===t&&(t=!1);var n={};return r.props.data.forEach((function(i){i.data.forEach((function(i){var e=t?i.y:i.x;n[e]||(n[e]=[]),n[e].push(i.value)}))})),n},lc(r),r._createSet=(0,an.J9)((function(t,n,i,e,o){return r._createNewDataSet(t,n,i,e,o)})),r.state={selectedLegend:null!==(e=null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegend)&&void 0!==e?e:"",activeLegend:"",isCalloutVisible:!1,target:null,calloutLegend:"",calloutTextColor:"",calloutYValue:"",ratio:null,descriptionMessage:"",calloutId:""},r._emptyChartId=p("_HeatMap_empty"),r._cartesianChartRef=u.createRef(),r._legendsRef=u.createRef(),r}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e,r;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegend)!==(null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegend)&&this.setState({selectedLegend:null!==(r=null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegend)&&void 0!==r?r:""})},n.prototype.render=function(){var t=this,n=this._getXandY(),i=n.x,e=n.y;this._xAxisType=Ls(i,!0),this._yAxisType=Ls(e,!1);var r=this.props,a=r.data,l=r.xAxisDateFormatString,s=r.xAxisNumberFormatString,c=r.yAxisDateFormatString,f=r.yAxisNumberFormatString;this._colorScale=this._getColorScale();var d=this._createSet(a,l,s,c,f),v=d.dataSet,h=d.xAxisPoints,p=d.yAxisPoints;this._dataSet=v,this._stringYAxisDataPoints=p,this._stringXAxisDataPoints=h,this._classNames=ph(this.props.styles,{theme:this.props.theme});var g=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({isBeakVisible:!1,gapSpace:8},this.props.calloutProps),{isCalloutVisible:this.state.isCalloutVisible,id:this.state.calloutId,YValue:this.state.calloutYValue,legend:this.state.calloutLegend,color:this.state.calloutTextColor,target:this.state.target,styles:this._classNames.subComponentStyles.calloutStyles,directionalHint:3,onDismiss:this._closeCallout}),Ds(this.state.callOutAccessibilityData,"text",!1)),{preventDismissOnLostFocus:!0,calloutMaxWidth:238}),y=(0,o.Cl)((0,o.Cl)({},this.state.ratio&&{ratio:this.state.ratio}),{descriptionMessage:this.state.descriptionMessage}),m={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(qd,(0,o.Cl)({},this.props,{chartTitle:this._getChartTitle(),points:a,chartType:zl.HeatMapChart,xAxisType:jl.StringAxis,yAxisType:Yl.StringAxis,calloutProps:g,createYAxis:ss,chartHoverProps:y,styles:this._classNames.subComponentStyles.cartesianStyles,datasetForXAxisDomain:this._stringXAxisDataPoints,stringDatasetForYAxisDomain:this._stringYAxisDataPoints,createStringYAxis:fs,getDomainNRangeValues:this._getDomainNRangeValues,getMinMaxOfYAxis:this._getMinMaxOfYAxis,getmargins:this._getMargins,xAxisTickCount:this._stringXAxisDataPoints.length,xAxistickSize:0,xAxisPadding:.02,yAxisPadding:.02,svgFocusZoneProps:{direction:Ys.bidirectional},legendBars:this._createLegendBars(),onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,tickParams:m,children:function(n){return t._xAxisScale=n.xScale,t._yAxisScale=n.yScalePrimary,t._createRectangles()}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._onLegendHover=function(t){this.setState({activeLegend:t})},n.prototype._onLegendLeave=function(){this.setState({activeLegend:""})},n.prototype._onLegendClick=function(t){this.state.selectedLegend===t?this.setState({selectedLegend:""}):this.setState({selectedLegend:t})},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.length>0)},n.defaultProps={xAxisCategoryOrder:"default",yAxisCategoryOrder:"default"},n}(u.Component),yh=(0,r.I)(gh,(function(t){return{root:{},text:[t.theme.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold}],subComponentStyles:{}}})),mh=/[\{\}]/g,bh=/\{\d+\}/g;function xh(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var e=n;return t.replace(bh,(function(t){var n=e[t.replace(mh,"")];return null==n&&(n=""),n}))}function wh(t,n){let i=0;if(void 0===n)for(let n of t)(n=+n)&&(i+=n);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(i+=r)}return i}function Ch(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i<n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(i<r||void 0===i&&r>=r)&&(i=r)}return i}function Mh(t,n){return n-1-t.height}function kh(t,n){return t.sourceLinks.length?t.depth:n-1}function Ah(t){return function(){return t}}function Sh(t,n){return Vh(t.source,n.source)||t.index-n.index}function Lh(t,n){return Vh(t.target,n.target)||t.index-n.index}function Vh(t,n){return t.y0-n.y0}function Dh(t){return t.value}function Nh(t){return t.index}function Oh(t){return t.nodes}function Th(t){return t.links}function Eh(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function Fh({nodes:t}){for(const n of t){let t=n.y0,i=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const t of n.targetLinks)t.y1=i+t.width/2,i+=t.width}}function Bh(){let t,n,i,e=0,r=0,o=1,u=1,a=24,l=8,s=Nh,c=kh,f=Oh,d=Th,v=6;function h(){const h={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,i]of t.entries())i.index=n,i.sourceLinks=[],i.targetLinks=[];const e=new Map(t.map(((n,i)=>[s(n,i,t),n])));for(const[t,i]of n.entries()){i.index=t;let{source:n,target:r}=i;"object"!=typeof n&&(n=i.source=Eh(e,n)),"object"!=typeof r&&(r=i.target=Eh(e,r)),n.sourceLinks.push(i),r.targetLinks.push(i)}if(null!=i)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(i),e.sort(i)}(h),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(wh(n.sourceLinks,Dh),wh(n.targetLinks,Dh)):n.fixedValue}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function({nodes:t}){const n=t.length;let i=new Set(t),e=new Set,r=0;for(;i.size;){for(const t of i){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");i=e,e=new Set}}(h),function(i){const s=function({nodes:t}){const i=Ch(t,(t=>t.depth))+1,r=(o-e-a)/(i-1),u=new Array(i);for(const n of t){const t=Math.max(0,Math.min(i-1,Math.floor(c.call(null,n,i))));n.layer=t,n.x0=e+t*r,n.x1=n.x0+a,u[t]?u[t].push(n):u[t]=[n]}if(n)for(const t of u)t.sort(n);return u}(i);t=Math.min(l,(u-r)/(Ch(s,(t=>t.length))-1)),function(n){const i=function(t,n){let i;if(void 0===n)for(const n of t)null!=n&&(i>n||void 0===i&&n>=n)&&(i=n);else{let e=-1;for(let r of t)null!=(r=n(r,++e))&&(i>r||void 0===i&&r>=r)&&(i=r)}return i}(n,(n=>(u-r-(n.length-1)*t)/wh(n,Dh)));for(const e of n){let n=r;for(const r of e){r.y0=n,r.y1=n+r.value*i,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*i}n=(u-n+t)/(e.length+1);for(let t=0;t<e.length;++t){const i=e[t];i.y0+=n*(t+1),i.y1+=n*(t+1)}w(e)}}(s);for(let t=0;t<v;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/v);g(s,n,i),p(s,n,i)}}(h),Fh(h),h}function p(t,i,e){for(let r=1,o=t.length;r<o;++r){const o=t[r];for(const t of o){let n=0,e=0;for(const{source:i,value:r}of t.targetLinks){let o=r*(t.layer-i.layer);n+=C(i,t)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Vh),y(o,e)}}function g(t,i,e){for(let r=t.length-2;r>=0;--r){const o=t[r];for(const t of o){let n=0,e=0;for(const{target:i,value:r}of t.sourceLinks){let o=r*(i.layer-t.layer);n+=M(t,i)*o,e+=o}if(!(e>0))continue;let r=(n/e-t.y0)*i;t.y0+=r,t.y1+=r,x(t)}void 0===n&&o.sort(Vh),y(o,e)}}function y(n,i){const e=n.length>>1,o=n[e];b(n,o.y0-t,e-1,i),m(n,o.y1+t,e+1,i),b(n,u,n.length-1,i),m(n,r,0,i)}function m(n,i,e,r){for(;e<n.length;++e){const o=n[e],u=(i-o.y0)*r;u>1e-6&&(o.y0+=u,o.y1+=u),i=o.y1+t}}function b(n,i,e,r){for(;e>=0;--e){const o=n[e],u=(o.y1-i)*r;u>1e-6&&(o.y0-=u,o.y1-=u),i=o.y0-t}}function x({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(Lh);for(const{target:{targetLinks:n}}of t)n.sort(Sh)}}function w(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(Lh),i.sort(Sh)}function C(n,i){let e=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:o}of n.sourceLinks){if(r===i)break;e+=o+t}for(const{source:t,width:r}of i.targetLinks){if(t===n)break;e-=r}return e}function M(n,i){let e=i.y0-(i.targetLinks.length-1)*t/2;for(const{source:r,width:o}of i.targetLinks){if(r===n)break;e+=o+t}for(const{target:t,width:r}of n.sourceLinks){if(t===i)break;e-=r}return e}return h.update=function(t){return Fh(t),t},h.nodeId=function(t){return arguments.length?(s="function"==typeof t?t:Ah(t),h):s},h.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Ah(t),h):c},h.nodeSort=function(t){return arguments.length?(n=t,h):n},h.nodeWidth=function(t){return arguments.length?(a=+t,h):a},h.nodePadding=function(n){return arguments.length?(l=t=+n,h):l},h.nodes=function(t){return arguments.length?(f="function"==typeof t?t:Ah(t),h):f},h.links=function(t){return arguments.length?(d="function"==typeof t?t:Ah(t),h):d},h.linkSort=function(t){return arguments.length?(i=t,h):i},h.size=function(t){return arguments.length?(e=r=0,o=+t[0],u=+t[1],h):[o-e,u-r]},h.extent=function(t){return arguments.length?(e=+t[0][0],o=+t[1][0],r=+t[0][1],u=+t[1][1],h):[[e,r],[o,u]]},h.iterations=function(t){return arguments.length?(v=+t,h):v},h}class Ph{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}var _h=(0,a.Z)(),Hh="#757575",Ih=[{fillColor:"#00758F",borderColor:"#002E39"},{fillColor:"#77004D",borderColor:"#43002C"},{fillColor:"#4F6BED",borderColor:"#3B52B4"},{fillColor:"#937600",borderColor:"#6D5700"},{fillColor:"#286EA8",borderColor:"#00457E"},{fillColor:"#A43FB1",borderColor:"#7C158A"},{fillColor:"#CC3595",borderColor:"#7F215D"},{fillColor:"#0E7878",borderColor:"#004E4E"},{fillColor:"#8764B8",borderColor:"#4B3867"},{fillColor:"#9C663F",borderColor:"#6D4123"}];function Wh(t){return"number"==typeof t?t:t.nodeId}function Rh(t,n){return t[Wh(n.source)][Wh(n.target)]}var $h="...";function zh(t,n){var i;try{return t.text(n),null===(i=t.node())||void 0===i?void 0:i.getComputedTextLength()}finally{t.text(null)}}var jh,Yh,Xh=Nv().x((function(t){return t.x})).y0((function(t){return t.y0})).y1((function(t){return t.y1})).curve((function(t){return new Ph(t,!0)})),Gh=function(t){function n(n){var i=t.call(this,n)||this;return i._isRtl=(0,l.jI)(),i._numColumns=0,i.toImage=function(t){return Pf(i.chartContainer,void 0,i._isRtl,t)},i._onCloseCallout=function(){i.setState({isCalloutVisible:!1,refSelected:void 0,descriptionMessage:""})},i._onBlur=function(){},i._fillNodeColors=function(t){var n=i.state;if(!n.selectedState)return t.color;var e=n.selectedNode;return e&&n.selectedNodes.has(t.index)?e.color:e?void 0:t.color},i._fillNodeBorder=function(t){var n=i.state;if(n.selectedState){if(n.selectedNodes.has(t.index)){var e=n.selectedNode;return e?e.borderColor:t.borderColor}return t.borderColor}return t.borderColor},i._calculateChartMinWidth=function(){return i._margins.left+i._margins.right+124*i._numColumns+62*(i._numColumns-1)},lc(i),i.state={containerHeight:468,containerWidth:912,selectedState:!1,selectedLinks:new Set,selectedNodes:new Set,shouldOverflow:!1,isCalloutVisible:!1},i._calloutId=p("callout"),i._linkId=p("link"),i._chartId=p("sankeyChart"),i._emptyChartId=p("_SankeyChart_empty"),i._labelTooltipId=p("tooltip"),i._margins={top:36,right:48,bottom:32,left:48},i._computeClassNamesProps=(0,an.J9)((function(t,n,i,e,r,o){return{theme:t,width:e,height:r,pathColor:n,className:i,enableReflow:o}})),i._computeClassNames=(0,an.J9)((function(t,n){return _h(t,n)})),i._normalizeData=(0,an.J9)((function(t,n,e,r,o){return i._normalizeSankeyData(t,n,e,r,o)})),i._fetchTooltip=(0,an.J9)((function(t){return i._labelTooltipDiv(t)})),i._strings=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkFrom)||"From {0}";return{linkFrom:function(t){return xh(n,t.name)}}}))(n.strings),i._accessibility=(0,an.J9)((function(t){var n=(null==t?void 0:t.linkAriaLabel)||"link from {0} to {1} with weight {2}",e=(null==t?void 0:t.nodeAriaLabel)||"node {0} with weight {1}";return{emptyAriaLabel:(null==t?void 0:t.emptyAriaLabel)||"Graph has no data to display",linkAriaLabel:function(t){return xh(n,t.source.name,t.target.name,t.unnormalizedValue?i._formatNumber(t.unnormalizedValue):t.unnormalizedValue)},nodeAriaLabel:function(t,n){return xh(e,t.name,i._formatNumber(n))}}}))(n.accessibility),i._nodeAttributes=(0,an.J9)((function(t,n){return i._computeNodeAttributes(t,n)})),i._fetchNodes=function(t,n,e,r){return i._createNodes(t,n,e,r)},i._linkAttributes=(0,an.J9)((function(t,n,i){return function(t,n,i){var e={};return t.forEach((function(t){var r=Wh(t.source),o=e[r];o||(o={},e[r]=o),o[Wh(t.target)]={reactId:p("link"),from:n(t.source),aria:i(t)}})),e}(t,n,i)})),i._fetchLinks=function(t,n){return i._createLinks(t,n)},i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._fitParentContainer()},n.prototype.componentDidUpdate=function(t){t.shouldResize!==this.props.shouldResize&&this._fitParentContainer()},n.prototype.componentWillUnmount=function(){cancelAnimationFrame(this._reqID)},n.prototype.render=function(){var t=this;if(!this._isChartEmpty()){var n=this.props,i=n.theme,e=n.className,r=n.styles,a=n.pathColor,l=n.colorsForNodes,s=n.borderColorsForNodes,c=this.state,f=this._computeClassNamesProps(i,a,e,c.containerWidth,c.containerHeight,this.props.enableReflow),d=this._computeClassNames(r,f),v=this._normalizeData(this.props.data.SankeyChartData,c.containerWidth,c.containerHeight,l,s),h=v.nodes,p=v.links,g=v.width,y=v.height,m=[];h.sort((function(t,n){return t.x0!==n.x0?t.x0-n.x0:t.y0-n.y0})),h.forEach((function(t,n){m.push({layer:t.layer,type:"node",index:n})})),p.sort((function(t,n){var i=t.source.x0,e=n.source.x0;return i!==e?i-e:t.y0-n.y0})),p.forEach((function(t,n){m.push({layer:t.source.layer,type:"link",index:n})})),m.sort((function(t,n){return t.layer!==n.layer?t.layer-n.layer:t.type>n.type?-1:t.type<n.type?1:0}));var b=this._fetchTooltip(d),x=this._nodeAttributes(h,this._accessibility.nodeAriaLabel),w=this._fetchNodes(d,h,x,b),C=this._linkAttributes(p,this._strings.linkFrom,this._accessibility.linkAriaLabel),M=this._fetchLinks(p,C),k=(0,o.Cl)({isCalloutVisible:c.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:c.refSelected,color:c.color,XValue:c.xCalloutValue,YValue:c.yCalloutValue?c.yCalloutValue:c.dataForHoverCard,descriptionMessage:c.descriptionMessage,isBeakVisible:!1,gapSpace:15,onDismiss:this._onCloseCallout,className:d.calloutContentRoot,preventDismissOnLostFocus:!0},this.props.calloutProps);return u.createElement("div",{className:d.root,role:"presentation",ref:function(n){return t.chartContainer=n},onMouseLeave:this._onCloseCallout},u.createElement(Dc,{direction:Ys.vertical,className:d.chartWrapper},u.createElement("svg",{width:g,height:y,id:this._chartId,className:d.chart},m.map((function(t){return"node"===t.type?u.createElement("g",{key:h[t.index].nodeId,className:d.nodes},w[t.index]):u.createElement("g",{key:"".concat(p[t.index].source.nodeId,"-").concat(p[t.index].target.nodeId),className:d.links,strokeOpacity:1},M[t.index])})),k.isCalloutVisible&&u.createElement(Pn,(0,o.Cl)({},k),u.createElement(Js.ChartHoverCard,{XValue:k.XValue,YValue:k.YValue,color:k.color,descriptionMessage:k.descriptionMessage?k.descriptionMessage:""})))))}return u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":this._accessibility.emptyAriaLabel})},n.prototype._computeNodeAttributes=function(t,n){var i=this,e={},r=nl(".nodeName").append("text").attr("class","tempText").append("tspan").text(null),o=nl(".nodeName").append("text").attr("class","tempText").attr("font-size","10").append("tspan").text(null);return t.forEach((function(t){var u=Math.max(t.y1-t.y0,0),a=8,l=0,s=t.actualValue;if(u<36){a+=6;var c=zh(r,i._formatNumber(s));void 0!==c&&(a+=l=c)}var f=function(t,n,i,e){var r=i-e;if(function(t,n,i){var e=zh(t,n);return void 0!==e&&e<=i}(t,n,r))return n;for(var o=function(t){var n=zh(t,$h);return void 0===n?0:n}(t),u="",a=0;a<n.length;a++){u+=n[a],t.text(u);var l=t.node();if(null!==l&&l.getComputedTextLength()>=r-o){u=u.slice(0,-1),u+=$h;break}}return t.text(null),u}(o,t.name,116,a),d=f.slice(-3)===$h;e[t.nodeId]={reactId:p("nodeBar"),gElementId:p("nodeGElement"),name:f,aria:n(t,s),trimmed:d,height:u,weightOffset:l}})),il(".tempText").remove(),e},n.prototype._linkCalloutAttributes=function(t,n){return{selectedLink:t,isCalloutVisible:!0,color:t.source.color,xCalloutValue:t.target.name,yCalloutValue:this._formatNumber(t.unnormalizedValue),descriptionMessage:n}},n.prototype._normalizeSankeyData=function(t,n,i,e,r){var u=function(t,n,i,e){var r=t.left,o=t.right,u=t.top,a=t.bottom;return{sankey:Bh().nodeWidth(124).extent([[r,u],[n-o,i-a]]).nodeAlign(e?Mh:kh),height:i,width:n}}(this._margins,n,i,this._isRtl),a=u.sankey,l=u.height,s=u.width,c=function(t){return{nodes:t.nodes.map((function(t){return(0,o.Cl)({},t)})),links:t.links.map((function(t){return(0,o.Cl)({},t)}))}}(t);a(c);var f=function(t){var n={};return t.nodes.forEach((function(t){var i=t.layer;n[i]?n[i].push(t):n[i]=[t]})),n}(c);this._numColumns=Object.keys(f).length;var d,v,h=(d=c.nodes,v={},d.forEach((function(t){v[t.nodeId]=t.value})),v),p=function(t){var n={};return t.forEach((function(t){var i=Wh(t.source),e=n[i];e||(e={},n[i]=e),e[Wh(t.target)]=t.value})),n}(c.links);return function(t,n,i){Object.values(t).map((function(t){return oi(t,(function(t){return t.value}))})).forEach((function(e,r){var o=0,u=.01*e,a=t[r];a.forEach((function(t){var i=n[t.nodeId],r=i/e*100;t.actualValue=i,r<1?(t.value=u,o+=1):o+=r}));var l=0!==o?o/100:1;l>1&&a.forEach((function(t){var e=t.value=t.value/l;!function(t,n,i,e){var r=function(t){var r=Rh(e,t);t.unnormalizedValue=r;var o=r/n;t.value=Math.max(i*o,t.value)};t.sourceLinks.forEach(r),t.targetLinks.forEach(r)}(t,n[t.nodeId],e,i)}))}))}(f,h,p),function(t,n,i){var e=t.nodePadding(),r=.3*n;Object.values(i).forEach((function(t){var i=n-oi(t,(function(t){return t.y1-t.y0}));r<i&&(e=Math.min(e,r/(t.length-1)))})),t.nodePadding(e)}(a,i-this._margins.top-this._margins.bottom,f),a(c),function(t,n,i){t.links.forEach((function(t){t.unnormalizedValue||(t.unnormalizedValue=Rh(i,t))})),t.nodes.forEach((function(t){t.actualValue=n[t.nodeId]}))}(c,h,p),function(t,n,i){var e,r;n&&i?(e=n,r=i):(e=Ih.map((function(t){return t.fillColor})),r=Ih.map((function(t){return t.borderColor})));var o=0;t.forEach((function(t){t.color||t.borderColor?t.color&&!t.borderColor?t.borderColor="#757575":t.borderColor&&!t.color&&(t.color="#F5F5F5"):(t.color=e[o],t.borderColor=r[o]),o=(o+1)%e.length}))}(c.nodes,e,r),{width:s,height:l,nodes:c.nodes,links:c.links}},n.prototype._labelTooltipDiv=function(t){var n=nl("#".concat(this._labelTooltipId));return n.empty()&&(n=nl("body").append("div").attr("id",this._labelTooltipId).attr("class",t.toolTip).style("opacity",0)),n.attr("class",t.toolTip),n},n.prototype._createLinks=function(t,n){var i=this;if(t){var e=this._linkId;return t.map((function(t,r){var o,a,l,s,c=Rh(n,t),f=c.reactId,d=c.from,v=c.aria,h=(a=.5*(o=t).width,l=o.y0,s=o.y1,[{x:o.source.x1,y0:l+a,y1:l-a},{x:o.target.x0,y0:s+a,y1:s-a}]),p="".concat(e,"-").concat(r),g="gradient-".concat(p),y="url(#".concat(g,")"),m=t.source,b=t.target;return u.createElement("g",{key:p},u.createElement("defs",null,u.createElement("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u.createElement("stop",{offset:"0",stopColor:m.color}),u.createElement("stop",{offset:"100%",stopColor:b.color}))),u.createElement("path",{d:Xh(h),id:f,fill:i._fillStreamColors(t,y),stroke:i._fillStreamBorder(t,y),strokeWidth:"2",strokeOpacity:i._getOpacityStreamBorder(t),onMouseOver:function(n){return i._onStreamHover(n,t,d)},onMouseOut:function(){i._onStreamLeave(t)},onFocus:function(n){return i._onFocusLink(n,t,d)},onBlur:i._onBlur,fillOpacity:i._getOpacityStream(t),"data-is-focusable":!0,"aria-label":v,role:"img"}))}))}return[]},n.prototype._createNodes=function(t,n,i,e){var r=this;if(n){var o=this.state,a=this._isRtl?"end":"start";return n.map((function(n,l){var s=i[n.nodeId],c=s.reactId,f=s.gElementId,d=s.height,v=s.trimmed,h=s.name,p=s.weightOffset,g=s.aria,y=d>36,m=n.name,b=n.actualValue,x=n.x0,w=n.x1,C=n.y0,M=function(t,n){return!t.selectedState||t.selectedNodes.has(n.index)&&t.selectedNode||!t.selectedNode?"#FFFFFF":"#323130"}(o,n);return u.createElement("g",{key:l,id:f},u.createElement("rect",{x:x,y:C,height:d,width:w-x,fill:r._fillNodeColors(n),id:c,onMouseOver:r._onHover.bind(r,n),onMouseOut:function(){r._onLeave(n)},onFocus:r._onCloseCallout.bind(r),stroke:r._fillNodeBorder(n),strokeWidth:"2",opacity:"1","data-is-focusable":!0,"aria-label":g,role:"img"}),d>24&&u.createElement("g",{className:t.nodeTextContainer},u.createElement("g",{className:"nodeName"},u.createElement("text",{id:"".concat(c,"-name"),x:x,y:C,dy:"1.2em",dx:"0.4em",textAnchor:a,fontWeight:"regular","aria-hidden":"true",fill:M,fontSize:10,onMouseOver:r._showTooltip.bind(r,m,v,e),onMouseOut:r._hideTooltip.bind(r,e)},h)),u.createElement("text",{x:y?x:w-p-8,y:C,dy:y?"2em":"1em",dx:y?"0.4em":"0em",textAnchor:a,fontWeight:"bold","aria-hidden":"true",fill:M,fontSize:14},b?r._formatNumber(b):b)))}))}},n.prototype._onLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedNode:void 0})},n.prototype._onHover=function(t,n){if(n.persist(),this._onCloseCallout(),!this.state.selectedState){var i=function(t){var n=new Array,i=new Set;for(t.sourceLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;)(e=n.shift().target)&&e.sourceLinks&&e.sourceLinks.forEach((function(t){i.add(t),n.push(t)}));for(t.targetLinks&&t.targetLinks.forEach((function(t){n.push(t),i.add(t)}));n.length>0;){var e;(e=n.shift().source)&&e.targetLinks&&e.targetLinks.forEach((function(t){i.add(t),n.push(t)}))}return i}(t),e=function(t){var n=[];return t.forEach((function(t){n.push(t.target),-1===n.indexOf(t.source)&&n.push(t.source)})),n}(i);e.push(t),this.setState({selectedState:!0,selectedNodes:new Set(Array.from(e).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(i).map((function(t){return t.index}))),selectedNode:t,refSelected:n,isCalloutVisible:t.y1-t.y0<24,color:t.color,xCalloutValue:t.name,yCalloutValue:this._formatNumber(t.actualValue)})}},n.prototype._formatNumber=function(t){return this.props.formatNumberOptions?t.toLocaleString(void 0,this.props.formatNumberOptions):t.toString()},n.prototype._onStreamHover=function(t,n,i){if(t.persist(),this._onCloseCallout(),!this.state.selectedState){var e=function(t){var n=new Array,i=new Set,e=new Set;for(n.push(t.source),i.add(t);n.length>0;){var r=n.shift();e.add(r),r.targetLinks&&r.targetLinks.length>0&&r.targetLinks.forEach((function(t){n.push(t.source),i.add(t)}))}for(n.push(t.target);n.length>0;)r=n.shift(),e.add(r),r.sourceLinks&&r.sourceLinks.length>0&&r.sourceLinks.forEach((function(t){n.push(t.target),i.add(t)}));return{selectedLinks:i,selectedNodes:e}}(n),r=e.selectedLinks,u=e.selectedNodes;this.setState((0,o.Cl)({selectedState:!0,selectedNodes:new Set(Array.from(u).map((function(t){return t.index}))),selectedLinks:new Set(Array.from(r).map((function(t){return t.index}))),refSelected:t},this._linkCalloutAttributes(n,i)))}},n.prototype._onStreamLeave=function(t){this.state.selectedState&&this.setState({selectedState:!1,selectedNodes:new Set,selectedLinks:new Set,selectedLink:void 0})},n.prototype._onFocusLink=function(t,n,i){t.persist(),this._onCloseCallout(),this.setState((0,o.Cl)({refSelected:t.currentTarget},this._linkCalloutAttributes(n,i)))},n.prototype._fillStreamColors=function(t,n){var i=this.state;if(i.selectedState&&i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.color:n}},n.prototype._fillStreamBorder=function(t,n){var i=this.state;if(i.selectedState){if(i.selectedLinks.has(t.index)){var e=i.selectedNode;return e?e.borderColor:n}return Hh}return Hh},n.prototype._getOpacityStream=function(t){var n=this.state;if(n.selectedState){if(!n.selectedLinks.has(t.index))return 1;if(!n.selectedNode)return.3}return 1},n.prototype._getOpacityStreamBorder=function(t){var n=this.state;return!n.selectedState||n.selectedLinks.has(t.index)||n.selectedNode?1:.5},n.prototype._fitParentContainer=function(){var t=this,n=this.state,i=n.containerWidth,e=n.containerHeight;this._reqID=requestAnimationFrame((function(){var n=t.props.parentRef?t.props.parentRef:t.chartContainer,r=n&&(t.props.enableReflow?Math.max(n.getBoundingClientRect().width,t._calculateChartMinWidth()):n.getBoundingClientRect().width),o=n&&n.getBoundingClientRect().height;(i!==r||e!==o)&&t.setState({containerWidth:r,containerHeight:o})}))},n.prototype._showTooltip=function(t,n,i,e){n&&(i.style("opacity",.9).style("color",this.props.theme.palette.neutralPrimary),i.html(t).style("left",e.pageX+"px").style("top",e.pageY-28+"px"))},n.prototype._hideTooltip=function(t){t.style("opacity",0)},n.prototype._isChartEmpty=function(){var t,n=null===(t=this.props.data)||void 0===t?void 0:t.SankeyChartData;return!(n&&n.nodes.length>0&&n.links.length>0)},n.defaultProps={enableReflow:!0},n}(u.Component),qh=(0,r.I)(Gh,(function(t){var n,i,e,r=t.className,u=t.theme,a=t.pathColor,l=t.enableReflow,s=u.effects;return{root:[u.fonts.medium,{display:"flex",width:"100%",height:"100%",flexDirection:"column",overflow:"hidden"},r],links:{stroke:a||u.palette.black,fill:u?u.semanticColors.bodyBackground:"#F5F5F5",strokeWidth:3,selectors:(n={},n[It.up]={fill:"Canvas"},n)},nodes:{fill:"#F5F5F5",selectors:(i={},i[It.up]={fill:"Canvas"},i)},toolTip:Ed(t.theme),nodeTextContainer:{selectors:{text:{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}},marginTop:"4px",marginLeft:"8px",marginBottom:"4px",marginRight:"8px"},calloutContentRoot:{boxShadow:s.elevation4},chartWrapper:(0,o.Cl)({},l?{overflow:"auto"}:{}),chart:{display:"block"}}}));function Uh(t){var n=0,i=t.children,e=i&&i.length;if(e)for(;--e>=0;)n+=i[e].value;else n=1;t.value=n}function Zh(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Jh)):void 0===n&&(n=Kh);for(var i,e,r,o,u,a=new np(t),l=[a];i=l.pop();)if((r=n(i.data))&&(u=(r=Array.from(r)).length))for(i.children=r,o=u-1;o>=0;--o)l.push(e=r[o]=new np(r[o])),e.parent=i,e.depth=i.depth+1;return a.eachBefore(tp)}function Kh(t){return t.children}function Jh(t){return Array.isArray(t)?t[1]:null}function Qh(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function tp(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function np(t){this.data=t,this.depth=this.height=0,this.parent=null}function ip(t,n){return t.parent===n.parent?1:2}function ep(t){var n=t.children;return n?n[0]:t.t}function rp(t){var n=t.children;return n?n[n.length-1]:t.t}function op(t,n,i){var e=i/(n.i-t.i);n.c-=e,n.s+=i,t.c+=e,n.z+=i,n.m+=i}function up(t,n,i){return t.a.parent===n.parent?t.a:i}function ap(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}!function(t){t[t.long=1]="long",t[t.compact=0]="compact"}(jh||(jh={})),function(t){t[t.preOrder=1]="preOrder",t[t.levelOrder=0]="levelOrder"}(Yh||(Yh={})),np.prototype=Zh.prototype={constructor:np,count:function(){return this.eachAfter(Uh)},each:function(t,n){let i=-1;for(const e of this)t.call(n,e,++i,this);return this},eachAfter:function(t,n){for(var i,e,r,o=this,u=[o],a=[],l=-1;o=u.pop();)if(a.push(o),i=o.children)for(e=0,r=i.length;e<r;++e)u.push(i[e]);for(;o=a.pop();)t.call(n,o,++l,this);return this},eachBefore:function(t,n){for(var i,e,r=this,o=[r],u=-1;r=o.pop();)if(t.call(n,r,++u,this),i=r.children)for(e=i.length-1;e>=0;--e)o.push(i[e]);return this},find:function(t,n){let i=-1;for(const e of this)if(t.call(n,e,++i,this))return e},sum:function(t){return this.eachAfter((function(n){for(var i=+t(n.data)||0,e=n.children,r=e&&e.length;--r>=0;)i+=e[r].value;n.value=i}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,i=function(t,n){if(t===n)return t;var i=t.ancestors(),e=n.ancestors(),r=null;for(t=i.pop(),n=e.pop();t===n;)r=t,t=i.pop(),n=e.pop();return r}(n,t),e=[n];n!==i;)n=n.parent,e.push(n);for(var r=e.length;t!==i;)e.splice(r,0,t),t=t.parent;return e},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(i){i!==t&&n.push({source:i.parent,target:i})})),n},copy:function(){return Zh(this).eachBefore(Qh)},[Symbol.iterator]:function*(){var t,n,i,e,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(i=0,e=n.length;i<e;++i)o.push(n[i])}while(o.length)}},ap.prototype=Object.create(np.prototype);var lp=(0,a.Z)(),sp=function(t){function n(n,i,e,r,o,u){void 0===r&&(r=[]),void 0===o&&(o=[]);var a=t.call(this,n,e,r,o)||this;return a.composition=i,a._treeTraversal=u,a}return(0,o.C6)(n,t),n.prototype.C=function(t,n){var i,e,r,o,u,a,l=(t=t<65?65:t>90?90:t)||75,s=Zh(this.treeData,(function(t){return t.children})),c=(null==s?void 0:s.height)+1;(function(){var t=ip,n=1,i=1,e=null;function r(r){var l=function(t){for(var n,i,e,r,o,u=new ap(t,0),a=[u];n=a.pop();)if(e=n._.children)for(n.children=new Array(o=e.length),r=o-1;r>=0;--r)a.push(i=n.children[r]=new ap(e[r],r)),i.parent=n;return(u.parent=new ap(null,0)).children=[u],u}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(u),e)r.eachBefore(a);else{var s=r,c=r,f=r;r.eachBefore((function(t){t.x<s.x&&(s=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)}));var d=s===c?1:t(s,c)/2,v=d-s.x,h=n/(c.x+d+v),p=i/(f.depth||1);r.eachBefore((function(t){t.x=(t.x+v)*h,t.y=t.depth*p}))}return r}function o(n){var i=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(i){!function(t){for(var n,i=0,e=0,r=t.children,o=r.length;--o>=0;)(n=r[o]).z+=i,n.m+=i,i+=n.s+(e+=n.c)}(n);var o=(i[0].z+i[i.length-1].z)/2;r?(n.z=r.z+t(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+t(n._,r._));n.parent.A=function(n,i,e){if(i){for(var r,o=n,u=n,a=i,l=o.parent.children[0],s=o.m,c=u.m,f=a.m,d=l.m;a=rp(a),o=ep(o),a&&o;)l=ep(l),(u=rp(u)).a=n,(r=a.z+f-o.z-s+t(a._,o._))>0&&(op(up(a,n,e),n,r),s+=r,c+=r),f+=a.m,s+=o.m,d+=l.m,c+=u.m;a&&!rp(u)&&(u.t=a,u.m+=f-c),o&&!ep(l)&&(l.t=o,l.m+=s-d,e=n)}return e}(n,r,n.parent.A||e[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*i}return r.separation=function(n){return arguments.length?(t=n,r):t},r.size=function(t){return arguments.length?(e=!1,n=+t[0],i=+t[1],r):e?null:[n,i]},r.nodeSize=function(t){return arguments.length?(e=!0,n=+t[0],i=+t[1],r):e?[n,i]:null},r})().nodeSize([l,l/1.5]).separation((function(t,n){return t.parent===s&&n.parent===s?3.5:1}))(s).descendants().forEach((function(t){t.y=0===t.depth?10:130*t.depth,t.x+=n/2}));var f=[],d=0,v=function(t){var n,i;t.id=d,f.push({id:d,children:t.children,dataName:t.data.name,subName:t.data.subname,bodyText:t.data.bodytext,metricName:null===(n=t.data)||void 0===n?void 0:n.metric,fill:t.data.fill,x:t.x,y:t.y,parentID:null===(i=t.parent)||void 0===i?void 0:i.id}),d++};0===this._treeTraversal?s.each((function(t){v(t)})):s.eachBefore((function(t){v(t)}));for(var h=3*l,p=h/3.45,g=20,y=new Set,m=0,b=f;m<b.length;m++){var x=b[m],w=0===x.id?"Root Node":"Parent info parentId: ".concat(x.parentID,"\n ").concat(f[x.parentID].dataName,"\n ").concat(f[x.parentID].subName);if(!x.children&&!y.has(x.parentID)&&3===c){var C=(h-g)/2,M=p;y.add(x.parentID),this.D(x.id,f[x.parentID].x,f[x.parentID].y,f[x.id].x,f[x.id].y,!0,h,p,g);for(var k=null===(i=f[x.parentID])||void 0===i?void 0:i.children,A=(null===(e=f[x.parentID])||void 0===e?void 0:e.x)-C/2-10,S=(null===(r=f[x.parentID])||void 0===r?void 0:r.x)+C/2+10,L=null===(o=f[x.parentID])||void 0===o?void 0:o.x,V=null===(u=k[0])||void 0===u?void 0:u.y,D=0;D<k.length;++D){var N=k[D];void 0!==this.composition?0===this.composition?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?1===k.length?L:A:S,V,N.data.fill,1===k.length?h:C,p,N.id,w),D%2==1&&(V+=M+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=M+g):k.length>2?(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,D%2==0?A:S,V,N.data.fill,1===k.length?h:C,p,N.id,w),D%2==1&&(V+=M+g)):(this.N(N.data.name,N.data.subname,N.data.bodytext,N.data.metricName,L,V,N.data.fill,h,p,N.id,w),V+=M+g)}}if((x.children||c<=2)&&(this.N(x.dataName,x.subName,x.bodyText,x.metricName,x.x,x.y,x.fill,h,p,x.id,w),0===x.id&&x.children)){var O=ei(k=null===(a=f[x.id])||void 0===a?void 0:a.children,(function(t){return t.x})),T=ri(k,(function(t){return t.x}));this.D(x.id,x.x,x.y,O,x.children[0].y,!1,h,p,g,T)}}},n}(function(){function t(t,n,i,e){void 0===i&&(i=[]),void 0===e&&(e=[]),this._nodeElements=[],this._linkElements=[],this.treeData=t,this.styleClassNames=n,this._nodeElements=i,this._linkElements=e}return t.prototype.O=function(t,n,i,e){var r,o=t.split(/\s+/).reverse(),u="",a=nl(".svgTree").append("text").attr("class","tempText").append("tspan").text(null);e&&a.attr("class",e);for(var l=[];u=o.pop();)if(l.push(u),a.text(l.join(" ")+" "),null!==a.node()&&a.node().getComputedTextLength()>n-i){l.pop(),l.push("...");break}return r=l.join(" ")+" ",a.text(null),il(".tempText").remove(),r},t.prototype.N=function(t,n,i,e,r,o,a,l,s,c,f){var d="nodeId: ".concat(c," \nnodeMainText: ").concat(t,"\nsubText ").concat(n," ").concat(f),v=r-l/2;!e&&0===c&&i||this._nodeElements.push(u.createElement("rect",{width:l,height:s,x:v,y:o,tabIndex:0,role:"text","data-is-focusable":!0,"aria-label":d,className:this.styleClassNames.rectNode,stroke:a,key:"".concat(c).concat(this.styleClassNames.rectNode)})),n&&(n=this.O(n,l,l/4,this.styleClassNames.rectSubText)),i&&(i=this.O(i,l,l/4,this.styleClassNames.rectBodyText)),e&&(e=this.O(e,l,l/4,this.styleClassNames.rectMetricText)),t=this.O(t,l,l/4,this.styleClassNames.rectText);var h=e?u.createElement("tspan",{className:this.styleClassNames.rectMetricText,dy:"1.4em",x:v+l/2},e):i?u.createElement(u.Fragment,null,u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n),u.createElement("tspan",{className:this.styleClassNames.rectBodyText,dy:"1.4em",x:v+l/2},i)):u.createElement("tspan",{className:this.styleClassNames.rectSubText,dy:"1.4em",x:v+l/2},n);n||e||i?this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:e?this.styleClassNames.rectSubText:this.styleClassNames.rectText,dy:e?o+s/2.5:o+s/2,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t,h)):this._nodeElements.push(u.createElement("text",{textAnchor:"middle",className:this.styleClassNames.rectMetricText,dy:o+s/1.6,x:v+l/2,key:"".concat(c).concat(this.styleClassNames.rectText),"data-is-focusable":0===c},t))},t.prototype.F=function(t,n,i,e,r,o,u,a,l){var s="M".concat(i-o/2,",").concat(e-a," H").concat(l+o/2," M").concat(t,",").concat(e-a,"\n V").concat(n+u+a/2),c="M".concat(t,",").concat(n+u+a/2," V").concat(n+5*a,"\n H").concat(t-o/2," H").concat(t+o/2);return r?c:s},t.prototype.D=function(t,n,i,e,r,o,a,l,s,c){void 0===c&&(c=0),this._linkElements.push(u.createElement("path",{className:this.styleClassNames.link,d:this.F(n,i,e,r,o,a,l,s,c),key:"".concat(t).concat(this.styleClassNames.link)}))},t}()),cp=function(t){function n(n){var i,e,r,o,u,a=t.call(this,n)||this;return a._nodeElements=[],a._linkElements=[],a._margin={top:(null===(i=a.props.margins)||void 0===i?void 0:i.top)||30,bottom:(null===(e=a.props.margins)||void 0===e?void 0:e.bottom)||30,left:(null===(r=a.props.margins)||void 0===r?void 0:r.left)||50,right:(null===(o=a.props.margins)||void 0===o?void 0:o.right)||20},a._width=a.props.width||1500,a._height=a.props.height||700,a._treeData=a.props.treeData,a._composition=null===(u=a.props)||void 0===u?void 0:u.composition,a._treeTraversal=a.props.treeTraversal,a.state={_width:a._width,_height:a._height},a}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this.props,n=t.theme,i=t.className,e=t.styles;this._classNames=lp(e,{theme:n,className:i}),this.P(),this.setState({_width:this.props.width||1500,_height:this.props.height||700})},n.prototype.componentDidUpdate=function(t){if(t.layoutWidth!==this.props.layoutWidth){var n=il("text"),i=il("rect"),e=il("path");0===this._nodeElements.length&&0===this._linkElements.length&&(n.remove(),i.remove(),e.remove()),this.P()}},n.prototype.P=function(){var t=[],n=[],i=new sp(this._treeData,this._composition,this._classNames,t,n,this._treeTraversal),e=this.state._width-this._margin.left-this._margin.right;i.C(this.props.layoutWidth,e),this._nodeElements=t,this._linkElements=n},n.prototype.render=function(){var t;return u.createElement(Dc,null,u.createElement("div",{className:null===(t=this._classNames)||void 0===t?void 0:t.root},u.createElement("svg",{className:"svgTree",width:this.state._width-this._margin.left-this._margin.right,height:this.state._height-this._margin.top-this._margin.bottom},u.createElement("g",{className:"svgNode"},this._nodeElements.map((function(t){return t}))),u.createElement("g",{className:"svgLink"},this._linkElements.map((function(t){return t}))))))},n}(u.Component),fp=(0,r.I)(cp,(function(t){var n,i,e,r,u;return{root:[t.theme.spacing,"ms-TreeChart",t.className,{overflow:"scroll"}],link:{fill:"none",stroke:t.theme.palette.neutralSecondary,strokeWidth:"2px"},rectNode:{strokeWidth:"2px",fill:t.theme.semanticColors.bodyBackground,padding:"10px",rx:"2px",selectors:(n={},n[It.up]={fill:"Canvas"},n)},rectText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.large),{selectors:(i={},i[It.up]={fill:"CanvasText"},i)}),rectSubText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimary},t.theme.fonts.medium),{selectors:(e={},e[It.up]={fill:"CanvasText"},e)}),rectBodyText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralPrimaryAlt},t.theme.fonts.xSmall),{selectors:(r={},r[It.up]={fill:"CanvasText"},r)}),rectMetricText:(0,o.Cl)((0,o.Cl)({fill:t.theme.palette.neutralDark},t.theme.fonts.xLarge),{selectors:(u={},u[It.up]={fill:"CanvasText"},u)})}}));function dp(t,n){let i,e;if(void 0===n)for(const n of t)null!=n&&(void 0===i?n>=n&&(i=e=n):(i>n&&(i=n),e<n&&(e=n)));else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(void 0===i?o>=o&&(i=e=o):(i>o&&(i=o),e<o&&(e=o)))}return[i,e]}var vp=(0,a.Z)(),hp=function(t){function n(n){var i=t.call(this,n)||this;return i.margin={top:2,right:0,bottom:0,left:0},i._isRTL=(0,l.jI)(),i.state={_points:null,_width:i.props.width||80,_height:i.props.height||20,_valueTextWidth:i.props.valueTextWidth||80},i._emptyChartId=p("_SparklineChart_empty"),i}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){var t=this;if(!this._isChartEmpty()){var n=Nv().x((function(n){return t.x(n.x)})).y0(this.state._height).y1((function(n){return t.y(n.y)})).curve(rl);this.area=n;var i=Rd().x((function(n){return t.x(n.x)})).y((function(n){return t.y(n.y)})).curve(rl);this.line=i;var e=this.props.data.lineChartData[0].data,r=dp(e,(function(t){return t.x})),o=r[0],u=r[1];this.x=Iu().domain([o,u]).range([this.margin.left,this.state._width-this.margin.right]),this.y=Iu().domain([0,ri(e,(function(t){return t.y}))]).range([this.state._height-this.margin.bottom,this.margin.top]),this.setState({_points:e})}},n.prototype.drawSparkline=function(){return u.createElement(u.Fragment,null,u.createElement("path",{className:"line",d:this.line(this.state._points),fill:"transparent",opacity:1,strokeWidth:2,stroke:this.props.data.lineChartData[0].color}),u.createElement("path",{className:"area",d:this.area(this.state._points),opacity:1,fillOpacity:.2,fill:this.props.data.lineChartData[0].color,role:"img","aria-hidden":!0}))},n.prototype.render=function(){var t=vp(this.props.styles,{theme:this.props.theme});return this._isChartEmpty()?u.createElement("div",{id:this._emptyChartId,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"}):u.createElement(Dc,{direction:Ys.horizontal,isCircularNavigation:!0,className:t.inlineBlock},u.createElement("div",{className:t.inlineBlock},this.state._width>=50&&this.state._height>=16?u.createElement("svg",{width:this.state._width,height:this.state._height,"data-is-focusable":!0,"aria-label":"Sparkline with label ".concat(this.props.data.lineChartData[0].legend)},this.state._points?this.drawSparkline():null):u.createElement(u.Fragment,null),this.props.showLegend&&this.props.data.lineChartData[0].legend?u.createElement("svg",{width:this.state._valueTextWidth,height:this.state._height,"data-is-focusable":!0},u.createElement("text",{x:"0%",textAnchor:this._isRTL?"end":"start",dx:8,y:"100%",dy:-5,className:t.valueText},this.props.data.lineChartData[0].legend)):u.createElement(u.Fragment,null)))},n.prototype._isChartEmpty=function(){return!(this.props.data&&this.props.data.lineChartData&&this.props.data.lineChartData.length>0&&0===this.props.data.lineChartData.filter((function(t){return 0===t.data.length})).length)},n}(u.Component),pp=(0,r.I)(hp,(function(t){var n;return{inlineBlock:{display:"inline"},valueText:(0,o.Cl)((0,o.Cl)({},t.theme.fonts.smallPlus),{fill:t.theme.semanticColors.messageText,selectors:(n={},n[It.up]={fill:"CanvasText"},n)})}}));function gp(t,n,i){var e=t.semanticColors.bodyText,r=t.semanticColors.bodyBackground,o=Ao(n||e),u=Ao(i||r);if(!o||!u)return r;if(es(o.formatHex(),u.formatHex())>=3)return u.formatHex();var a=function(t,n){var i=Ao(t);if(!i)return n.semanticColors.bodyText;var e=i.rgb();return Vo(255-e.r,255-e.g,255-e.b).formatHex()}(u.formatHex(),t);return es(o.formatHex(),a)>=3?a:r}var yp=(0,a.Z)(),mp=function(t){function n(n){var i=t.call(this,n)||this;return i.toImage=function(t){return Pf(i._rootElem,void 0,i._isRTL,t)},lc(i),i._isRTL=(0,l.jI)(n.theme),i}return(0,o.C6)(n,t),n.prototype.render=function(){var t,n=this,i=this.props,e=i.headers,r=i.rows,a=i.width,l=i.height,s=i.styles,c=i.theme,f=yp(s,{theme:c});if(!e||0===e.length)return u.createElement("div",null,"No data available");var d,v=new Set;e.forEach((function(t){var n,i,e=null===(i=Ao((null===(n=null==t?void 0:t.style)||void 0===n?void 0:n.backgroundColor)||""))||void 0===i?void 0:i.formatHex();e&&v.add(e)}));var h=!1;if(1===v.size||2===v.size)for(var p=1===v.size?Array.from(v)[0]:Array.from(v)[1],g=0,y=e;g<y.length;g++){var m=y[g],b=null===(t=null==m?void 0:m.style)||void 0===t?void 0:t.color;if(b&&es(b,p)>=3){d=p,h=!0;break}}return u.createElement("div",{ref:function(t){return n._rootElem=t},className:f.root,style:{height:l?"".concat(l,"px"):"650px",overflow:"hidden"}},u.createElement("svg",{width:null!=a?a:"100%",height:null!=l?l:"650px",className:f.chart},u.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},u.createElement("div",{style:{maxHeight:l?"".concat(l,"px"):"650px",overflowY:"auto",overflowX:"auto"}},u.createElement("table",{className:f.table,style:{width:a?"".concat(a,"px"):"100%"}},u.createElement("thead",null,u.createElement("tr",null,e.map((function(t,n){var i=(0,o.Cl)({},null==t?void 0:t.style),e=i.color,r=i.backgroundColor;return h?i.backgroundColor=d:(e||r)&&(i.backgroundColor=gp(c,e,r)),u.createElement("th",{key:n,className:f.headerCell,style:i},t.value)})))),r&&r.length>0&&u.createElement("tbody",null,r.map((function(t,n){return u.createElement("tr",{key:n},t.map((function(t,n){var i=(0,o.Cl)({},null==t?void 0:t.style),e=i.color,r=i.backgroundColor;return(e||r)&&(i.backgroundColor=gp(c,e,r)),u.createElement("td",{key:n,className:f.bodyCell,style:i},t.value)})))}))))))))},n}(u.Component),bp=(0,r.I)(mp,(function(t){var n,i,e=t.theme,r=e.fonts;return{root:{width:"100%",overflowX:"auto"},table:{borderCollapse:"collapse"},headerCell:(0,o.Cl)((0,o.Cl)({},r.small),{fontWeight:It.BO.semibold,backgroundColor:e.palette.neutralQuaternary,color:e.semanticColors.bodyText,padding:"8px",textAlign:"left",border:"2px solid ".concat(e.palette.neutralLighter),selectors:(n={},n[It.up]={backgroundColor:"Window",color:"WindowText"},n)}),bodyCell:(0,o.Cl)((0,o.Cl)({},r.small),{padding:"8px",border:"2px solid ".concat(e.palette.neutralLighter),color:e.semanticColors.bodyText,textAlign:"left",selectors:(i={},i[It.up]={color:"WindowText"},i)})}})),xp=(0,a.Z)(),wp=function(t){function n(n){var i,e,r,a,s,c,f=t.call(this,n)||this;return f._isRtl=(0,l.jI)(),f.X_ORIGIN=0,f.toImage=function(t){var n,i;return Pf(null===(n=f._cartesianChartRef.current)||void 0===n?void 0:n.chartContainer,null===(i=f._legendsRef.current)||void 0===i?void 0:i.toSVG,f._isRtl,t)},f._getDomainNRangeValues=function(t,n,i,e,r,o,u,a,l){var s;return s=o===jl.NumericAxis?function(t,n,i,e,r,o){var u=bs(ms(t),o),a=u.longestPositiveBar,l=u.longestNegativeBar,s=e?n.left:n.left+r,c=e?i-n.right-r:i-n.right;return e?{dStartValue:a,dEndValue:Math.min(l,o),rStartValue:s,rEndValue:c}:{dStartValue:Math.min(l,o),dEndValue:a,rStartValue:s,rEndValue:c}}(t,n,i,r,l,f.X_ORIGIN):{dStartValue:0,dEndValue:0,rStartValue:0,rEndValue:0},s},f._getMargins=function(t){f.margins=t},f._renderContentForOnlyBars=function(t){var n,i,e,r,o=f.props,a=o.useSingleColor,l=void 0!==a&&a,s=o.enableGradient,c=void 0!==s&&s,d=0;return f.props.data.forEach((function(n,i){n.y===t.y&&(d=i)})),l?(r=f.props.colors?f._createColors()(1):Jl(1,0,null===(n=f.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=oc(0,0,null===(i=f.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=t.color?t.color:f.props.colors?f._createColors()(t.x):Jl(d,0,null===(e=f.props.theme)||void 0===e?void 0:e.isInverted),u.createElement(u.Fragment,null,u.createElement(Js.ChartHoverCard,{XValue:t.xAxisCalloutData||t.x.toString(),Legend:t.legend,YValue:t.yAxisCalloutData||t.y,color:r,culture:f.props.culture}))},f._renderCallout=function(t){return t?f._renderContentForOnlyBars(t):null},f._getCustomizedCallout=function(){return f.props.onRenderCalloutPerDataPoint?f.props.onRenderCalloutPerDataPoint(f.state.dataPointCalloutProps,f._renderCallout):null},f._getGraphData=function(t,n,i,e,r,o){var u=ms(f._points),a=bs(u,f.X_ORIGIN);f._longestBarPositiveTotalValue=a.longestPositiveBar,f._longestBarNegativeTotalValue=a.longestNegativeBar;var l=f._yAxisType===Yl.NumericAxis?f._getScales(i,e,!0):f._getScales(i,e,!1),s=l.xBarScale,c=l.yBarScale,d=s.range(),v=[];return d[0]<d[1]&&(v=u.map((function(t){return f._yAxisType===Yl.NumericAxis?f._createNumericBars(i,e,r,o,t,s,c):f._createStringBars(i,e,r,o,t,s,c)})).flat()),f._bars=v},f._refCallback=function(t,n){f._refArray.push({index:n,refElement:t})},f._getCalloutContentForBar=function(t){var n,i,e,r,o=[],u=f.props,a=u.useSingleColor,l=void 0!==a&&a,s=u.enableGradient,c=void 0!==s&&s,d=f.props.data,v=d.filter((function(n){return n.y===t.y})),h=0;return d.forEach((function(n,i){n.y===t.y&&(h=i)})),l?(r=f.props.colors?f._createColors()(1):Jl(1,0,null===(n=f.props.theme)||void 0===n?void 0:n.isInverted),c&&(r=oc(0,0,null===(i=f.props.theme)||void 0===i?void 0:i.isInverted)[0])):r=v[0].color?v[0].color:f.props.colors?f._createColors()(v[0].x):Jl(h,0,null===(e=f.props.theme)||void 0===e?void 0:e.isInverted),o.push({legend:v[0].legend,y:v[0].x,color:r,data:v[0].yAxisCalloutData,yAxisCalloutData:v[0].yAxisCalloutData}),{YValueHover:o,hoverXValue:t.yAxisCalloutData||t.y.toString()}},f._onBarLeave=function(){},f._handleChartMouseLeave=function(){f._calloutAnchorPoint=null,f.setState({isCalloutVisible:!1,activeXdataPoint:null,YValueHover:[],hoverXValue:""})},f._onBarFocus=function(t,n,i){if((!1===f.state.isLegendSelected||f._isLegendHighlighted(t.legend))&&f._calloutAnchorPoint!==t){var e=f._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;f._refArray.forEach((function(e,u){n===u&&f.setState({refSelected:e.refElement,isCalloutVisible:!0,selectedLegendTitle:t.legend,dataForHoverCard:t.x,color:f.props.useSingleColor?i:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData})}))}},f._getScales=function(t,n,i){var e=f._longestBarPositiveTotalValue,r=f._longestBarNegativeTotalValue,o=[Math.min(f.X_ORIGIN,r),Math.max(f.X_ORIGIN,e)];if(i){var u=ri(f._points,(function(t){return t.y})),a=ei(f._points,(function(t){return t.y})),l=Math.max(u,f.props.yMaxValue||0),s=f.props.yMinValue||0,c=Math.min(a,s);return{xBarScale:Iu().domain(o).nice().range([f.margins.left,n-f.margins.right]),yBarScale:d=Iu().domain([c,l]).range([t-(f.margins.bottom+f._domainMargin),f.margins.top+f._domainMargin])}}var d=ku().domain(f._yAxisLabels).range([t-(f.margins.bottom+f._domainMargin),f.margins.top+f._domainMargin]).padding(f._yAxisPadding);return{xBarScale:Iu().domain(o).nice().range([f.margins.left,n-f.margins.right]),yBarScale:d}},f._calculateAppropriateBarHeight=function(t,n,i){var e=Jv(t);if(!e||0===e[1])return 16;var r=e[0],o=e[1],u=ri(f._points,(function(t){return t.y}));return o=Math.max(o,u),Math.floor(n*r*(1-i)/(o+r*(1-i)))},f._getDomainMarginsForHorizontalBarChart=function(t){f._domainMargin=8;var n=f._getUniqueYValues();f._yAxisPadding=1===f._yAxisPadding?.99:f._yAxisPadding;var i=f._yAxisPadding/(1-f._yAxisPadding),e=n.length+(n.length-1)*i,r=t-(f.margins.top+8)-(f.margins.bottom+8);if(f._yAxisType!==Yl.StringAxis)f._barHeight=f.props.barHeight||f._calculateAppropriateBarHeight(n,r,f._yAxisPadding),f._barHeight=Math.max(f._barHeight,1),f._domainMargin+=f._barHeight/2;else{f._barHeight=f.props.barHeight||r/e;var u=e*f._barHeight;r>=u&&(f._domainMargin=8+(r-u)/2)}return(0,o.Cl)((0,o.Cl)({},f.margins),{top:f.margins.top+f._domainMargin,bottom:f.margins.bottom+f._domainMargin})},f._closeCallout=function(){f.setState({isCalloutVisible:!1})},f._getLegendData=function(t,n){var i=f.props.useSingleColor,e=[],r={};return t.forEach((function(t,n){var e,o,u,a,l=i?f.props.colors?f._createColors()(1):Jl(1,0,null===(e=f.props.theme)||void 0===e?void 0:e.isInverted):t.color;f.props.enableGradient&&(l=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(n,0,null===(u=f.props.theme)||void 0===u?void 0:u.isInverted)[0],i&&(l=oc(0,0,null===(a=f.props.theme)||void 0===a?void 0:a.isInverted)[0])),r[t.legend]=l})),Object.entries(r).forEach((function(t){var n=t[0],i=t[1],r={title:n,color:i,hoverAction:function(){f._handleChartMouseLeave(),f._onLegendHover(n)},onMouseOutAction:function(t){f._onLegendLeave(t)}};e.push(r)})),u.createElement(jf,(0,o.Cl)({legends:e,enabledWrapLines:f.props.enabledLegendsWrapLines,overflowProps:f.props.legendsOverflowProps,focusZonePropsInHoverCard:f.props.focusZonePropsForLegendsInHoverCard,overflowText:f.props.legendsOverflowText},f.props.legendProps,{onChange:f._onLegendSelectionChange.bind(f),ref:f._legendsRef}))},f._isLegendSelected=function(){return f.state.isLegendSelected},f._isLegendHighlighted=function(t){return f._getHighlightedLegend().includes(t)},f._getAxisData=function(t){if(t&&t.yAxisDomainValues.length){var n=t.yAxisDomainValues;f._xMax=Math.max(n[n.length-1],f.props.xMaxValue||0)}},f._getAriaLabel=function(t){var n,i=t.xAxisCalloutData||t.x,e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(i,". ")+"".concat(e,".")},f._getChartTitle=function(){var t=f.props,n=t.chartTitle,i=t.data;return(n?"".concat(n,". "):"")+"Horizontal bar chart with ".concat((null==i?void 0:i.length)||0," bars. ")},f._getOrderedYAxisLabels=function(){return f._yAxisType===Yl.StringAxis&&"default"!==f.props.yAxisCategoryOrder?$s(f._mapCategoryToValues(),f.props.yAxisCategoryOrder):(0,o.fX)([],f._points,!0).reverse().map((function(t){return t.y}))},f._mapCategoryToValues=function(){var t={};return f._points.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(n.x)})),t},lc(f),f.state={color:"",dataForHoverCard:0,isCalloutVisible:!1,isLegendSelected:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)&&n.legendProps.selectedLegends.length>0||void 0!==(null===(e=n.legendProps)||void 0===e?void 0:e.selectedLegend),isLegendHovered:!1,refSelected:null,selectedLegendTitle:null!==(a=null===(r=n.legendProps)||void 0===r?void 0:r.selectedLegend)&&void 0!==a?a:"",xCalloutValue:"",yCalloutValue:"",activeXdataPoint:null,YValueHover:[],hoverXValue:"",selectedLegends:(null===(s=n.legendProps)||void 0===s?void 0:s.selectedLegends)||[]},f._calloutId=p("callout"),f._refArray=[],f._xAxisType=f.props.data&&f.props.data.length>0?Ls(f.props.data[0].x,!0):jl.NumericAxis,f._yAxisType=f.props.data&&f.props.data.length>0?Ls(f.props.data[0].y,!1):Yl.StringAxis,f._cartesianChartRef=u.createRef(),f._legendsRef=u.createRef(),f._domainMargin=8,f._yAxisPadding=null!==(c=f.props.yAxisPadding)&&void 0!==c?c:.5,f}return(0,o.C6)(n,t),n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._adjustProps(),this._yAxisLabels=this._getOrderedYAxisLabels(),this._xMax=Math.max(ri(this._points,(function(t){return t.x})),this.props.xMaxValue||0);var n=this._getLegendData(this._points,this.props.theme.palette);this._classNames=xp(this.props.styles,{theme:this.props.theme,legendColor:this.state.color});var i=(0,o.Cl)((0,o.Cl)({isCalloutVisible:this.state.isCalloutVisible,directionalHint:3,id:"toolTip".concat(this._calloutId),target:this.state.refSelected,isBeakVisible:!1,gapSpace:15,color:this.state.color,legend:this.state.selectedLegendTitle,XValue:this.state.xCalloutValue,YValue:this.state.yCalloutValue?this.state.yCalloutValue:this.state.dataForHoverCard,onDismiss:this._closeCallout,preventDismissOnLostFocus:!0},this.props.calloutProps),Ds(this.state.callOutAccessibilityData)),e={tickValues:this.props.tickValues,tickFormat:this.props.tickFormat};return u.createElement(qd,(0,o.Cl)({},this.props,{yAxisPadding:this._yAxisPadding,chartTitle:this._getChartTitle(),points:this._points,chartType:zl.HorizontalBarChartWithAxis,xAxisType:this._xAxisType,yAxisType:this._yAxisType,stringDatasetForYAxisDomain:this._yAxisLabels,calloutProps:i,tickParams:e,legendBars:n,createYAxis:ls,getDomainNRangeValues:this._getDomainNRangeValues,createStringYAxis:cs,getMinMaxOfYAxis:ks,barwidth:this._barHeight,focusZoneDirection:Ys.vertical,customizedCallout:this._getCustomizedCallout(),getmargins:this._getMargins,getYDomainMargins:this._getDomainMarginsForHorizontalBarChart,getGraphData:this._getGraphData,getAxisData:this._getAxisData,onChartMouseLeave:this._handleChartMouseLeave,ref:this._cartesianChartRef,children:function(n){return u.createElement(u.Fragment,null,u.createElement("g",null,t._bars))}}))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){var t;return(null===(t=this._cartesianChartRef.current)||void 0===t?void 0:t.chartContainer)||null},enumerable:!1,configurable:!0}),n.prototype._adjustProps=function(){this._points=this.props.data||[],this._barHeight=this.props.barHeight||32;var t=this.props.theme.palette;this._colors=this.props.colors||[t.blueLight,t.blue,t.blueMid,t.blueDark]},n.prototype._createColors=function(){var t=this,n=this._colors.length<=1?1:1/(this._colors.length-1),i=this.props.useSingleColor;if(void 0!==i&&i)return function(n){var i=t.props,e=i.theme,r=i.colors;return r&&r.length>0?r[0]:e.palette.blueLight};for(var e=[],r=0;r<this._colors.length;r++)e.push(n*r*this._xMax);return Iu().domain(e).range(this._colors)},n.prototype._onBarHover=function(t,n,i){i.persist();var e=this._getCalloutContentForBar(t),r=e.YValueHover,o=e.hoverXValue;!1!==this.state.isLegendSelected&&!this._isLegendHighlighted(t.legend)||this._calloutAnchorPoint===t||(this._calloutAnchorPoint=t,this.setState({refSelected:i,isCalloutVisible:!0,dataForHoverCard:t.x,selectedLegendTitle:t.legend,color:this.props.useSingleColor||this.props.enableGradient?n:t.color,xCalloutValue:t.yAxisCalloutData||t.y.toString(),yCalloutValue:t.xAxisCalloutData||t.x.toString(),dataPointCalloutProps:t,activeXdataPoint:t.x,YValueHover:r,hoverXValue:o,callOutAccessibilityData:t.callOutAccessibilityData}))},n.prototype._createNumericBars=function(t,n,i,e,r,a,l){var s=this,c=this.props.useSingleColor,f=void 0!==c&&c,d=(0,o.fX)([],r,!0);d.sort((function(t,n){var i="number"==typeof t.y?t.y:parseFloat(t.y);return("number"==typeof n.y?n.y:parseFloat(n.y))-i}));var v=0,h=0,g=0,y=r.filter((function(t){return t.x>=s.X_ORIGIN})).length,m=r.length-y,b=0,x=0,w=d.map((function(t,i){var e,r,o,c,d,w,C,M,k=!0;(s.state.isLegendHovered||s.state.isLegendSelected)&&(k=s._isLegendHighlighted(t.legend)),s._classNames=xp(s.props.styles,{theme:s.props.theme,legendColor:s.state.color,shouldHighlight:k}),t.x>=s.X_ORIGIN&&++b,t.x<s.X_ORIGIN&&++x;var A,S=s._isRtl?n-(s.margins.right+Math.max(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN))-s.margins.left):Math.min(a(t.x+s.X_ORIGIN),a(s.X_ORIGIN));if(Math.max(l(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=f?s.props.colors?s._createColors()(1):Jl(1,0,null===(e=s.props.theme)||void 0===e?void 0:e.isInverted):s.props.colors?s._createColors()(t.x):Jl(i,0,null===(r=s.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!f?t.color:A;if(s.props.enableGradient){var V=Math.max(s._points.findIndex((function(n){return n===t})),0);A=(null===(o=t.gradient)||void 0===o?void 0:o[0])||oc(V,0,null===(c=s.props.theme)||void 0===c?void 0:c.isInverted)[0],L=(null===(d=t.gradient)||void 0===d?void 0:d[1])||oc(V,0,null===(w=s.props.theme)||void 0===w?void 0:w.isInverted)[1],f&&(A=oc(0,0,null===(C=s.props.theme)||void 0===C?void 0:C.isInverted)[0],L=oc(0,0,null===(M=s.props.theme)||void 0===M?void 0:M.isInverted)[1]),s._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(a(g+s.X_ORIGIN)-a(s.X_ORIGIN));g>s.X_ORIGIN?v+=N:h+=N;var O=Math.abs(a(t.x+s.X_ORIGIN)-a(s.X_ORIGIN)),T=O>2&&(t.x>s.X_ORIGIN&&b!==y||t.x<s.X_ORIGIN&&(0!==y||x>1))?2:0,E=O>2&&(t.x>s.X_ORIGIN&&(0!==m||b>1)||t.x<s.X_ORIGIN&&x!==m)?2:0,F=s.X_ORIGIN;return F=s._isRtl?t.x>s.X_ORIGIN?S-v:S+h:t.x>s.X_ORIGIN?S+v:S-h,g=t.x,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},s.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{key:t.y,x:F,className:s._classNames.opacityChangeOnHover,y:l(t.y)-s._barHeight/2,"data-is-focusable":k,width:O-(s._isRtl?E:T),height:s._barHeight,ref:function(n){s._refCallback(n,t.legend)},rx:s.props.roundCorners?3:0,onClick:t.onClick,onMouseOver:s._onBarHover.bind(s,t,A),"aria-label":s._getAriaLabel(t),role:"img","aria-labelledby":"toolTip".concat(s._calloutId),onMouseLeave:s._onBarLeave,onFocus:s._onBarFocus.bind(s,t,i,A),onBlur:s._onBarLeave,fill:s.props.enableGradient?"url(#".concat(D,")"):A}))}));return w},n.prototype._getUniqueYValues=function(){var t,n={};return null===(t=this.props.data)||void 0===t||t.forEach((function(t){n[t.y]=t.y})),Object.values(n)},n.prototype._createStringBars=function(t,n,i,e,r,o,a){var l=this,s=this.props.useSingleColor,c=void 0!==s&&s,f=0,d=0,v=0,h=r.filter((function(t){return t.x>=l.X_ORIGIN})).length,g=r.length-h,y=0,m=0,b=r.map((function(t,i){var e,r,s,b,x,w,C,M,k=!0;(l.state.isLegendHovered||l.state.isLegendSelected)&&(k=l._isLegendHighlighted(t.legend)),l._classNames=xp(l.props.styles,{theme:l.props.theme,legendColor:l.state.color,shouldHighlight:k}),t.x>=l.X_ORIGIN&&++y,t.x<l.X_ORIGIN&&++m;var A,S=l._isRtl?n-(l.margins.right+Math.max(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN))-l.margins.left):Math.min(o(t.x+l.X_ORIGIN),o(l.X_ORIGIN));if(Math.max(a(t.y),0)<1)return u.createElement(u.Fragment,{key:t.x}," ");A=c?l.props.colors?l._createColors()(1):Jl(1,0,null===(e=l.props.theme)||void 0===e?void 0:e.isInverted):l.props.colors?l._createColors()(t.x):Jl(i,0,null===(r=l.props.theme)||void 0===r?void 0:r.isInverted);var L=A=t.color&&!c?t.color:A;if(l.props.enableGradient){var V=l._points.findIndex((function(n){return n===t}));A=(null===(s=t.gradient)||void 0===s?void 0:s[0])||oc(V,0,null===(b=l.props.theme)||void 0===b?void 0:b.isInverted)[0],L=(null===(x=t.gradient)||void 0===x?void 0:x[1])||oc(V,0,null===(w=l.props.theme)||void 0===w?void 0:w.isInverted)[1],c&&(A=oc(0,0,null===(C=l.props.theme)||void 0===C?void 0:C.isInverted)[0],L=oc(0,0,null===(M=l.props.theme)||void 0===M?void 0:M.isInverted)[1]),l._points[V].color=A}var D=p("HBCWA_Gradient")+"_".concat(i,"_").concat(t.x),N=Math.abs(o(v+l.X_ORIGIN)-o(l.X_ORIGIN));v>0?f+=N:d+=N;var O=Math.abs(o(t.x+l.X_ORIGIN)-o(l.X_ORIGIN)),T=O>2&&(t.x>l.X_ORIGIN&&y!==h||t.x<l.X_ORIGIN&&(0!==h||m>1))?2:0,E=O>2&&(t.x>l.X_ORIGIN&&(0!==g||y>1)||t.x<l.X_ORIGIN&&m!==g)?2:0;v=t.x;var F=l.X_ORIGIN;return F=l._isRtl?t.x>l.X_ORIGIN?S-f:S+d:t.x>l.X_ORIGIN?S+f:S-d,u.createElement(u.Fragment,{key:"".concat(i,"_").concat(t.x)},l.props.enableGradient&&u.createElement("defs",null,u.createElement("linearGradient",{id:D},u.createElement("stop",{offset:"0",stopColor:A}),u.createElement("stop",{offset:"100%",stopColor:L}))),u.createElement("rect",{transform:"translate(0,".concat(.5*(a.bandwidth()-l._barHeight),")"),key:t.x,className:l._classNames.opacityChangeOnHover,x:F,y:a(t.y),rx:l.props.roundCorners?3:0,width:O-(l._isRtl?E:T),height:l._barHeight,"aria-labelledby":"toolTip".concat(l._calloutId),"aria-label":l._getAriaLabel(t),role:"img",ref:function(n){l._refCallback(n,t.legend)},onClick:t.onClick,onMouseOver:l._onBarHover.bind(l,t,A),onMouseLeave:l._onBarLeave,onBlur:l._onBarLeave,"data-is-focusable":k,onFocus:l._onBarFocus.bind(l,t,i,A),fill:l.props.enableGradient?"url(#".concat(D,")"):A}))}));return b},n.prototype._onLegendHover=function(t){this._isLegendSelected()||this.setState({isLegendHovered:!0,selectedLegendTitle:t})},n.prototype._onLegendLeave=function(t){!t&&this._isLegendSelected()||this.setState({isLegendHovered:!1,selectedLegendTitle:"",isLegendSelected:!t&&this._isLegendSelected()})},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.selectedLegendTitle?[this.state.selectedLegendTitle]:[]},n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t,selectedLegendTitle:null==i?void 0:i.title}):this.setState({selectedLegends:t.slice(-1),selectedLegendTitle:null==i?void 0:i.title}),this.setState({isLegendSelected:t.length>0}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.defaultProps={yAxisCategoryOrder:"default"},n}(u.Component),Cp=(0,r.I)(wp,(function(t){return{opacityChangeOnHover:{opacity:t.shouldHighlight?"":"0.1"},xAxisTicks:[]}}));function Mp(t){var n=t.availableWidth,i=t.minTextWidth;return{show:n>(void 0===i?24:i)&&n>0,x:t.textX,y:t.textY,value:t.value,culture:t.culture,onMouseOver:t.onMouseOver,onMouseMove:t.onMouseMove,onMouseOut:t.onMouseOut}}var kp=(0,a.Z)(),Ap=u.forwardRef((function(t,n){var i,e=p("FunnelChartTooltipId_"),r=p("_FunnelChart_empty"),a=(0,l.jI)(),s=u.useState(null),c=s[0],f=s[1],d=u.useState(!1),v=d[0],h=d[1],g=u.useState(null),y=g[0],m=g[1],b=u.useState(null),x=b[0],w=b[1],C=u.useState([]),M=C[0],k=C[1],A=u.useRef(null),S=u.useRef(null),L=_(t.data);function V(t,n){null==n||n.persist(),f(t.stage),m(t),h(!0),w(n.currentTarget)}function D(t,n,i){null==i||i.persist(),f(n.category),m({stage:t,value:n.value,color:n.color,category:n.category}),h(!0),w(i.currentTarget)}function N(){f(null),h(!1),m(null),w(null)}u.useEffect((function(){var n;(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends)&&k(t.legendProps.selectedLegends)}),[null===(i=t.legendProps)||void 0===i?void 0:i.selectedLegends]),u.useImperativeHandle(t.componentRef,(function(){return{chartContainer:null!=A?A:null,toImage:function(t){var n;return Pf(A.current,null===(n=S.current)||void 0===n?void 0:n.toSVG,(0,l.jI)(),t)}}}),[]);var O=u.useCallback((function(n,i,e){var r,o;(null===(r=t.legendProps)||void 0===r?void 0:r.canSelectMultipleLegends)?k(n):k(n.slice(-1)),(null===(o=t.legendProps)||void 0===o?void 0:o.onChange)&&t.legendProps.onChange(n,i,e)}),[t.legendProps]);function T(){return M.length>0?M:c?[c]:[]}function E(t){return T().includes(t)}function F(){return 0===T().length}function B(n,i){return"subValue"in n?{culture:t.culture,onMouseOver:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onMouseMove:1===i?function(t){return D(n.stage,n.subValue,t)}:void 0,onFocus:function(t){return i=n.stage,e=n.subValue,null==(r=t)||r.persist(),m({stage:i,value:e.value,color:e.color,category:e.category}),h(!0),void w(r.currentTarget);var i,e,r},onBlur:function(){return N()},onMouseOut:function(){return N()}}:{culture:t.culture,onMouseOver:1===i?function(t){return V(n,t)}:void 0,onMouseMove:1===i?function(t){return V(n,t)}:void 0,onFocus:function(t){return function(t,n){null==n||n.persist(),m(t),h(!0),w(n.currentTarget)}(n,t)},onBlur:function(){return N()},onMouseOut:function(){return N()}}}function P(n){var i=n.key,e=n.pathD,r=n.fill,l=n.opacity,s=n.textProps,c=n.data,f=n.isFocusable,d=B(c,l),v=zs(r,t.theme);return u.createElement("g",{key:i},u.createElement("path",(0,o.Cl)({d:e,fill:r,opacity:l},d,{"data-is-focusable":f})),s&&u.createElement("g",(0,o.Cl)({},d),function(n){var i=n.show,e=n.x,r=n.y,o=n.value,l=n.textColor;if(!i)return null;var s=u.createElement("text",{x:a?z-e:e,y:r,textAnchor:"middle",alignmentBaseline:"middle",fill:l},(0,_n.c$)(o.toString(),t.culture));return a?u.createElement("g",{transform:"scale(-1,1) translate(".concat(-z,",0)")},s):s}((0,o.Cl)((0,o.Cl)({},s),{textColor:v}))))}function _(t){return Array.isArray(t)&&t.every((function(t){return Array.isArray(t.subValues)}))}function H(n,i,e,r,u){var a=u.stages.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{subValues:t.subValues||[]})})),l="vertical"===t.orientation?function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight/o.length,c=o[e],f=o[e+1]||{subValues:[]},d=u[e]||1,v=u[e+1]||0,h=0,p=0,g=function(t){var i=c.subValues[t],e=null===(n=f.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;h+=r/d*(d/a)*l,p+=(o/v||0)*(v/a)*l},y=0;y<r;y++)g(y);var m,b=c.subValues[r],x=null===(i=f.subValues)||void 0===i?void 0:i.find((function(t){return t.category===b.category})),w=b.value,C=x?x.value:0,M=w/d*(d/a)*l,k=(C/v||0)*(v/a)*l,A=(l-d/a*l)/2+h,S=A+M,L=(l-v/a*l)/2+p,V=L+k,D=(A+S+L+V)/4,N=e===o.length-1,O=N?e*s+.33*s:(e+.5)*s;return m=N?M*(1-(O-e*s)/s):Math.min(M,k),{pathD:"M".concat(A,",").concat(e*s,"\n L").concat(S,",").concat(e*s,"\n L").concat(V,",").concat((e+1)*s,"\n L").concat(L,",").concat((e+1)*s,"\n Z"),textX:D,textY:O,availableWidth:m}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})):function(t){for(var n,i,e=t.i,r=t.k,o=t.stages,u=t.totals,a=t.maxTotal,l=t.funnelWidth,s=t.funnelHeight,c=l/o.length,f=o[e],d=o[e+1]||{subValues:[]},v=u[e]||1,h=u[e+1]||0,p=0,g=0,y=function(t){var i=f.subValues[t],e=null===(n=d.subValues)||void 0===n?void 0:n.find((function(t){return t.category===i.category})),r=i.value,o=e?e.value:0;p+=r/v*(v/a)*s,g+=(o/h||0)*(h/a)*s},m=0;m<r;m++)y(m);var b,x,w,C=f.subValues[r],M=null===(i=d.subValues)||void 0===i?void 0:i.find((function(t){return t.category===C.category})),k=C.value,A=M?M.value:0,S=k/v*(v/a)*s,L=(A/h||0)*(h/a)*s,V=e*c,D=(e+1)*c,N=(s-v/a*s)/2+p,O=N+S,T=(s-h/a*s)/2+g,E=T+L;return e===o.length-1?(b=V+.25*(D-V),x=(N+O)/2,w=.5*(D-V)*.8,(S<24||S*c/2<600)&&(w=0)):(b=(V+D)/2,x=(N+O+T+E)/4,w=.9*Math.abs(D-V),(S+L)/2<20&&(w=0)),{pathD:"M".concat(V,",").concat(N,"\n L").concat(D,",").concat(T,"\n L").concat(D,",").concat(E,"\n L").concat(V,",").concat(O,"\n Z"),textX:b,textY:x,availableWidth:w}}((0,o.Cl)((0,o.Cl)({},u),{stages:a,i:e,k:r})),s=B({stage:n.stage,subValue:i}),c=Mp((0,o.Cl)({availableWidth:l.availableWidth,minTextWidth:16,textX:l.textX,textY:l.textY,value:i.value},s));return P({key:"".concat(e,"-").concat(r),pathD:l.pathD,fill:i.color,opacity:_(t.data)&&E(i.category)||F()?1:.1,textProps:c,data:{stage:n.stage,subValue:i},isFocusable:!!(_(t.data)&&E(i.category)||F())})}var I=(0,o.Cl)({isCalloutVisible:v,directionalHint:3,id:"toolTip".concat(e),target:x,color:null==y?void 0:y.color,XValue:null==y?void 0:y.stage,YValue:null==y?void 0:y.value,isBeakVisible:!1,gapSpace:15,onDismiss:function(){h(!1)},preventDismissOnLostFocus:!0},t.calloutProps),W=t.width||350,R=t.height||500,$=kp(t.styles,{theme:t.theme,className:t.className,chartWidth:W,chartHeight:R}),z=.8*W,j=(W-z)/2;return t.data&&t.data.length>0?u.createElement("div",{ref:A,className:$.root},u.createElement(Dc,{direction:Ys.horizontal},u.createElement("svg",{width:W,height:R,className:$.chart,role:"img","aria-label":t.chartTitle},u.createElement("g",{transform:a?"translate(".concat(j+z,", ").concat(40,") scale(-1,1)"):"translate(".concat(j,", ").concat(40,")")},L?function(n,i){for(var e,r,o=t.data,u=o.map((function(t){var n,i;return null!==(i=null===(n=null==t?void 0:t.subValues)||void 0===n?void 0:n.reduce((function(t,n){return t+n.value}),0))&&void 0!==i?i:0})),l=[],s={stages:o,totals:u,maxTotal:Math.max.apply(Math,u),funnelWidth:i,funnelHeight:.8*n,isRTL:a},c=0;c<o.length;c++)for(var f=o[c],d=0;d<(null!==(e=f.subValues)&&void 0!==e?e:[]).length;d++){var v=null===(r=f.subValues)||void 0===r?void 0:r[d];v&&l.push(H(f,v,c,d,s))}return l}(R-40,z):function(n,i){var e=t.data,r=i,u=.8*n;return e.map((function(n,i){var l="vertical"===t.orientation?function(t){var n=t.d,i=t.i,e=t.data,r=t.funnelWidth,o=t.isRTL,u=t.funnelHeight/e.length,a=function(t){return t/Math.max.apply(Math,e.map((function(t){return t.value})))*r},l=a(n.value),s=i<e.length-1?a(e[i+1].value):0,c=(r-l)/2,f=(r-s)/2,d=o?r-c:c,v=o?r-f:f,h=i===e.length-1,p=h?i*u+.33*u:i*u+u/2,g=r/2,y=l;if(h){var m=l*(1-(p-i*u)/u);y=Math.max(.8*m,0)}else y=.9*Math.min(l,s);return{pathD:"M".concat(d,",").concat(i*u,"\n L").concat(r-d,",").concat(i*u,"\n L").concat(r-v,",").concat((i+1)*u,"\n L").concat(v,",").concat((i+1)*u,"\n Z"),textX:g,textY:p,availableWidth:y}}({d:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}):function(t){var n,i,e=t.d,r=t.i,o=t.data,u=t.funnelHeight,a=t.funnelWidth/o.length,l=function(t){return t/Math.max.apply(Math,o.map((function(t){return t.value})))*u},s=l(e.value),c=r<o.length-1?l(o[r+1].value):0,f=(u-s)/2,d=(u-c)/2,v=r*a,h=(r+1)*a,p=.8*a;return r===o.length-1?(n=v+.25*(h-v),i=u/2,p=s<40||s*a/2<800?0:.75*(h-v)*.6):(n=(v+h)/2,i=u/2,p=Math.min(s,c)>20?.8*a:0),{pathD:"M".concat(v,",").concat(f,"\n L").concat(h,",").concat(d,"\n L").concat(h,",").concat(u-d,"\n L").concat(v,",").concat(u-f,"\n Z"),textX:n,textY:i,availableWidth:p}}({d:n,i:i,data:e,funnelWidth:r,funnelHeight:u,isRTL:a}),s=l.pathD,c=l.textX,f=l.textY,d=l.availableWidth,v=B(n),h=Mp((0,o.Cl)({availableWidth:d,minTextWidth:16,textX:c,textY:f,value:n.value},v));return P({key:i,pathD:s,fill:n.color,opacity:E(n.stage)||F()?1:.1,textProps:h,data:n,isFocusable:!(!E(n.stage)&&!F())})}))}(R-40,z)),v&&u.createElement(Pn,(0,o.Cl)({},I),u.createElement(Js.ChartHoverCard,{XValue:null==I?void 0:I.XValue,YValue:null==I?void 0:I.YValue,color:null==I?void 0:I.color})))),function(){if(t.hideLegend)return u.createElement(u.Fragment,null);var n;if(L){var i={};t.data.forEach((function(t){(t.subValues||[]).forEach((function(t){t.category in i||(i[t.category]=t.color)}))})),n=Object.entries(i).map((function(t){var n=t[0],i=t[1];return{title:n,color:i,hoverAction:function(){return f(n)},onMouseOutAction:function(){return f(null)}}}))}else n=t.data.map((function(t){return{title:t.stage,color:t.color,hoverAction:function(){return f(t.stage)},onMouseOutAction:function(){return f(null)}}}));return u.createElement("div",{style:{display:"flex",justifyContent:"center"}},u.createElement(jf,(0,o.Cl)({ref:S,legends:n,centerLegends:!0,onChange:O},t.legendProps)))}()):u.createElement("div",{id:r,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"})}));Ap.displayName="FunnelChart",Ap.defaultProps={orientation:"vertical"};var Sp,Lp,Vp=(0,r.I)(Ap,(function(t){var n=t.theme,i=t.className,e=t.chartWidth,r=t.chartHeight;return{root:[n.fonts.medium,"ms-FunnelChart",{alignItems:"center",width:"100%",height:"100%"},i],chart:{display:"block",width:e,height:r},text:[n.fonts.medium,{pointerEvents:"none",fontWeight:It.BO.semibold,fill:n.palette.neutralPrimary}],subComponentStyles:{calloutStyles:{root:{maxWidth:"238px"}}}}}));!function(t){t.Percentage="percentage",t.Fraction="fraction"}(Sp||(Sp={})),function(t){t.SingleSegment="single-segment",t.MultipleSegments="multiple-segments"}(Lp||(Lp={}));var Dp=[{minRadius:52,arcWidth:12,fontSize:20},{minRadius:70,arcWidth:16,fontSize:24},{minRadius:88,arcWidth:20,fontSize:32},{minRadius:106,arcWidth:24,fontSize:32},{minRadius:124,arcWidth:28,fontSize:40},{minRadius:142,arcWidth:32,fontSize:40}],Np=(0,a.Z)(),Op=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0===n&&e===Lp.SingleSegment?"".concat(t.legend,", ").concat(t.size," out of ").concat(i," or ").concat((t.size/i*100).toFixed(),"%"):"".concat(t.legend,", ").concat(t.start," to ").concat(t.end):0===n&&e===Lp.SingleSegment?"".concat(t.size," (").concat((t.size/i*100).toFixed(),"%)"):"".concat(t.start," - ").concat(t.end)},Tp=function(t,n,i,e,r){return void 0===r&&(r=!1),r?0!==n?t.toString():e===Sp.Fraction?"".concat((t/i*100).toFixed(),"%"):"".concat(t,"/").concat(i):"function"==typeof e?e([t-n,i-n]):0!==n?t.toString():e===Sp.Fraction?"".concat(t,"/").concat(i):"".concat((t/i*100).toFixed(),"%")},Ep=function(t){function n(n){var i,e=t.call(this,n)||this;return e.toImage=function(t){var n;return Pf(e._rootElem,null===(n=e._legendsRef.current)||void 0===n?void 0:n.toSVG,e._isRTL,t)},e._getMargins=function(){var t=e.props,n=t.hideMinMax;return{left:16+(n?0:40),right:16+(n?0:40),top:16+(t.chartTitle?27:2),bottom:16+(t.sublabel?20:0)}},e._getStylesBasedOnBreakpoint=function(){for(var t=Dp.length-1;t>=0;t-=1)if(e._outerRadius>=Dp[t].minRadius)return{arcWidth:Dp[t].arcWidth,chartValueSize:Dp[t].fontSize};return{arcWidth:Dp[0].arcWidth,chartValueSize:Dp[0].fontSize}},e._processProps=function(){var t=e.props,n=t.minValue,i=void 0===n?0:n,r=t.maxValue,o=t.theme,u=i,a=e.props.segments.map((function(t,n){var i,e=Math.max(t.size,0);return u+=e,{legend:t.legend,size:e,color:void 0!==t.color?Ql(t.color,o.isInverted):Jl(n,0,o.isInverted),gradient:null!==(i=t.gradient)&&void 0!==i?i:oc(n,0,o.isInverted),accessibilityData:t.accessibilityData,start:u-e,end:u}}));void 0!==r&&u<r&&(a.push({legend:"Unknown",size:r-u,color:o.palette.neutralLight,start:u,end:r}),u=r);var l=wd().cornerRadius(e.props.roundCorners?3:0).padAngle(2/e._outerRadius).padRadius(e._outerRadius),s=e._isRTL?Array.from(a).reverse():a,c=-Math.PI/2,f=s.map((function(t,n){var r=c+t.size/(u-i)*Math.PI,o=l({innerRadius:e._innerRadius,outerRadius:e._outerRadius,startAngle:c,endAngle:r});return c=r,{d:o,segmentIndex:e._isRTL?a.length-1-n:n,startAngle:c-t.size/(u-i)*Math.PI,endAngle:r}}));return e._minValue=i,e._maxValue=u,e._segments=a,{arcs:f}},e._renderNeedle=function(){var t=function(t,n,i){var e=(t-n)/(i-n)*180;return e<0?e=0:e>180&&(e=180),e}(e.props.chartValue,e._minValue,e._maxValue),n=e._isRTL?180-t:t,i=e._outerRadius-e._innerRadius+4;return u.createElement("g",{transform:"rotate(".concat(n,", 0, 0)")},u.createElement("path",{d:"\n M 0,".concat(-4,"\n L ").concat(-i,",").concat(-2,"\n A ").concat(2,",").concat(2,",0,0,0,").concat(-i,",").concat(2,"\n L 0,").concat(4,"\n A ").concat(4,",").concat(4,",0,0,0,0,").concat(-4,"\n "),strokeWidth:2,className:e._classNames.needle,transform:"translate(".concat(2-e._innerRadius,")"),"data-is-focusable":!0,onFocus:function(t){return e._handleFocus(t,"Needle")},onBlur:e._handleBlur,onMouseEnter:function(t){return e._handleMouseOver(t,"Needle")},onMouseMove:function(t){return e._handleMouseOver(t,"Needle")},role:"img","aria-label":"Current value: "+Tp(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat)}))},e._renderLegends=function(){if(e.props.hideLegend)return null;var t=e._segments.map((function(t,n){var i,r=e.props.enableGradient?(null===(i=t.gradient)||void 0===i?void 0:i[0])||oc(n,0,e.props.theme.isInverted)[0]:t.color||Jl(n,0,e.props.theme.isInverted);return{title:t.legend,color:r,hoverAction:function(){e.setState({hoveredLegend:t.legend})},onMouseOutAction:function(){e.setState({hoveredLegend:""})}}}));return u.createElement("div",{className:e._classNames.legendsContainer},u.createElement(jf,(0,o.Cl)({legends:t,centerLegends:!0},e.props.legendProps,{onChange:e._onLegendSelectionChange.bind(e),ref:e._legendsRef})))},e._legendHighlighted=function(t){return e._getHighlightedLegend().includes(t)},e._noLegendHighlighted=function(){return 0===e._getHighlightedLegend().length},e._handleFocus=function(t,n){e._showCallout(t.target,n,!0)},e._handleBlur=function(){e._hideCallout(!0)},e._handleMouseOver=function(t,n){e._showCallout(t.target,n,!1)},e._handleMouseOut=function(){e._hideCallout(!1)},e._handleCalloutDismiss=function(){e._hideCallout(!1)},e._showCallout=function(t,n,i){if(e._calloutAnchor!==n){e._calloutAnchor=n;var r="Current value is "+Tp(e.props.chartValue,e._minValue,e._maxValue,e.props.chartValueFormat,!0),u=e._segments.map((function(t){var n;return{legend:t.legend,y:Op(t,e._minValue,e._maxValue,e.props.variant),color:e.props.enableGradient?null===(n=t.gradient)||void 0===n?void 0:n[0]:t.color}}));e.setState((0,o.Cl)({calloutTarget:t,isCalloutVisible:["Needle","Chart value"].includes(n)||e._noLegendHighlighted()||e._legendHighlighted(n),hoverXValue:r,hoverYValues:u},i?{focusedElement:n}:{}))}},e._hideCallout=function(t){e._calloutAnchor="",e.setState((0,o.Cl)({calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[]},t?{focusedElement:""}:{}))},e._wrapContent=function(t,n,i){var e=nl("#".concat(n));if(e.text(t),!e.node())return!1;for(var r=!1,o=e.node().getComputedTextLength();o>i&&t.length>0;)t=t.slice(0,-1),e.text(t+"..."),r=!0,o=e.node().getComputedTextLength();return r},e._multiValueCallout=function(t){var n=e._yValueHoverSubCountsExists(t.YValueHover);return u.createElement("div",{className:e._classNames.calloutContentRoot},u.createElement("div",{className:e._classNames.calloutDateTimeContainer,style:n?{marginBottom:"11px"}:{}},u.createElement("div",(0,o.Cl)({className:e._classNames.calloutContentX},Ds(t.xAxisCalloutAccessibilityData,"text",!1)),(0,_n.c$)(t.hoverXValue,e.props.culture))),u.createElement("div",{className:e._classNames.calloutInfoContainer,style:n?{display:"flex"}:{}},t.YValueHover&&t.YValueHover.map((function(t,i,r){var a=i+1===r.length,l=t.shouldDrawBorderBottom,s=void 0!==l&&l;return u.createElement("div",(0,o.Cl)({},Ds(t.callOutAccessibilityData,"text",!1),{key:"callout-content-".concat(i),style:n?(0,o.Cl)({display:"inline-block"},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"}):(0,o.Cl)({},s&&{borderBottom:"1px solid ".concat(e.props.theme.semanticColors.menuDivider),paddingBottom:"10px"})}),e._getCalloutContent(t,i,n,a))})),!!t.descriptionMessage&&u.createElement("div",{className:e._classNames.descriptionMessage},t.descriptionMessage)))},e._getChartTitle=function(){var t=e.props.chartTitle;return(t?"".concat(t,". "):"")+"Gauge chart with ".concat(e._segments.length," segments. ")},lc(e),e._margins=e._getMargins(),e._legendsHeight=n.hideLegend?0:24,e.state={hoveredLegend:"",selectedLegends:(null===(i=n.legendProps)||void 0===i?void 0:i.selectedLegends)||[],focusedElement:"",calloutTarget:null,isCalloutVisible:!1,hoverXValue:"",hoverYValues:[],width:140+e._margins.left+e._margins.right,height:70+e._margins.top+e._margins.bottom+e._legendsHeight},e._isRTL=(0,l.jI)(n.theme),e._calloutAnchor="",e._legendsRef=u.createRef(),e}return(0,o.C6)(n,t),n.prototype.componentDidMount=function(){this._rootElem&&this.setState({width:this._rootElem.clientWidth,height:this._rootElem.clientHeight})},n.prototype.componentDidUpdate=function(t){var n,i,e;Bs(null===(n=t.legendProps)||void 0===n?void 0:n.selectedLegends,null===(i=this.props.legendProps)||void 0===i?void 0:i.selectedLegends)||this.setState({selectedLegends:(null===(e=this.props.legendProps)||void 0===e?void 0:e.selectedLegends)||[]})},n.prototype.render=function(){var t=this;this._margins=this._getMargins(),this._legendsHeight=this.props.hideLegend?0:24;var n=this.props.width||this.state.width,i=this.props.height||this.state.height;this._outerRadius=Math.min((n-(this._margins.left+this._margins.right))/2,i-(this._margins.top+this._margins.bottom+this._legendsHeight));var e=this._getStylesBasedOnBreakpoint(),r=e.arcWidth,a=e.chartValueSize;this._innerRadius=this._outerRadius-r;var l=this._processProps().arcs;return this._classNames=Np(this.props.styles,{theme:this.props.theme,className:this.props.className,chartValueSize:a}),u.createElement("div",{className:this._classNames.root,ref:function(n){return t._rootElem=n}},u.createElement(Dc,{direction:Ys.horizontal,className:this._classNames.chartWrapper},u.createElement("svg",{className:this._classNames.chart,role:"region","aria-label":this._getChartTitle(),onMouseLeave:this._handleMouseOut,width:n,height:i-this._legendsHeight},u.createElement("g",{transform:"translate(".concat(n/2,", ").concat(i-(this._margins.bottom+this._legendsHeight),")")},this.props.chartTitle&&u.createElement("text",{x:0,y:-(this._outerRadius+11),textAnchor:"middle",className:this._classNames.chartTitle,"aria-hidden":!0},this.props.chartTitle),!this.props.hideMinMax&&u.createElement(u.Fragment,null,u.createElement("text",{x:(this._isRTL?1:-1)*(this._outerRadius+4),y:0,textAnchor:"end",className:this._classNames.limits,role:"img","aria-label":"Min value: ".concat(this._minValue)},Ns(this._minValue)),u.createElement("text",{x:(this._isRTL?-1:1)*(this._outerRadius+4),y:0,textAnchor:"start",className:this._classNames.limits,role:"img","aria-label":"Max value: ".concat(this._maxValue)},Ns(this._maxValue))),l.map((function(n,i){var e,r,a=t._segments[n.segmentIndex],l=p("Arc_clip")+"".concat(i,"_").concat(n.startAngle,"_").concat(n.endAngle),s=Np(t.props.styles,{theme:t.props.theme,solidFill:t.props.enableGradient?"transparent":a.color,gradientFill:"conic-gradient(\n from ".concat(n.startAngle,"rad at 50% 100%,\n ").concat(null===(e=a.gradient)||void 0===e?void 0:e[0],",\n ").concat(null===(r=a.gradient)||void 0===r?void 0:r[1]," ").concat(n.endAngle-n.startAngle,"rad\n )"),opacity:t._legendHighlighted(a.legend)||t._noLegendHighlighted()?1:.1});return u.createElement(u.Fragment,{key:i},u.createElement("path",(0,o.Cl)({d:n.d,strokeWidth:t.state.focusedElement===a.legend?2:0,className:s.segment},Ds((0,o.Cl)({ariaLabel:Op(a,t._minValue,t._maxValue,t.props.variant,!0)},a.accessibilityData),"img",!0),{onFocus:function(n){return t._handleFocus(n,a.legend)},onBlur:t._handleBlur,onMouseEnter:function(n){return t._handleMouseOver(n,a.legend)},onMouseMove:function(n){return t._handleMouseOver(n,a.legend)},"data-is-focusable":t._legendHighlighted(a.legend)||t._noLegendHighlighted()})),t.props.enableGradient&&u.createElement(u.Fragment,null,u.createElement("clipPath",{id:l},u.createElement("path",{d:n.d})),u.createElement("foreignObject",{x:"-50%",y:"-100%",width:"100%",height:"100%",clipPath:"url(#".concat(l,")")},u.createElement("div",{className:s.gradientSegment}))))})),this._renderNeedle(),u.createElement("g",{onMouseEnter:function(n){return t._handleMouseOver(n,"Chart value")},onMouseMove:function(n){return t._handleMouseOver(n,"Chart value")}},u.createElement($d,{content:Tp(this.props.chartValue,this._minValue,this._maxValue,this.props.chartValueFormat),textProps:{x:0,y:0,textAnchor:"middle",className:this._classNames.chartValue,"aria-hidden":"true"},maxWidth:2*this._innerRadius-24,wrapContent:this._wrapContent})),this.props.sublabel&&u.createElement($d,{content:this.props.sublabel,textProps:{x:0,y:4,textAnchor:"middle",dominantBaseline:"hanging",className:this._classNames.sublabel},maxWidth:2*this._innerRadius,wrapContent:this._wrapContent})))),this._renderLegends(),!this.props.hideTooltip&&this.state.isCalloutVisible&&u.createElement(Pn,(0,o.Cl)({target:this.state.calloutTarget,directionalHint:3,gapSpace:15,isBeakVisible:!1,onDismiss:this._handleCalloutDismiss},this.props.calloutProps),this._multiValueCallout({hoverXValue:this.state.hoverXValue,YValueHover:this.state.hoverYValues})))},Object.defineProperty(n.prototype,"chartContainer",{get:function(){return this._rootElem},enumerable:!1,configurable:!0}),n.prototype._onLegendSelectionChange=function(t,n,i){var e,r;(null===(e=this.props.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?this.setState({selectedLegends:t}):this.setState({selectedLegends:t.slice(-1)}),(null===(r=this.props.legendProps)||void 0===r?void 0:r.onChange)&&this.props.legendProps.onChange(t,n,i)},n.prototype._getHighlightedLegend=function(){return this.state.selectedLegends.length>0?this.state.selectedLegends:this.state.hoveredLegend?[this.state.hoveredLegend]:[]},n.prototype._yValueHoverSubCountsExists=function(t){return!!t&&t.some((function(t){return t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData}))},n.prototype._getCalloutContent=function(t,n,i,e){var r=e?{}:{marginRight:"16px"},o=void 0!==t.index&&-1!==t.index,a=Np(this.props.styles,{theme:this.props.theme,lineColor:t.color,toDrawShape:o}),l=this.props.culture,s=(0,_n.c$)(t.y,l);if(t.yAxisCalloutData&&"string"!=typeof t.yAxisCalloutData){var c=t.yAxisCalloutData;return u.createElement("div",{style:r},u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),Object.keys(c).map((function(t){return u.createElement("div",{key:t,className:a.calloutBlockContainer},u.createElement("div",{className:a.calloutlegendText}," ",(0,_n.c$)(t,l)),u.createElement("div",{className:a.calloutContentY},(0,_n.c$)(c[t],l)))})))}return u.createElement("div",{style:i?r:{}},i&&u.createElement("div",{className:"ms-fontWeight-semibold",style:{fontSize:"12pt"}},t.legend," (",s,")"),u.createElement("div",{id:"".concat(n,"_").concat(t.y),className:a.calloutBlockContainer},o&&u.createElement(Bf,{svgProps:{className:a.shapeStyles},pathProps:{fill:t.color},shape:As[t.index%Object.keys(Vs).length]}),u.createElement("div",null,u.createElement("div",{className:a.calloutlegendText}," ",t.legend),u.createElement("div",{className:a.calloutContentY},(0,_n.c$)(t.yAxisCalloutData?t.yAxisCalloutData:t.y||t.data,l)))))},n}(u.Component),Fp=(0,r.I)(Ep,(function(t){var n,i,e,r,u,a,l,s,c=t.theme,f=t.chartValueSize,d=t.className,v=t.lineColor,h=t.toDrawShape,p=t.solidFill,g=t.gradientFill,y=t.opacity;return{root:[c.fonts.medium,"ms-GaugeChart",{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",height:"100%"},d],chart:{display:"block"},limits:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(n={},n[It.up]={fill:"CanvasText"},n)},chartValue:{fontSize:f,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(i={},i[It.up]={fill:"CanvasText"},i)},sublabel:{fontSize:It.s.small,fontWeight:It.BO.semibold,fill:c.palette.neutralPrimary,selectors:(e={},e[It.up]={fill:"CanvasText"},e)},needle:{fill:c.palette.black,stroke:c.semanticColors.bodyBackground},chartTitle:{fontSize:It.s.small,fill:c.palette.neutralPrimary,selectors:(r={},r[It.up]={fill:"CanvasText"},r)},segment:{outline:"none",stroke:c.semanticColors.focusBorder,fill:p,fillOpacity:y},gradientSegment:{width:"100%",height:"100%",background:g,opacity:y},legendsContainer:{width:"100%"},calloutContentRoot:[{display:"grid",overflow:"hidden",padding:"11px 16px 10px 16px",backgroundColor:c.semanticColors.bodyBackground,backgroundBlendMode:"normal, luminosity"}],calloutDateTimeContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},calloutContentX:[(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",opacity:"0.85",color:c.semanticColors.bodySubtext})],calloutBlockContainer:[c.fonts.mediumPlus,{marginTop:"13px",color:c.semanticColors.bodyText},!h&&{selectors:(u={},u[It.up]={forcedColorAdjust:"none"},u),borderLeft:"4px solid ".concat(v),paddingLeft:"8px"},h&&{display:"flex"}],shapeStyles:{marginRight:"8px"},calloutlegendText:(0,o.Cl)((0,o.Cl)({},c.fonts.small),{lineHeight:"16px",selectors:(a={},a[It.up]={color:"CanvasText"},a),color:c.semanticColors.bodySubtext}),calloutContentY:[(0,o.Cl)((0,o.Cl)({},c.fonts.mediumPlus),{fontWeight:"bold",lineHeight:"22px",selectors:(l={},l[It.up]={color:"CanvasText"},l)})],descriptionMessage:[c.fonts.small,{selectors:(s={},s[It.up]={color:"CanvasText"},s),color:c.semanticColors.bodyText,marginTop:"10px",paddingTop:"10px",borderTop:"1px solid ".concat(c.semanticColors.menuDivider)}]}})),Bp=i(927),Pp=u.createContext(void 0),_p=Array.prototype,Hp=_p.slice;function Ip(t){return()=>t}function Wp(t){return t}function Rp(t){return Math.max(1,Math.ceil(Math.log(function(t){let n=0;for(let i of t)null!=i&&(i=+i)>=i&&++n;return n}(t))/Math.LN2)+1)}function $p(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function zp(t,n){this._context=t,this._k=(1-n)/6}_p.map,zp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:$p(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:$p(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var jp=function t(n){function i(t){return new zp(t,n)}return i.tension=function(n){return t(+n)},i}(0),Yp=["#636efa","#ef553b","#00cc96","#ab63fa","#ffa15a","#19d3f3","#ff6692","#b6e880","#ff97ff","#fecb52"],Xp=[Xl.color1,Xl.warning,Xl.color8,Xl.color4,Xl.color7,Xl.color6,Xl.color2,Xl.color5,Xl.color9,Xl.color10];function Gp(t,n,i){if("plotly"!==n)return t;var e=Yp.indexOf(t.toLowerCase());return-1!==e?Ql(Xp[e],i):t}var qp=function(t,n,i){if(!n.current.has(t)){var e;return e=n.current.size<Xp.length?Ql(Xp[n.current.size],i):Jl(n.current.size,0,i),n.current.set(t,e),e}return n.current.get(t)},Up=function(t,n,i,e,r){return"default"===n&&i?function(t,n,i,e){var r=[];if(n){var o=function(t){return Ol(t)&&Bs(null==t?void 0:t.map((function(t){return t.toLowerCase()})),Yp)?"plotly":"others"}(t);if(Ol(n))n.forEach((function(t,n){var u=null==t?void 0:t.toString().trim(),a=qp("Label_".concat(n),i,e);if(u){var l=Ao(u);r.push(l?Gp(l.formatHex(),o,e):a)}else r.push(a)}));else if("string"==typeof n){var u=Ao(n);return u?Gp(u.formatHex(),o,e):qp("Label_0",i,e)}return r}}(t,i,e,r):void 0},Zp=function(t,n,i,e,r){return t&&Ol(t)&&t.length>0?t[n%t.length]:"string"==typeof t?t:qp(i,e,r)},Kp=function(t,n){var i,e,r,o,u,a;return(null===(i=t.marker)||void 0===i?void 0:i.opacity)?Ol(null===(e=t.marker)||void 0===e?void 0:e.opacity)?(null===(r=t.marker)||void 0===r?void 0:r.opacity)[n%(null===(o=t.marker)||void 0===o?void 0:o.opacity).length]:null===(u=t.marker)||void 0===u?void 0:u.opacity:null!==(a=t.opacity)&&void 0!==a?a:1},Jp=function(t,n,i){var e,r,o,u,a,l,s,c,f,d,v,h;if((null===(r=null===(e=null==t?void 0:t.coloraxis)||void 0===e?void 0:e.colorscale)||void 0===r?void 0:r.length)&&Ol(null===(o=n.marker)||void 0===o?void 0:o.color)&&(null===(u=n.marker)||void 0===u?void 0:u.color).length>0&&"number"==typeof(null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[0])){var p=null===(s=null==t?void 0:t.coloraxis)||void 0===s?void 0:s.colorscale,g=null===(c=n.marker)||void 0===c?void 0:c.color,y=[null!==(d=null===(f=null==t?void 0:t.coloraxis)||void 0===f?void 0:f.cmin)&&void 0!==d?d:Math.min.apply(Math,g),null!==(h=null===(v=null==t?void 0:t.coloraxis)||void 0===v?void 0:v.cmax)&&void 0!==h?h:Math.max.apply(Math,g)],m=y[0],b=y[1],x=p.map((function(t){var n=t[0];return m+n*(b-m)})),w=p.map((function(t){return t[1]}));return Iu().domain(x).range(w)}return i},Qp="nonplot_",tg="repeat(1, 1fr)",ng={dot:{strokeDasharray:"1, 5",strokeLinecap:"round",strokeWidth:"2",lineBorderWidth:"4"},dash:{strokeDasharray:"5, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdash:{strokeDasharray:"10, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},dashdot:{strokeDasharray:"5, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},longdashdot:{strokeDasharray:"10, 5, 1, 5",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"},solid:{strokeDasharray:"0",strokeLinecap:"butt",strokeWidth:"2",lineBorderWidth:"4"}};function ig(t){var n,i,e,r,o,u,a,l,s,c,f,d;return{chartTitle:"string"==typeof(null==t?void 0:t.title)?t.title:null!==(i=null===(n=null==t?void 0:t.title)||void 0===n?void 0:n.text)&&void 0!==i?i:"",xAxisTitle:"string"==typeof(null===(e=null==t?void 0:t.xaxis)||void 0===e?void 0:e.title)?null===(r=null==t?void 0:t.xaxis)||void 0===r?void 0:r.title:null!==(a=null===(u=null===(o=null==t?void 0:t.xaxis)||void 0===o?void 0:o.title)||void 0===u?void 0:u.text)&&void 0!==a?a:"",yAxisTitle:"string"==typeof(null===(l=null==t?void 0:t.yaxis)||void 0===l?void 0:l.title)?null===(s=null==t?void 0:t.yaxis)||void 0===s?void 0:s.title:null!==(d=null===(f=null===(c=null==t?void 0:t.yaxis)||void 0===c?void 0:c.title)||void 0===f?void 0:f.text)&&void 0!==d?d:""}}var eg=function(t,n){var i=ag(t,n);return(null==i?void 0:i.tickformat)?{tickFormat:null==i?void 0:i.tickformat}:{}},rg=function(t,n){var i=ug(t,n);return(null==i?void 0:i.tickformat)?{yAxisTickFormat:Bu(null==i?void 0:i.tickformat)}:{}},og=function(t,n){var i,e=null===(i=ug(t,n))||void 0===i?void 0:i.range;return e&&2===e.length?{yMinValue:e[0],yMaxValue:e[1]}:{}},ug=function(t,n){return null==n?void 0:n.yaxis},ag=function(t,n){return null==n?void 0:n.xaxis},lg=function(t,n){return"function"==typeof(null==n?void 0:n.yAxisTickFormat)&&"number"==typeof t?n.yAxisTickFormat(t):(0,_n.c$)(t)},sg=function(t){var n=(new Date).getFullYear();if(t.length>0&&Array.isArray(t[0]))throw new Error("updateXValues:: 2D array not supported");for(var i=t.map((function(t){var i="".concat(t," 01, ").concat(n);return wl(i)?new Date(i):null})),e=i.map((function(t,n){return[t,n]})).filter((function(t){return null!==t[0]})),r=e.length-1;r>0;r--){var o=e[r][0],u=e[r-1][0],a=o.getMonth(),l=u.getMonth(),s=o.getFullYear(),c=u.getFullYear();l>=a?e[r-1][0].setFullYear(s-1):c>s&&e[r-1][0].setFullYear(s),i[e[r-1][1]]=e[r-1][0]}return t.map((function(t,n){return null===i[n]?null:"".concat(t," 01, ").concat(i[n].getFullYear())}))},cg=function(t,n){var i,e;return"y2"===t.yaxis&&("x"===(null===(i=null==n?void 0:n.yaxis2)||void 0===i?void 0:i.anchor)||"right"===(null===(e=null==n?void 0:n.yaxis2)||void 0===e?void 0:e.side))},fg=function(t,n,i,e){var r,o,u,a,l,s,c=!1;return t.forEach((function(t){if(cg(t,n)){c=!0;var i=t.y;i&&(l=Math.min.apply(Math,i),s=Math.max.apply(Math,i))}})),c?("number"==typeof l&&"number"==typeof i&&(l=Math.min(l,i)),"number"==typeof s&&"number"==typeof e&&(s=Math.max(s,e)),(null===(r=null==n?void 0:n.yaxis2)||void 0===r?void 0:r.range)&&(l=n.yaxis2.range[0],s=n.yaxis2.range[1]),{secondaryYAxistitle:"string"==typeof(null===(o=null==n?void 0:n.yaxis2)||void 0===o?void 0:o.title)?n.yaxis2.title:"string"==typeof(null===(a=null===(u=null==n?void 0:n.yaxis2)||void 0===u?void 0:u.title)||void 0===a?void 0:a.text)?n.yaxis2.title.text:void 0,secondaryYScaleOptions:{yMinValue:l,yMaxValue:s}}):{}},dg=function(t,n,i,e,r){var o=Up(t,n,i,e,r);return Zp(o,0,"",e,r)},vg=function(t,n,i,e,r){return null==t?"":n?t.toString():i?e?new Date(t):r?parseFloat(t):t:t},hg=function(t,n){void 0===n&&(n="");var i={};for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=n?"".concat(n,".").concat(e):e,o=t[e];"object"!=typeof o||null===o||Array.isArray(o)||o instanceof Date?i[r]=o:Object.assign(i,hg(o,r))}return i},pg=function(t,n,i,e,r,u){var a,l,s,c,f={},d=0,v=0,h=fg(t.data,t.layout),p=Vg(t.data,t.layout,n),g=p.legends,y=p.hideLegend,m=void 0,b=rg(t.data[0],t.layout);t.data.forEach((function(n,a){var l,s,c,h,p,y,x,w;m=Jp(t.layout,n,m);var C=Sl(n.x),M=Up(null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.layout)||void 0===c?void 0:c.colorway,e,null===(h=n.marker)||void 0===h?void 0:h.color,i,r),k=Up(null===(x=null===(y=null===(p=t.layout)||void 0===p?void 0:p.template)||void 0===y?void 0:y.layout)||void 0===x?void 0:x.colorway,e,null===(w=n.line)||void 0===w?void 0:w.color,i,r),A=n.x,S=Ml(A),L=Ll(A),V=kl(A),D=Ng(n);D.forEach((function(e,l){var s=e[0],c=e[1],h=n.x.slice(s,c),p=n.y.slice(s,c);h.forEach((function(e,s){var c,h,y,x,w,A;f[e]||(f[e]={xAxisPoint:vg(e,C,L,S,V),chartData:[],lineData:[]});var N=g[a],O=m?m(Ol(null===(c=n.marker)||void 0===c?void 0:c.color)?null===(y=null===(h=n.marker)||void 0===h?void 0:h.color)||void 0===y?void 0:y[s%(null===(x=n.marker)||void 0===x?void 0:x.color).length]:0):Zp(M,s,N,i,r),T=Kp(n,s),E=p[s],F=lg(E,b);if("bar"===n.type)f[e].chartData.push({legend:N,data:E,color:null!==(w=Vo(O).copy({opacity:T}).formatHex8())&&void 0!==w?w:O,yAxisCalloutData:F}),"number"==typeof E&&(d=Math.max(d,E));else if("scatter"===n.type||u){var B=Zp(k,a,N,i,r),P=mg(n.line),_=Lg(n);f[e].lineData.push({legend:N+(D.length>1?".".concat(l+1):""),legendShape:_,y:E,color:null!==(A=Vo(B).copy({opacity:T}).formatHex8())&&void 0!==A?A:O,lineOptions:(0,o.Cl)((0,o.Cl)({},null!=P?P:{}),{mode:n.mode}),useSecondaryYScale:cg(n,t.layout),yAxisCalloutData:F}),cg(n,t.layout)||"number"!=typeof E||(d=Math.max(d,E),v=Math.min(v,E))}}))}))}));var x=Object.values(f);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:x,width:null===(a=t.layout)||void 0===a?void 0:a.width,height:null!==(s=null===(l=t.layout)||void 0===l?void 0:l.height)&&void 0!==s?s:350,barWidth:"auto",yMaxValue:d,yMinValue:v,mode:"plotly"},h),{hideTickOverlap:!0,hideLegend:y,roundCorners:!0,supportNegativeData:!0,barGapMax:2,showYAxisLables:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:"string"==typeof(null===(c=x[0])||void 0===c?void 0:c.xAxisPoint)}),ig(t.layout)),Eg(t.data,t.layout)),og(t.data[0],t.layout)),eg(t.data[0],t.layout)),b),Bg(t.data,t.layout))},gg=function(t,n,i,e,r,u){var a,l,s,c,f=["text","markers","text+markers","markers+text","lines+markers","markers+line","text+lines+markers","lines+markers+text"].includes(null===(a=t.data[0])||void 0===a?void 0:a.mode),d="area"===i,v="scatter"===i,h=fg(t.data,t.layout,d?0:void 0,d?0:void 0),p="tonexty",g=Vg(t.data,t.layout,n),y=g.legends,m=g.hideLegend,b=rg(t.data[0],t.layout),x=t.data.map((function(n,i){var a,l,s,c,d,v,h,g,m=f?(null===(a=null==n?void 0:n.mode)||void 0===a?void 0:a.includes("line"))?null===(l=n.line)||void 0===l?void 0:l.color:null===(s=n.marker)||void 0===s?void 0:s.color:null===(c=n.line)||void 0===c?void 0:c.color,x=Up(null===(h=null===(v=null===(d=t.layout)||void 0===d?void 0:d.template)||void 0===v?void 0:v.layout)||void 0===h?void 0:h.colorway,r,m,e,u),w=n.x,C=Ll(w),M=Ml(w),k=kl(w),A=Sl(n.x),S=y[i],L=Zp(x,i,S,e,u),V=Kp(n,i);p="tozeroy"===n.fill?"tozeroy":"tonexty";var D=(null===(g=n.mode)||void 0===g?void 0:g.includes("text"))||"scatterpolar"===n.type?void 0:mg(n.line),N=Lg(n);return Ng(n).map((function(i,e){var r,u,a,l,s,c,f,d,v,h=i[0],p=i[1],g=w.slice(h,p),y=n.y.slice(h,p),m=Ol(null===(r=n.marker)||void 0===r?void 0:r.size)?n.marker.size.slice(h,p):[],x=Array.isArray(n.text)?n.text.slice(h,p):void 0;return{legend:S,legendShape:N,data:g.map((function(t,i){var e,r;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({x:vg(t,A,C,M,k),y:y[i]},Array.isArray(null===(e=n.marker)||void 0===e?void 0:e.size)?{markerSize:m[i]}:"number"==typeof(null===(r=n.marker)||void 0===r?void 0:r.size)?{markerSize:n.marker.size}:{}),x?{text:x[i]}:{}),{yAxisCalloutData:lg(y[i],b)})})),color:null!==(u=Vo(L).copy({opacity:V}).formatHex8())&&void 0!==u?u:L,lineOptions:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},null!=D?D:{}),{mode:"scatterpolar"!==n.type?n.mode:"scatterpolar"}),"scatterpolar"===n.type?{originXOffset:null===(a=t.layout)||void 0===a?void 0:a.__polarOriginX,direction:null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.polar)||void 0===s?void 0:s.angularaxis)||void 0===c?void 0:c.direction,rotation:null===(v=null===(d=null===(f=t.layout)||void 0===f?void 0:f.polar)||void 0===d?void 0:d.angularaxis)||void 0===v?void 0:v.rotation,axisLabel:n.__axisLabel?n.__axisLabel:{}}:{}),useSecondaryYScale:cg(n,t.layout)}}))})).flat(),w=og(t.data[0],t.layout);if(void 0===w.yMinValue&&void 0===w.yMaxValue){var C=Cs(x);w.yMinValue=C.startValue,w.yMaxValue=C.endValue}var M=x.reduce((function(t,n){return t+n.data.length}),0),k={lineChartData:x},A={scatterChartData:x},S=(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({supportNegativeData:!0},h),{width:null===(l=t.layout)||void 0===l?void 0:l.width,height:null!==(c=null===(s=t.layout)||void 0===s?void 0:s.height)&&void 0!==c?c:350,hideTickOverlap:!0,hideLegend:m,useUTC:!1,optimizeLargeData:M>1e3}),ig(t.layout)),eg(t.data[0],t.layout)),b),Pg(t.data,t.layout));return d?(0,o.Cl)({data:k,mode:p},S):(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v?A:k,roundedTicks:!0,enableReflow:!1},S),w),v?(0,o.Cl)({showYAxisLablesTooltip:!0},Eg(t.data,t.layout)):{})},yg=function(t){return t.replace(/&lt;[^&]*?&gt;/g,"").replace(/<[^>]*>/g,"").replace(/&lt;br&gt;|\\u003cbr\\u003e|<br>/gi,"").replace(/\$[^$]*\$/g,"$").trim()};function mg(t){if(t){var n={};switch(t.dash&&(n=(0,o.Cl)((0,o.Cl)({},n),ng[t.dash])),t.shape){case"spline":var i="number"==typeof t.smoothing?t.smoothing:1;n.curve=jp.tension(1-i/1.3);break;case"hv":n.curve="stepAfter";break;case"vh":n.curve="stepBefore";break;case"hvh":n.curve="step";break;default:n.curve="linear"}return Object.keys(n).length>0?n:void 0}}var bg=function(t,n,i){return null==n?-1:i?t.findIndex((function(t){return t.includes(n)})):t.findIndex((function(i,e){return n>=i.x0&&(e===t.length-1?n<=i.x1:n<i.x1)}))},xg=function(t){return t.x1-t.x0},wg=function(t){return(t.x1+t.x0)/2},Cg=function(t,n,i,e){if(!t||0===t.length)return[];if(Ll(t)){var r=Array.from(new Set(t)),o="number"==typeof n?Math.ceil(n):0,u="number"==typeof i?Math.floor(i)+1:r.length,a="number"==typeof e?e:1;return mu(o,u,a).map((function(t){return r.slice(t,t+a)}))}var l=Iu().domain(dp(t)).nice().domain(),s=l[0],c=l[1];s="number"==typeof n?n:s,c="number"==typeof i?i:c;var f=function(){var t=Wp,n=dp,i=Rp;function e(e){Array.isArray(e)||(e=Array.from(e));var r,o,u,a=e.length,l=new Array(a);for(r=0;r<a;++r)l[r]=t(e[r],r,e);var s=n(l),c=s[0],f=s[1],d=i(l,c,f);if(!Array.isArray(d)){const t=f,i=+d;if(n===dp&&([c,f]=ii(c,f,i)),(d=Qn(c,f,i))[0]<=c&&(u=ti(c,f,i)),d[d.length-1]>=f)if(t>=f&&n===dp){const t=ti(c,f,i);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=(Math.ceil(f*-t)+1)/-t))}else d.pop()}for(var v=d.length,h=0,p=v;d[h]<=c;)++h;for(;d[p-1]>f;)--p;(h||p<v)&&(d=d.slice(h,p),v=p-h);var g,y=new Array(v+1);for(r=0;r<=v;++r)(g=y[r]=[]).x0=r>0?d[r-1]:c,g.x1=r<v?d[r]:f;if(isFinite(u)){if(u>0)for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=f&&y[Math.min(v,Math.floor((o-c)/u))].push(e[r]);else if(u<0)for(r=0;r<a;++r)if(null!=(o=l[r])&&c<=o&&o<=f){const t=Math.floor((c-o)*u);y[Math.min(v,t+(d[t]<=o))].push(e[r])}}else for(r=0;r<a;++r)null!=(o=l[r])&&c<=o&&o<=f&&y[oo(d,o,0,v)].push(e[r]);return y}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:Ip(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:Ip([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(i="function"==typeof t?t:Ip(Array.isArray(t)?Hp.call(t):t),e):i},e}().domain([s,c]);if("number"==typeof e&&e>0){for(var d=[],v=Math.max(Ag(s),Ag(e)),h=Sg(s,v);h<Sg(c+e,v);)d.push(h),h=Sg(h+e,v);return s=d[0],c=d[d.length-1],f.domain([s,c]).thresholds(d),f(t).slice(0,-1)}return f(t)},Mg=function(t,n){var i,e;switch(t){case"sum":return oi(n);case"avg":return 0===n.length?0:oi(n)/n.length;case"min":return null!==(i=ei(n))&&void 0!==i?i:0;case"max":return null!==(e=ri(n))&&void 0!==e?e:0;default:return n.length}},kg=function(t,n,i,e,r){switch(void 0===r&&(r=1),t){case"percent":return 0===i?0:n/i*100;case"probability":return 0===i?0:n/i;case"density":return e*r===0?0:n/(e*r);case"probability density":return i*e*r===0?0:n/(i*e*r);default:return n}},Ag=function(t){var n,i;return null!==(i=null===(n=t.toString().split(".")[1])||void 0===n?void 0:n.length)&&void 0!==i?i:0},Sg=function(t,n){var i=Math.pow(10,n);return Math.round(t*i)/i},Lg=function(t){var n,i,e=(null===(n=t.line)||void 0===n?void 0:n.dash)||"solid";return"dot"===e||"dash"===e||"dashdot"===e?"dottedLine":(null===(i=t.mode)||void 0===i?void 0:i.includes("markers"))?"circle":"default"},Vg=function(t,n,i){var e=[];1===t.length?e.push(t[0].name||""):t.forEach((function(t,n){e.push(t.name||"Series ".concat(n+1))}));var r=t.every((function(t){return!1===t.showlegend})),o=!1===(null==n?void 0:n.showlegend)||!0!==(null==n?void 0:n.showlegend)&&e.length<2;return{legends:e,hideLegend:i||o||r}},Dg=function(t,n){if(Ol(t)){if("number"!=typeof t[n]||!isFinite(t[n]))return;return t[n]}return 1},Ng=function(t){if(!Ol(t.x)||!Ol(t.y))return[];for(var n=[],i=0,e=0;e<t.x.length;e++)(Dl(t.x[e])||Dl(t.y[e]))&&(e-i>0&&n.push([i,e]),i=e+1);return e-i>0&&n.push([i,e]),n},Og=function(t,n){var i=""===t.replace(n,"")?"1":t.replace(n,"");return parseInt(i,10)-1},Tg=function(t){return["donut","sankey","pie"].includes(t)},Eg=function(t,n){var i={},e={x:null==n?void 0:n.xaxis,y:null==n?void 0:n.yaxis};return Object.keys(e).forEach((function(n){var r=e[n],o=n[0],u="".concat(o,"AxisCategoryOrder"),a=[];if(t.forEach((function(t){var n;null===(n=t[o])||void 0===n||n.forEach((function(t){Dl(t)||a.push(t)}))})),"category"===(null==r?void 0:r.type)||Ll(a)&&!kl(a)&&!Ml(a))if(!(Ol(null==r?void 0:r.categoryarray)&&r.categoryarray.length>0)||(null==r?void 0:r.categoryorder)&&"array"!==r.categoryorder)if((null==r?void 0:r.categoryorder)&&"trace"!==r.categoryorder&&"array"!==r.categoryorder)i[u]=r.categoryorder;else{var l=Array.from(new Set(a));i[u]="reversed"===(null==r?void 0:r.autorange)?l.reverse():l}else i[u]=r.categoryarray;else i[u]="data"})),i},Fg=/^\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z)?)?$/,Bg=function(t,n,i){var e;"number"==typeof(null==n?void 0:n.bargap)&&(e=n.bargap>=0&&n.bargap<=1?n.bargap:.2);var r=ri(t.map((function(t){return"bar"!==t.type||!Ol(t.width)&&"number"!=typeof t.width?[]:t.width})).flat());return"number"==typeof r&&(e=1-r,e=Math.max(0,Math.min(e,1))),void 0===e?{}:i?{maxBarHeight:1e3,yAxisPadding:e}:{barWidth:"auto",maxBarWidth:1e3,xAxisInnerPadding:e,xAxisOuterPadding:e/2}},Pg=function(t,n){var i,e={},r=new Set;t.forEach((function(t){var n=Hl(t);i=n.x,r.add(n.y)}));var o=function(t,i){var e,r=Il(t,i);return"log"===(null===(e=null==n?void 0:n[r])||void 0===e?void 0:e.type)};"number"==typeof i&&o("x",i)&&(e.xScaleType="log");var u=Array.from(r).sort();return u.length>0&&o("y",u[0])&&(e.yScaleType="log"),u.length>1&&o("y",u[1])&&(e.secondaryYScaleType="log"),e},_g=function(t){var n,i,e=u.useRef(null),r=u.useRef(),a=u.useState({}),l=a[0],c=a[1];r.current=t.onResize,u.useEffect((function(){var t,n,i=(0,s.z)(e.current);return i&&i.ResizeObserver&&(n=new i.ResizeObserver((function(n){var e,o=n[0].contentRect,u=o.width,a=o.height;t=null==i?void 0:i.requestAnimationFrame((function(){c((function(t){var n=Math.floor(u),i=Math.floor(a);return t.containerWidth===n&&t.containerHeight===i?t:{containerWidth:n,containerHeight:i}}))})),null===(e=r.current)||void 0===e||e.call(r,u,a)})),e.current&&n.observe(e.current)),function(){t&&(null==i||i.cancelAnimationFrame(t)),null==n||n.disconnect()}}),[]);var f=u.useMemo((function(){var n=l.containerWidth,i=l.containerHeight;return"number"==typeof t.aspect&&t.aspect>0&&(n?i=n/t.aspect:i&&(n=i*t.aspect),"number"==typeof t.maxHeight&&i&&i>t.maxHeight&&(i=t.maxHeight)),u.Children.map(t.children,(function(t){var e,r,a,l,s,c,f={root:(0,o.Cl)((0,o.Cl)({},null===(e=t.props.styles)||void 0===e?void 0:e.root),{width:"100%",height:"100%"}),chartWrapper:(0,o.Cl)((0,o.Cl)({},null===(r=t.props.styles)||void 0===r?void 0:r.chartWrapper),{width:"100%"}),chart:(0,o.Cl)((0,o.Cl)({},null===(a=t.props.styles)||void 0===a?void 0:a.chart),{width:"100%"})};return u.cloneElement(t,{width:n,height:i,shouldResize:(null!=n?n:0)+(null!=i?i:0),styles:(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t.props.styles),f),{subComponentStyles:(0,o.Cl)((0,o.Cl)({},null===(l=t.props.styles)||void 0===l?void 0:l.subComponentStyles),{cartesianStyles:(0,o.Cl)((0,o.Cl)({},null===(c=null===(s=t.props.styles)||void 0===s?void 0:s.subComponentStyles)||void 0===c?void 0:c.cartesianStyles),f)})})})}))}),[l,t.aspect,t.maxHeight,t.children]);return u.createElement("div",{ref:e,style:{width:null!==(n=t.width)&&void 0!==n?n:"100%",height:null!==(i=t.height)&&void 0!==i?i:"100%",minWidth:t.minWidth,minHeight:t.minHeight,maxHeight:t.maxHeight}},f)};function Hg(t){return function(n){var i=n.aspect,e=n.width,r=n.height,a=n.minWidth,l=n.minHeight,s=n.maxHeight,c=n.onResize,f=(0,o.Tt)(n,["aspect","width","height","minWidth","minHeight","maxHeight","onResize"]);return u.createElement(_g,{aspect:i,width:e,height:r,minWidth:a,minHeight:l,maxHeight:s,onResize:c},u.createElement(t,(0,o.Cl)({},f)))}}var Ig=u.forwardRef((function(t,n){var i,e,r=t.useUTC,a=void 0===r||r,s=t.yAxisCategoryOrder,c=void 0===s?"default":s,f=t.maxBarHeight,d=void 0===f?24:f,v=(0,o.Tt)(t,["useUTC","yAxisCategoryOrder","maxBarHeight"]),h=u.useRef(24),g=u.useRef(p("callout")),y=u.useRef({}),m=u.useRef(null),b=u.useRef(null),x=u.useRef(null),w=u.useRef(p("Gantt_empty")),C=u.useRef({}),M=u.useRef({}),k=u.useState(""),A=k[0],S=k[1],L=u.useState(!1),V=L[0],D=L[1],N=u.useState(""),O=N[0],T=N[1],E=u.useState(null),F=E[0],B=E[1],P=u.useState(""),_=P[0],H=P[1],I=u.useState(""),W=I[0],R=I[1],$=u.useState(""),z=$[0],j=$[1],Y=u.useState((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),X=Y[0],G=Y[1],q=u.useState(),U=q[0],Z=q[1];u.useEffect((function(){var t,n,i;Bs(null===(t=M.current.legendProps)||void 0===t?void 0:t.selectedLegends,null===(n=v.legendProps)||void 0===n?void 0:n.selectedLegends)||G((null===(i=v.legendProps)||void 0===i?void 0:i.selectedLegends)||[]),M.current=v}),[v]),u.useImperativeHandle(v.componentRef,(function(){var t,n;return{chartContainer:null!==(n=null===(t=b.current)||void 0===t?void 0:t.chartContainer)&&void 0!==n?n:null,toImage:function(t){var n,i;return Pf(null===(n=b.current)||void 0===n?void 0:n.chartContainer,null===(i=x.current)||void 0===i?void 0:i.toSVG,(0,l.jI)(),t)}}}),[]);var K=u.useMemo((function(){var t,n;C.current={};var i=0;return null!==(n=null===(t=v.data)||void 0===t?void 0:t.map((function(t){var n,e,r,u,a,l="".concat(t.legend);if(!C.current[l]){var s=t.color?Ql(t.color,null===(n=v.theme)||void 0===n?void 0:n.isInverted):Jl(i,0,null===(e=v.theme)||void 0===e?void 0:e.isInverted),c=s;if(v.enableGradient){var f=oc(i,0,null===(r=v.theme)||void 0===r?void 0:r.isInverted);s=(null===(u=t.gradient)||void 0===u?void 0:u[0])||f[0],c=(null===(a=t.gradient)||void 0===a?void 0:a[1])||f[1]}C.current[l]={id:p("legend"),startColor:s,endColor:c},i+=1}var d=C.current[l],h=d.startColor,g=d.endColor;return(0,o.Cl)((0,o.Cl)((0,o.Cl)({},t),{color:h}),v.enableGradient?{gradient:[h,g]}:{})})))&&void 0!==n?n:[]}),[v.data,null===(e=v.theme)||void 0===e?void 0:e.isInverted,v.enableGradient]),J=u.useMemo((function(){return K.length>0?Ls(K[0].x.start,!0):jl.DateAxis}),[K]),Q=u.useMemo((function(){return K.length>0?Ls(K[0].y,!1):Yl.StringAxis}),[K]),tt=u.useMemo((function(){return Ts(v.yAxisPadding,void 0,.5)}),[v.yAxisPadding]),nt=u.useMemo((function(){if(J===jl.DateAxis){var t=100,n=-1;return K.forEach((function(i){var e=as(i.x.start,a),r=as(i.x.end,a);t=Math.min(t,e,r),n=Math.max(n,e,r)})),(0,_n.c2)(t,n)}}),[a,K,J]),it=u.useCallback((function(){var t={};return K.forEach((function(n){t[n.y]||(t[n.y]=[]),t[n.y].push(+n.x.end-+n.x.start)})),t}),[K]),et=u.useCallback((function(){var t=it();return Q!==Yl.StringAxis?Object.keys(t).sort((function(t,n){return+t-+n})):"default"===c?Object.keys(t).reverse():$s(t,c)}),[it,Q,c]),rt=u.useMemo((function(){return et()}),[et]),ot=u.useCallback((function(t,n,i,e,r,o,u,a,l){var s=[];t.forEach((function(t){s.push(t.x.start,t.x.end)}));var c=ei(s)||0,f=ri(s)||0;return{dStartValue:r?f:c,dEndValue:r?c:f,rStartValue:n.left+(r?0:l),rEndValue:i-n.right-(r?l:0)}}),[]),ut=u.useCallback((function(t){y.current=t}),[]),at=u.useCallback((function(t){var n,i;return J===jl.DateAxis?(n=(0,_n.Yn)(t.x.start,v.culture,a,!1,nt),i=(0,_n.Yn)(t.x.end,v.culture,a,!1,nt)):(n=t.x.start.toString(),i=t.x.end.toString()),"".concat(n," - ").concat(i)}),[v.culture,a,nt,J]),lt=u.useCallback((function(){return v.onRenderCalloutPerDataPoint?v.onRenderCalloutPerDataPoint(U,(function(t){return t?u.createElement(Js.ChartHoverCard,{XValue:t.yAxisCalloutData||t.y.toString(),Legend:t.legend,YValue:t.xAxisCalloutData||at(t),color:t.color,culture:v.culture}):null})):null}),[at,U,v.culture,v.onRenderCalloutPerDataPoint]),st=u.useCallback((function(t){var n,i=t.xAxisCalloutData||at(t),e=t.yAxisCalloutData||t.y;return(null===(n=t.callOutAccessibilityData)||void 0===n?void 0:n.ariaLabel)||"".concat(e,". ")+(t.legend?"".concat(t.legend,", "):"")+"".concat(i,".")}),[at]),ct=u.useCallback((function(){return X.length>0?X:O?[O]:[]}),[O,X]),ft=u.useCallback((function(t){return ct().includes("".concat(t))}),[ct]),dt=u.useCallback((function(){return 0===ct().length}),[ct]),vt=u.useCallback((function(t,n){(dt()||ft(n.legend))&&m.current!==n&&(m.current=n,B(t),D(!0),H(n.legend),S(n.color),R(n.yAxisCalloutData||n.y.toString()),j(n.xAxisCalloutData||at(n)),Z(n))}),[at,ft,dt]),ht=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),pt=u.useCallback((function(t,n){vt(n.currentTarget,t)}),[vt]),gt=u.useCallback((function(){}),[]),yt=u.useCallback((function(){m.current=null,B(null),D(!1),H(""),S(""),R(""),j(""),Z(void 0)}),[]),mt=u.useCallback((function(){D(!1)}),[]),bt=u.useCallback((function(t){var n;return n="number"==typeof v.barHeight?v.barHeight:t,"number"==typeof d&&(n=Math.min(n,d)),Math.max(n,1)}),[d,v.barHeight]),xt=u.useCallback((function(){var t=[],n={};K.forEach((function(t){n[t.y]||(n[t.y]=[]),n[t.y].push(t)}));for(var i=rt.length-1;i>=0;i--){var e=rt[i];n[e]&&t.push.apply(t,n[e].sort((function(t,n){return+t.x.start-+n.x.start})))}return t}),[K,rt]),wt=u.useCallback((function(t){var n=t.xScale,i=t.yScalePrimary,e=function(t){var n=C.current["".concat(t)].id;return"".concat(n,"_gradient")},r=[];v.enableGradient&&Object.keys(C.current).forEach((function(t,n){var i=C.current[t],o=i.startColor,a=i.endColor;r.push(u.createElement("linearGradient",{key:n,id:e(t)},u.createElement("stop",{offset:"0",stopColor:o}),u.createElement("stop",{offset:"100%",stopColor:a})))}));var o=0;Q===Yl.StringAxis&&(o=i.bandwidth(),h.current=bt(o));var a=xt().map((function(t,r){var a=n(t.x.start),l=n(t.x.end),s=i(t.y)+(o-h.current)/2,c=dt()||ft(t.legend);return u.createElement("rect",{key:r,x:Math.min(a,l),y:s,width:Math.abs(l-a),height:h.current,rx:v.roundCorners?3:0,fill:v.enableGradient?"url(#".concat(e(t.legend),")"):t.color,opacity:c?1:.1,onClick:t.onClick,onMouseOver:function(n){return pt(t,n)},onMouseLeave:gt,onFocus:function(n){return ht(t,n)},onBlur:gt,"data-is-focusable":c,role:"img","aria-label":st(t)})}));return u.createElement("g",null,r.length>0?u.createElement("defs",null,r):null,a)}),[st,bt,xt,ft,dt,ht,pt,gt,Q,v.enableGradient,v.roundCorners]),Ct=u.useCallback((function(t){T(t)}),[]),Mt=u.useCallback((function(){T("")}),[]),kt=u.useCallback((function(t,n,i){var e,r;(null===(e=v.legendProps)||void 0===e?void 0:e.canSelectMultipleLegends)?G(t):G(t.slice(-1)),(null===(r=v.legendProps)||void 0===r?void 0:r.onChange)&&v.legendProps.onChange(t,n,i)}),[v.legendProps]),At=u.useCallback((function(){var t=[];return Object.keys(C.current).forEach((function(n){var i={title:n,color:C.current[n].startColor,hoverAction:function(){yt(),Ct(n)},onMouseOutAction:function(){Mt()}};t.push(i)})),u.createElement(jf,(0,o.Cl)({legends:t,enabledWrapLines:v.enabledLegendsWrapLines,overflowProps:v.legendsOverflowProps,focusZonePropsInHoverCard:v.focusZonePropsForLegendsInHoverCard,overflowText:v.legendsOverflowText,onChange:kt,ref:x},v.legendProps))}),[yt,Ct,Mt,kt,v.enabledLegendsWrapLines,v.focusZonePropsForLegendsInHoverCard,v.legendProps,v.legendsOverflowProps,v.legendsOverflowText]),St=u.useCallback((function(){return(v.chartTitle?"".concat(v.chartTitle,". "):"")+"Gantt chart with ".concat(K.length," data points. ")}),[K.length,v.chartTitle]),Lt=u.useCallback((function(){return 0===K.length}),[K.length]),Vt=u.useCallback((function(t){var n=8,i=new Set;K.forEach((function(t){i.add(t.y)}));var e=Array.from(i),r=t-(y.current.top+8)-(y.current.bottom+8);return Q!==Yl.StringAxis&&(h.current=bt(Qv(e,r,tt)),n+=h.current/2),(0,o.Cl)((0,o.Cl)({},y.current),{top:y.current.top+n,bottom:y.current.bottom+n})}),[bt,K,tt,Q]);if(Lt())return u.createElement("div",{id:w.current,role:"alert",style:{opacity:"0"},"aria-label":"Graph has no data to display"});h.current=bt(24);var Dt=(0,o.Cl)({isCalloutVisible:V,directionalHint:3,id:"toolTip".concat(g.current),target:F,isBeakVisible:!1,gapSpace:15,color:A,legend:_,XValue:W,YValue:z,onDismiss:mt,preventDismissOnLostFocus:!0},v.calloutProps),Nt={tickValues:v.tickValues,tickFormat:v.tickFormat};return u.createElement(qd,(0,o.Cl)({},v,{yAxisPadding:tt,chartTitle:St(),points:K,chartType:zl.GanttChart,xAxisType:J,yAxisType:Q,stringDatasetForYAxisDomain:rt,calloutProps:Dt,tickParams:Nt,legendBars:At(),createYAxis:ls,getDomainNRangeValues:ot,createStringYAxis:cs,getMinMaxOfYAxis:ks,focusZoneDirection:Ys.bidirectional,customizedCallout:lt(),getmargins:ut,getYDomainMargins:Vt,onChartMouseLeave:yt,ref:b,useUTC:a,children:wt}))}));Ig.displayName="GanttChart";var Wg=(0,r.I)(Ig,(function(t){return{}})),Rg=Hg(_d),$g=Hg(sh),zg=Hg(pv),jg=Hg(Cp),Yg=Hg(Bv),Xg=Hg(yh),Gg=Hg(qh),qg=Hg(Fp),Ug=Hg(vh),Zg=Hg(uh),Kg=Hg(mv),Jg=Hg(bp),Qg=Hg(Wg),ty="fallback",ny=function(t){var n=t.data[0].x,i=Al(n),e=t.data;return i&&(e=t.data.map((function(t){return(0,o.Cl)((0,o.Cl)({},t),{x:sg(t.x)})}))),{data:e,layout:t.layout}},iy={donut:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,f,d,v,h,p,g,y,m,b,x=t.data[0],w=Up(null!==(u=null===(o=t.layout)||void 0===o?void 0:o.piecolorway)&&void 0!==u?u:null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null!==(f=null===(c=t.layout)||void 0===c?void 0:c.piecolorway)&&void 0!==f?f:null===(d=null==x?void 0:x.marker)||void 0===d?void 0:d.colors,i,r),C={};null===(v=x.labels)||void 0===v||v.forEach((function(t,n){var e=Dg(x.values,n);if(!(Dl(e)||e<0)){var o="".concat(t),u=Zp(w,n,o,i,r);C[o]?C[o].data+=e:C[o]={legend:o,data:e,color:u}}}));var M=null!==(p=null===(h=t.layout)||void 0===h?void 0:h.width)&&void 0!==p?p:440,k=null!==(y=null===(g=t.layout)||void 0===g?void 0:g.height)&&void 0!==y?y:220,A=!!x.textinfo&&!["value","percent","label+percent"].includes(x.textinfo),S=A?0:80,L=40+(A?0:40),V=x.hole?x.hole*(Math.min(M-S,k-L)/2):1;return{data:{chartTitle:ig(t.layout).chartTitle,chartData:Object.values(C)},hideLegend:n||!1===(null===(m=t.layout)||void 0===m?void 0:m.showlegend),width:null===(b=t.layout)||void 0===b?void 0:b.width,height:k,innerRadius:V,hideLabels:A,showLabelsInPercent:!x.textinfo||["percent","label+percent"].includes(x.textinfo),roundCorners:!0}},renderer:Rg},sankey:{transformer:function(t,n,i,e,r){var u,a,l,s,c,f,d,v,h,p,g,y=t.data[0],m=y.link,b=y.node,x=(null!==(u=null==m?void 0:m.value)&&void 0!==u?u:[]).map((function(t,n){var i,e;return Dl(t)||Dl(null===(i=null==m?void 0:m.source)||void 0===i?void 0:i[n])||Dl(null===(e=null==m?void 0:m.target)||void 0===e?void 0:e[n])?null:{value:t,source:null==m?void 0:m.source[n],target:null==m?void 0:m.target[n]}})).filter((function(t){return null!==t&&t.source>=0&&t.target>=0&&t.source!==t.target})),w=Up(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null==b?void 0:b.color,i,r),C={nodes:null===(c=b.label)||void 0===c?void 0:c.map((function(t,n){return{nodeId:n,name:t,color:Zp(w,n,t,i,r)}})),links:x.map((function(t,n){return(0,o.Cl)({},t)}))},M={root:(0,o.Cl)({},(null===(d=null===(f=t.layout)||void 0===f?void 0:f.font)||void 0===d?void 0:d.size)?{fontSize:null===(v=t.layout.font)||void 0===v?void 0:v.size}:{})};return{data:{chartTitle:ig(t.layout).chartTitle,SankeyChartData:C},width:null===(h=t.layout)||void 0===h?void 0:h.width,height:null!==(g=null===(p=t.layout)||void 0===p?void 0:p.height)&&void 0!==g?g:468,styles:M,enableReflow:!1}},renderer:Gg},table:{transformer:function(t,n,i,e,r){var u,a,l,s,c,f,d,v,h,p,g,y,m,b,x,w,C,M,k=t.data[0],A=null!==(a=null===(u=k.cells)||void 0===u?void 0:u.values)&&void 0!==a?a:[],S=k.cells&&Object.keys(k.cells).length>0?k.cells:null===(d=null===(f=null===(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.template)||void 0===s?void 0:s.data)||void 0===c?void 0:c.table)||void 0===f?void 0:f[0])||void 0===d?void 0:d.cells,L=A[0].map((function(t,n){return A.map((function(t,i){var e,r,u,a,l,s,c,f,d=t[n],v="string"==typeof d?yg(d):d,h="string"==typeof v||"number"==typeof v?function(t,n,i){if(null===t||"boolean"==typeof t)return t;var e=Array.isArray(i.format)?i.format[n]:i.format,r=Array.isArray(i.prefix)?i.prefix[n]:i.prefix,o=Array.isArray(i.suffix)?i.suffix[n]:i.suffix,u=t;if("number"==typeof t)if("string"==typeof e)try{u=Bu(e)(t)}catch(n){u=Ns(t)}else u=Ns(t);return"".concat(null!=r?r:"").concat(u).concat(null!=o?o:"")}(v,i,S):v,p=null===(e=null==S?void 0:S.font)||void 0===e?void 0:e.color;if(Array.isArray(p)){var g=null!==(r=p[i])&&void 0!==r?r:p[0];f="string"==typeof(w=Array.isArray(g)?g[n]:g)?w:void 0}else"string"==typeof p&&(f=p);var y,m=null===(u=null==S?void 0:S.font)||void 0===u?void 0:u.size;if(Array.isArray(m)){g=null!==(a=m[i])&&void 0!==a?a:m[0];var b=Array.isArray(g)?g[n]:g;y="number"==typeof b?b:void 0}else"number"==typeof m&&(y=m);var x,w,C=i>=1?1:0,M=null===(l=null==S?void 0:S.fill)||void 0===l?void 0:l.color;Array.isArray(M)?(g=null!==(s=M[C])&&void 0!==s?s:M[0],x="string"==typeof(w=Array.isArray(g)?g[n]:g)?w:void 0):"string"==typeof M&&(x=M);var k=Array.isArray(null==S?void 0:S.align)?null!==(c=S.align[i])&&void 0!==c?c:S.align[0]:null==S?void 0:S.align;return{value:h,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},f?{color:f}:{}),"number"==typeof y?{fontSize:y}:{}),x?{backgroundColor:x}:{}),k?{textAlign:k}:{})}}))})),V={root:(0,o.Cl)({},(null===(h=null===(v=t.layout)||void 0===v?void 0:v.font)||void 0===h?void 0:h.size)?{fontSize:t.layout.font.size}:{})};return{headers:(C=null!==(g=null===(p=k.header)||void 0===p?void 0:p.values)&&void 0!==g?g:[],M=k.header&&Object.keys(k.header).length>0?k.header:null===(b=null===(m=null===(y=t.layout)||void 0===y?void 0:y.template)||void 0===m?void 0:m.data)||void 0===b?void 0:b.table[0].header,(Array.isArray(C[0])?C.map((function(t){return t.map((function(t){return yg(t)})).filter(Boolean).join(" ")})):C.map((function(t){return yg(t)}))).map((function(t,n){var i,e,r,u,a,l,s,c,f,d=null===(i=null==M?void 0:M.font)||void 0===i?void 0:i.color;if(Array.isArray(d)){var v=null!==(e=d[n])&&void 0!==e?e:d[0];Array.isArray(v)?f="string"==typeof v[0]?v[0]:void 0:"string"==typeof v&&(f=v)}else"string"==typeof d&&(f=d);var h,p=null===(r=null==M?void 0:M.font)||void 0===r?void 0:r.size;if(Array.isArray(p)){var g=null!==(u=p[n])&&void 0!==u?u:p[0];h=Array.isArray(p[0])?null!==(a=p[0][n])&&void 0!==a?a:p[0][0]:"number"==typeof g?g:void 0}else"number"==typeof p&&(h=p);var y=n>=1?1:0,m=null===(l=null==M?void 0:M.fill)||void 0===l?void 0:l.color,b=Array.isArray(m)?null!==(s=m[y])&&void 0!==s?s:m[0]:m,x=null==M?void 0:M.align,w=Array.isArray(x)?null!==(c=x[n])&&void 0!==c?c:x[0]:x;return{value:t,style:(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({},"string"==typeof f?{color:f}:{}),"number"==typeof h?{fontSize:h}:{}),"string"==typeof b?{backgroundColor:b}:{}),w?{textAlign:w}:{})}}))),rows:L,width:null===(x=t.layout)||void 0===x?void 0:x.width,height:null===(w=t.layout)||void 0===w?void 0:w.height,styles:V}},renderer:Jg},horizontalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c,f,d,v,h,p,g,y,m,b,x,w,C=Vg(t.data,t.layout,n),M=C.legends,k=C.hideLegend,A=void 0,S=t.data.map((function(n,o){var u,a,l,s;A=Jp(t.layout,n,A);var c=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),f=M[o];return n.y.map((function(t,e){var o,u,a,l,s,d;if(Dl(null===(o=n.x)||void 0===o?void 0:o[e])||Dl(t))return null;var v=A?A(Ol(null===(u=n.marker)||void 0===u?void 0:u.color)?null===(l=null===(a=n.marker)||void 0===a?void 0:a.color)||void 0===l?void 0:l[e%(null===(s=n.marker)||void 0===s?void 0:s.color).length]:0):Zp(c,e,f,i,r),h=Kp(n,e);return{x:n.x[e],y:t,legend:f,color:null!==(d=Vo(v).copy({opacity:h}).formatHex8())&&void 0!==d?d:v}})).filter((function(t){return null!==t}))})).flat(),L=null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:450,V=L-(null!==(c=null===(s=null===(l=t.layout)||void 0===l?void 0:l.margin)||void 0===s?void 0:s.l)&&void 0!==c?c:0)-(null!==(v=null===(d=null===(f=t.layout)||void 0===f?void 0:f.margin)||void 0===d?void 0:d.pad)&&void 0!==v?v:0),D=new Set(S.map((function(t){return t.y}))).size||1,N=V/(D*(1+1/(1+.01*D)));return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:S,secondaryYAxistitle:"string"==typeof(null===(p=null===(h=t.layout)||void 0===h?void 0:h.yaxis2)||void 0===p?void 0:p.title)?null===(y=null===(g=t.layout)||void 0===g?void 0:g.yaxis2)||void 0===y?void 0:y.title:(null===(x=null===(b=null===(m=t.layout)||void 0===m?void 0:m.yaxis2)||void 0===b?void 0:b.title)||void 0===x?void 0:x.text)||"",barHeight:N,showYAxisLables:!0,height:L,width:null===(w=t.layout)||void 0===w?void 0:w.width,hideTickOverlap:!0,hideLegend:k,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0},ig(t.layout)),Eg(t.data,t.layout)),Bg(t.data,t.layout,!0))},renderer:jg},groupedverticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=(0,o.Cl)({},t);if(t.data.some((function(t){return"bar"===t.type&&Vl(t.y)}))){var f=t.data.map((function(t,n){return"bar"===t.type&&Vl(t.y)?function(t,n){if(!t||0===t.length)return{traces:[],x:[]};var i=n&&n.length===t.length?n:t.map((function(t,n){return"Item ".concat(n+1)})),e=t.map((function(t,n){var e;if("object"==typeof t&&null!==t){var r=hg(t),o={};return Object.keys(r).forEach((function(t){var n=r[t];!function(t){var n=t.toLowerCase();return!(!n.includes("style")&&"style"!==n&&!new RegExp("^(color|fill|stroke|border|background|font|shadow|outline|margin|padding|gap|align|justify|display|flex|grid|text|line|letter|word|vertical|horizontal|overflow|position|top|right|bottom|left|zindex|z-index|opacity|filter|clip|cursor|resize|transition|animation|transform|box|column|row|direction|visibility|content|width|height|aspect|image|user|pointer|caret|scroll|%)|(-webkit-|-moz-|-ms-|-o-)","i").test(n))}(t)&&("number"==typeof n||"string"==typeof n&&xl(n))&&(o[t]=n)})),o}return"number"==typeof t||"string"==typeof t&&xl(t)?((e={})[i[n]||"item_".concat(n)]=t,e):{}})),r=new Set;e.forEach((function(t){Object.keys(t).forEach((function(t){return r.add(t)}))}));var o=[];return r.forEach((function(t){var n=[],r=!1,u=!1;if(e.forEach((function(i,e){var o=i[t];"number"==typeof o?(n.push(o),r=!0,u=!0):"string"==typeof o&&xl(o)&&(n.push(parseFloat(o)),r=!0,u=!0)})),r&&u){var a={type:"bar",name:t,x:i,y:n};o.push(a)}})),{traces:o,x:i}}(t.y,Array.isArray(t.x)?t.x:void 0).traces.map((function(n){return(0,o.Cl)((0,o.Cl)({},n),{marker:t.marker})})):[t]})).flat();c=(0,o.Cl)((0,o.Cl)({},t),{data:f})}var d={},v=fg(c.data,c.layout,0,0),h=Vg(c.data,c.layout,n),p=h.legends,g=h.hideLegend,y=void 0,m=rg(c.data[0],c.layout);c.data.forEach((function(t,n){var o,u,a,l,s;y=Jp(c.layout,t,y);var f=Up(null===(a=null===(u=null===(o=c.layout)||void 0===o?void 0:o.template)||void 0===u?void 0:u.layout)||void 0===a?void 0:a.colorway,e,null===(l=t.marker)||void 0===l?void 0:l.color,i,r);null===(s=t.x)||void 0===s||s.forEach((function(e,o){var u,a,l,s,v,h;if(!Dl(e)&&!Dl(null===(u=t.y)||void 0===u?void 0:u[o])&&(d[e]||(d[e]={name:e.toString(),series:[]}),"bar"===t.type)){var g=p[n],b=y?y(Ol(null===(a=t.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=t.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[o%(null===(v=t.marker)||void 0===v?void 0:v.color).length]:0):Zp(f,o,g,i,r),x=Kp(t,o),w=t.y[o];d[e].series.push({key:g,data:w,xAxisCalloutData:e,color:null!==(h=Vo(b).copy({opacity:x}).formatHex8())&&void 0!==h?h:b,legend:g,useSecondaryYScale:cg(t,c.layout),yAxisCalloutData:lg(w,m)})}}))}));var b=Object.values(d);return(0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)((0,o.Cl)({data:b,width:null===(u=c.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=c.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,barwidth:"auto",mode:"plotly"},v),{hideTickOverlap:!0,hideLegend:g,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=b[0])||void 0===s?void 0:s.name)}),ig(c.layout)),Eg(c.data,c.layout)),og(c.data[0],c.layout)),eg(c.data[0],c.layout)),m),Bg(c.data,c.layout))},renderer:Ug},verticalstackedbar:{transformer:pg,renderer:$g},heatmap:{transformer:function(t,n,i,e,r){var u,a,l,s,c,f,d,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I=t.data[0],W=[],R=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;if("histogram2d"===I.type){var z=[],j=[],Y=[];null===(u=I.x)||void 0===u||u.forEach((function(t,n){var i,e=Dg(I.z,n);Dl(t)||Dl(null===(i=I.y)||void 0===i?void 0:i[n])||Dl(e)||(z.push(t),j.push(I.y[n]),Y.push(e))}));var X=Ll(z),G=Ll(j),q=Cg(z,null===(a=I.xbins)||void 0===a?void 0:a.start,null===(l=I.xbins)||void 0===l?void 0:l.end,null===(s=I.xbins)||void 0===s?void 0:s.size),U=Cg(j,null===(c=I.ybins)||void 0===c?void 0:c.start,null===(f=I.ybins)||void 0===f?void 0:f.end,null===(d=I.ybins)||void 0===d?void 0:d.size),Z=U.map((function(){return q.map((function(){return[]}))})),K=0;z.forEach((function(t,n){var i=bg(q,t,X),e=bg(U,j[n],G);-1!==i&&-1!==e&&Z[e][i].push(Y[n])}));var J=Z.map((function(t){return t.map((function(t){var n=Mg(I.histfunc,t);return K+=n,n}))}));q.forEach((function(t,n){U.forEach((function(i,e){var r=kg(I.histnorm,J[e][n],K,X?t.length:xg(t),G?i.length:xg(i));W.push({x:X?t.join(", "):wg(t),y:G?i.join(", "):wg(i),value:r,rectText:r}),"number"==typeof r&&(R=Math.min(R,r),$=Math.max($,r))}))}))}else null===(v=I.x)||void 0===v||v.forEach((function(n,i){var e;null===(e=I.y)||void 0===e||e.forEach((function(e,r){var o,u,a,l,s,c,f=null===(u=null===(o=I.z)||void 0===o?void 0:o[r])||void 0===u?void 0:u[i];W.push({x:"date"===(null===(l=null===(a=t.layout)||void 0===a?void 0:a.xaxis)||void 0===l?void 0:l.type)||null!=n?n:0,y:(null===(c=null===(s=t.layout)||void 0===s?void 0:s.yaxis)||void 0===c||c.type,e),value:f,rectText:f}),"number"==typeof f&&(R=Math.min(R,f),$=Math.max($,f))}))}));var Q={legend:null!==(h=I.name)&&void 0!==h?h:"",data:W,value:0},tt=[R,($+R)/2,$],nt=[Ql(Xl.color1),Ql(Xl.color2),Ql(Xl.color3)],it=null!==(N=null!==(k=null!==(x=null!==(y=null!==(p=null==I?void 0:I.colorscale)&&void 0!==p?p:null===(g=t.layout)||void 0===g?void 0:g.colorscale)&&void 0!==y?y:null===(b=null===(m=t.layout)||void 0===m?void 0:m.coloraxis)||void 0===b?void 0:b.colorscale)&&void 0!==x?x:null===(M=null===(C=null===(w=t.layout)||void 0===w?void 0:w.template)||void 0===C?void 0:C.layout)||void 0===M?void 0:M.colorscale)&&void 0!==k?k:"histogram2d"===I.type&&(null===(D=null===(V=null===(L=null===(S=null===(A=t.layout)||void 0===A?void 0:A.template)||void 0===S?void 0:S.data)||void 0===L?void 0:L.histogram2d)||void 0===V?void 0:V[0])||void 0===D?void 0:D.colorscale))&&void 0!==N?N:null===(B=null===(F=null===(E=null===(T=null===(O=t.layout)||void 0===O?void 0:O.template)||void 0===T?void 0:T.data)||void 0===E?void 0:E.heatmap)||void 0===F?void 0:F[0])||void 0===B?void 0:B.colorscale;if(it&&"object"==typeof it&&("diverging"in it||"sequential"in it||"sequentialminus"in it)){var et=R>=0,rt=$<=0;R<0&&$>0?it=null==it?void 0:it.diverging:et?it=null==it?void 0:it.sequential:rt&&(it=null==it?void 0:it.sequentialminus)}var ot=Array.isArray(it)?it.map((function(t){return t[0]*($-R)+R})):tt,ut=Array.isArray(it)?it.map((function(t){return t[1]})):nt;return(0,o.Cl)((0,o.Cl)({data:[Q],domainValuesForColorScale:ot,rangeValuesForColorScale:ut,hideLegend:!0,showYAxisLables:!0,sortOrder:"none",width:null===(P=t.layout)||void 0===P?void 0:P.width,height:null!==(H=null===(_=t.layout)||void 0===_?void 0:_.height)&&void 0!==H?H:350,hideTickOverlap:!0,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,wrapXAxisLables:!0},ig(t.layout)),Eg([I],t.layout))},renderer:Xg},gauge:{transformer:function(t,n,i,e,r){var o,u,a,l,s,c,f,d,v,h,p,g,y,m,b,x,w,C,M,k,A,S,L,V,D,N,O,T,E,F,B,P,_,H,I,W,R,$,z,j,Y,X,G,q,U,Z,K,J,Q,tt,nt,it,et=t.data[0],rt=(null===(o=et.gauge)||void 0===o?void 0:o.steps)?et.gauge.steps.map((function(t){return t.color})):void 0,ot=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,rt,i,r),ut=(null===(c=null===(s=et.gauge)||void 0===s?void 0:s.steps)||void 0===c?void 0:c.length)?et.gauge.steps.map((function(t,n){var e,o,u=t.name||"Segment ".concat(n+1),a=Zp(ot,n,u,i,r);return{legend:u,size:(null===(e=t.range)||void 0===e?void 0:e[1])-(null===(o=t.range)||void 0===o?void 0:o[0]),color:a}})):[{legend:"Current",size:null!==(f=et.value)&&void 0!==f?f:0-(null!==(p=null===(h=null===(v=null===(d=et.gauge)||void 0===d?void 0:d.axis)||void 0===v?void 0:v.range)||void 0===h?void 0:h[0])&&void 0!==p?p:0),color:dg(null===(m=null===(y=null===(g=t.layout)||void 0===g?void 0:g.template)||void 0===y?void 0:y.layout)||void 0===m?void 0:m.colorway,e,null===(x=null===(b=et.gauge)||void 0===b?void 0:b.axis)||void 0===x?void 0:x.color,i,r)},{legend:"Target",size:(null!==(k=null===(M=null===(C=null===(w=et.gauge)||void 0===w?void 0:w.axis)||void 0===C?void 0:C.range)||void 0===M?void 0:M[1])&&void 0!==k?k:100)-(null!==(A=et.value)&&void 0!==A?A:0),color:Xl.disabled}];if(null===(S=et.delta)||void 0===S?void 0:S.reference){var at=et.value-et.delta.reference;if(at>=0){nt="▲ ".concat(at);var lt=Up(null===(D=null===(V=null===(L=t.layout)||void 0===L?void 0:L.template)||void 0===V?void 0:V.layout)||void 0===D?void 0:D.colorway,e,null===(O=null===(N=et.delta)||void 0===N?void 0:N.increasing)||void 0===O?void 0:O.color,i,r);it=Zp(lt,0,"",i,r)}else{nt="▼ ".concat(Math.abs(at));var st=Up(null===(F=null===(E=null===(T=t.layout)||void 0===T?void 0:T.template)||void 0===E?void 0:E.layout)||void 0===F?void 0:F.colorway,e,null===(P=null===(B=et.delta)||void 0===B?void 0:B.decreasing)||void 0===P?void 0:P.color,i,r);it=Zp(st,0,"",i,r)}}var ct={sublabel:{fill:it}},ft=ig(t.layout).chartTitle;return{segments:ut,chartValue:null!==(_=et.value)&&void 0!==_?_:0,chartTitle:ft,sublabel:nt,minValue:"number"==typeof(null===(W=null===(I=null===(H=et.gauge)||void 0===H?void 0:H.axis)||void 0===I?void 0:I.range)||void 0===W?void 0:W[0])?null===(z=null===($=null===(R=et.gauge)||void 0===R?void 0:R.axis)||void 0===$?void 0:$.range)||void 0===z?void 0:z[0]:void 0,maxValue:"number"==typeof(null===(X=null===(Y=null===(j=et.gauge)||void 0===j?void 0:j.axis)||void 0===Y?void 0:Y.range)||void 0===X?void 0:X[1])?null===(U=null===(q=null===(G=et.gauge)||void 0===G?void 0:G.axis)||void 0===q?void 0:q.range)||void 0===U?void 0:U[1]:void 0,chartValueFormat:function(){var t,n;return null!==(n=null===(t=et.value)||void 0===t?void 0:t.toString())&&void 0!==n?n:""},width:null===(Z=t.layout)||void 0===Z?void 0:Z.width,height:null!==(J=null===(K=t.layout)||void 0===K?void 0:K.height)&&void 0!==J?J:220,styles:ct,variant:(null===(tt=null===(Q=et.gauge)||void 0===Q?void 0:Q.steps)||void 0===tt?void 0:tt.length)?Lp.MultipleSegments:Lp.SingleSegment,roundCorners:!0}},renderer:qg},verticalbar:{transformer:function(t,n,i,e,r){var u,a,l,s,c=[],f=Vg(t.data,t.layout,n),d=f.legends,v=f.hideLegend,h=void 0;return t.data.forEach((function(n,u){var a,l,s,f,v,p,g;if(n.x){h=Jp(t.layout,n,h);var y=Up(null===(s=null===(l=null===(a=t.layout)||void 0===a?void 0:a.template)||void 0===l?void 0:l.layout)||void 0===s?void 0:s.colorway,e,null===(f=n.marker)||void 0===f?void 0:f.color,i,r),m=[],b=[];n.x.forEach((function(t,i){var e=Dg(n.y,i);Dl(t)||Dl(e)||(m.push(t),b.push(e))}));var x=Ll(m),w=Cg(m,null===(v=n.xbins)||void 0===v?void 0:v.start,null===(p=n.xbins)||void 0===p?void 0:p.end,null===(g=n.xbins)||void 0===g?void 0:g.size),C=w.map((function(){return[]})),M=0;m.forEach((function(t,n){var i=bg(w,t,x);-1!==i&&C[i].push(b[n])}));var k=C.map((function(t){var i=Mg(n.histfunc,t);return M+=i,i}));w.forEach((function(t,e){var a,l,s,f,v,p=d[u],g=h?h(Ol(null===(a=n.marker)||void 0===a?void 0:a.color)?null===(s=null===(l=n.marker)||void 0===l?void 0:l.color)||void 0===s?void 0:s[e%(null===(f=n.marker)||void 0===f?void 0:f.color).length]:0):Zp(y,e,p,i,r),m=Kp(n,e),b=kg(n.histnorm,k[e],M,x?t.length:xg(t));c.push((0,o.Cl)({x:x?t.join(", "):wg(t),y:b,legend:p,color:null!==(v=Vo(g).copy({opacity:m}).formatHex8())&&void 0!==v?v:g},x?{}:{xAxisCalloutData:"[".concat(t.x0," - ").concat(t.x1,")")}))}))}})),(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:c,width:null===(u=t.layout)||void 0===u?void 0:u.width,height:null!==(l=null===(a=t.layout)||void 0===a?void 0:a.height)&&void 0!==l?l:350,supportNegativeData:!0,mode:"histogram",hideTickOverlap:!0,maxBarWidth:50,hideLegend:v,roundCorners:!0,wrapXAxisLables:"string"==typeof(null===(s=c[0])||void 0===s?void 0:s.x)},ig(t.layout)),Eg(t.data,t.layout)),og(t.data[0],t.layout))},renderer:Zg},area:{transformer:function(t,n,i,e,r){return gg(t,n,"area",i,e,r)},renderer:Yg,preTransformOperation:ny},line:{transformer:function(t,n,i,e,r){return gg(t,n,"line",i,e,r)},renderer:zg,preTransformOperation:ny},scatter:{transformer:function(t,n,i,e,r){return gg(t,n,"scatter",i,e,r)},renderer:Kg,preTransformOperation:ny},funnel:{transformer:function(t,n,i,e,r){var o,u,a,l,s=[],c=t.data.length>1&&t.data.every((function(t){var n,i,e,r,o=null!==(i=null!==(n=t.values)&&void 0!==n?n:t.x)&&void 0!==i?i:t.value,u=null!==(r=null!==(e=t.labels)&&void 0!==e?e:t.y)&&void 0!==r?r:t.stage;return Array.isArray(u)&&Array.isArray(o)&&o.length>1&&u.length>1}));if(c){var f={};t.data.forEach((function(n,o){var u,a,l,c,d,v,h,p,g,y,m=n.name||"Category ".concat(o+1),b=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(d=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==d?d:null===(v=n.marker)||void 0===v?void 0:v.color,i,r),x=Zp(b,0,m,i,r);f[m]=x;var w=null!==(p=null!==(h=n.labels)&&void 0!==h?h:n.y)&&void 0!==p?p:n.stage,C=null!==(y=null!==(g=n.values)&&void 0!==g?g:n.x)&&void 0!==y?y:n.value;Ol(w)&&Ol(C)&&w&&Ol(w)&&w.length>0&&w.forEach((function(t,n){var i=s.findIndex((function(n){return n.stage===t})),e=Number(C[n]);isNaN(e)||(-1===i?s.push({stage:t,subValues:[{category:m,value:e,color:x}]}):s[i].subValues.push({category:m,value:e,color:x}))}))}))}else t.data.forEach((function(n,o){var u,a,l,c,f,d,v=function(t){var n,i,e,r,o=t.orientation||"h",u=null!==(i=null!==(n=t.labels)&&void 0!==n?n:t.y)&&void 0!==i?i:t.stage,a=null!==(r=null!==(e=t.values)&&void 0!==e?e:t.x)&&void 0!==r?r:t.value,l=Ll(a),s=Ll(u),c=kl(a),f=kl(u),d=function(t){return Array.isArray(t)?t:"string"==typeof t||"number"==typeof t?[t]:[]};return"h"===o?s&&c?{categories:d(u),values:d(a)}:l&&f?{categories:d(a),values:d(u)}:{categories:d(s?u:a),values:d(s?a:u)}:l&&f?{categories:d(a),values:d(u)}:s&&c?{categories:d(u),values:d(a)}:{categories:d(l?a:u),values:d(l?u:a)}}(n),h=v.categories,p=v.values;if(Ol(h)&&Ol(p)){var g=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null!==(f=null===(c=n.marker)||void 0===c?void 0:c.colors)&&void 0!==f?f:null===(d=n.marker)||void 0===d?void 0:d.color,i,r);h.forEach((function(t,n){var e=Zp(g,n,t,i,r),o=Number(p[n]);isNaN(o)||s.push({stage:t,value:o,color:e})}))}}));return{data:s,width:null===(o=t.layout)||void 0===o?void 0:o.width,height:null===(u=t.layout)||void 0===u?void 0:u.height,orientation:"v"===(null===(a=t.data[0])||void 0===a?void 0:a.orientation)?"horizontal":"vertical",hideLegend:n||!1===(null===(l=t.layout)||void 0===l?void 0:l.showlegend)}},renderer:Vp},gantt:{transformer:function(t,n,i,e,r){var u,a,l,s=Vg(t.data,t.layout,n),c=s.legends,f=s.hideLegend,d=void 0,v=t.data.map((function(n,o){var u,a,l,s,f,v;d=Jp(t.layout,n,d);var h=Up(null===(l=null===(a=null===(u=t.layout)||void 0===u?void 0:u.template)||void 0===a?void 0:a.layout)||void 0===l?void 0:l.colorway,e,null===(s=n.marker)||void 0===s?void 0:s.color,i,r),p=c[o],g="date"===(null===(v=null===(f=t.layout)||void 0===f?void 0:f.xaxis)||void 0===v?void 0:v.type)||Ml(n.x),y=function(t){return Dl(t)?0:g?+function(t){if("string"==typeof t){var n=t.match(Fg);n&&(n[3]?n[6]&&(t=t.replace("Z","")):t+="T00:00")}return new Date(t)}(t):+t};return n.y.map((function(t,e){var o,u,a,l,s,c,f;if(Dl(t))return null;var v=d?d(Ol(null===(o=n.marker)||void 0===o?void 0:o.color)?null===(a=null===(u=n.marker)||void 0===u?void 0:u.color)||void 0===a?void 0:a[e%(null===(l=n.marker)||void 0===l?void 0:l.color).length]:0):Zp(h,e,p,i,r),m=Kp(n,e),b=y(null===(s=n.base)||void 0===s?void 0:s[e]),x=y(null===(c=n.x)||void 0===c?void 0:c[e]);return{x:{start:g?new Date(b):b,end:g?new Date(b+x):b+x},y:t,legend:p,color:null!==(f=Vo(v).copy({opacity:m}).formatHex8())&&void 0!==f?f:v}})).filter((function(t){return null!==t}))})).flat();return(0,o.Cl)((0,o.Cl)((0,o.Cl)({data:v,showYAxisLables:!0,height:null!==(a=null===(u=t.layout)||void 0===u?void 0:u.height)&&void 0!==a?a:350,width:null===(l=t.layout)||void 0===l?void 0:l.width,hideTickOverlap:!0,hideLegend:f,noOfCharsToTruncate:20,showYAxisLablesTooltip:!0,roundCorners:!0,useUTC:!1},ig(t.layout)),Eg(t.data,t.layout)),Bg(t.data,t.layout,!0))},renderer:Qg},fallback:{transformer:pg,renderer:$g}},ey=u.forwardRef((function(t,n){var i,e=Nl(t.chartSchema).plotlySchema,r=(t=>{try{Nl(t)}catch(t){return{isValid:!1,errorMessage:`Invalid JSON: ${t}`}}try{let n=(t=>{try{const n=t;if(!n)throw new Error("Plotly input is null or undefined");if("object"!=typeof n)throw new Error("Plotly input is not an object. Input type: "+typeof n);if(!Ol(n.data))throw new Error("Plotly input data is not a valid array or typed array");if(0===n.data.length)throw new Error("Plotly input data is empty");return n}catch(t){throw new Error(`Invalid plotly schema: ${t}`)}})(t);try{n=ml(n)}catch(t){return{isValid:!1,errorMessage:`Failed to decode plotly schema: ${t}`}}let i=((t,n)=>{const i=[],e=t.map(((t,e)=>{const r=t.type;if(r&&Pl[r]){const o=Pl[r];for(const r of o)try{r(t,n)}catch(n){return i.push(`data[${e}] - type: ${t.type}, ${n}`),[-1,""]}}return[e,null!=r?r:""]})).filter((t=>t[0]>=0));if(0===e.length)throw new Error(i.join("; "));return e})(n.data,n.layout).map((t=>{var i,e;const r=t[0],o=n.data[r];switch(o.type){case"pie":return{isValid:!0,traceIndex:r,type:"donut"};case"histogram2d":case"heatmap":return{isValid:!0,traceIndex:r,type:"heatmap"};case"sankey":return{isValid:!0,traceIndex:r,type:"sankey"};case"indicator":case"gauge":return{isValid:!0,traceIndex:r,type:"gauge"};case"histogram":return{isValid:!0,traceIndex:r,type:"verticalbar"};case"scatterpolar":return{isValid:!0,traceIndex:r,type:"scatterpolar"};case"table":return{isValid:!0,traceIndex:r,type:"table"};case"bar":const t=o;return"h"===t.orientation?_l(t)?{isValid:!0,traceIndex:r,type:"gantt"}:{isValid:!0,traceIndex:r,type:"horizontalbar"}:Vl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:["group","overlay"].includes(null===(i=null==n?void 0:n.layout)||void 0===i?void 0:i.barmode)?kl(t.y)?{isValid:!0,traceIndex:r,type:"groupedverticalbar"}:{isValid:!1,errorMessage:"GVBC does not support string y-axis."}:{isValid:!0,traceIndex:r,type:"verticalstackedbar"};case"funnel":case"funnelarea":return{isValid:!0,traceIndex:r,type:"funnel"};case"scatter":case"scattergl":const u=o,a=Wl(u);return El(null!==(e=u.mode)&&void 0!==e?e:"")?{isValid:!0,traceIndex:r,type:"scatter"}:Rl(u)?{isValid:!0,traceIndex:r,type:"fallback"}:{isValid:!0,traceIndex:r,type:a?"area":"line"};default:return{isValid:!1,errorMessage:`${bl} ${o.type}`}}}));if(i.every((t=>!t.isValid)))return{isValid:!1,errorMessage:i.filter((t=>!t.isValid)).map((t=>t.errorMessage)).filter(((t,n,i)=>t&&i.indexOf(t)===n)).join("; ")};i=i.filter((t=>t.isValid));const e=i.map((t=>({index:t.traceIndex,type:t.type}))),r=i.some((t=>"groupedverticalbar"===t.type||"verticalstackedbar"===t.type)),o=i.some((t=>"line"===t.type||"fallback"===t.type));if(r&&o)return{isValid:!0,type:"fallback",validTracesInfo:e};const u=new Set(i.map((t=>t.type)));return u.size>1?{isValid:!0,type:"composite",validTracesInfo:e}:{isValid:!0,type:Array.from(u)[0],validTracesInfo:e}}catch(t){return{isValid:!1,errorMessage:`Invalid plotly schema: ${t}`}}})(e);if(!r.isValid)throw new Error("Invalid chart schema: ".concat(r.errorMessage));var a=e;try{a=ml(a)}catch(t){throw new Error("Failed to decode plotly schema: ".concat(t))}var l=(0,o.Cl)((0,o.Cl)({},a),{data:r.validTracesInfo.map((function(t){return a.data[t.index]}))}),s=r.validTracesInfo.map((function(t,n){return{index:n,type:t.type}})),c=e.selectedLegends,f=u.useRef(new Map),d=function(){var t=u.useContext(Pp),n=(0,Bp.m)(["theme"]).theme;return t||n||(0,pn.a)({})}(),v=null!==(i=null==d?void 0:d.isInverted)&&void 0!==i&&i,h=u.useRef(null),p=u.useRef(!1);Ol(c)||(c=[]);var g=u.useState(c),y=g[0],m=g[1],b=function(n){m(n),t.onSchemaChange&&t.onSchemaChange({plotlySchema:{plotlyInput:a,selectedLegends:n}})};u.useEffect((function(){var n=Nl(t.chartSchema).plotlySchema.selectedLegends;m(null!=n?n:[])}),[t.chartSchema]);var x={legendProps:{canSelectMultipleLegends:!0,onChange:b,selectedLegends:y},componentRef:h,calloutProps:{layerProps:{eventBubblingEnabled:!0}}},w=u.useCallback((function(t){return new Promise((function(n,i){return p.current?i(Error("Exporting multi plot charts as image is not supported")):h.current&&"function"==typeof h.current.toImage?void h.current.toImage((0,o.Cl)({background:d.semanticColors.bodyBackground,scale:5},t)).then(n).catch(i):i(Error("Chart cannot be exported as image"))}))}),[d]);if(u.useImperativeHandle(t.componentRef,(function(){return{exportAsImage:w}}),[w]),"scatterpolar"===r.type){var C=function(t){for(var n,i,e,r,u,a,l,s,c,f=(0,o.Cl)({},t),d=0,v=0,h=0;h<t.data.length;h++){var p=t.data[h].r;if(p&&Ol(p))for(var g=0;g<p.length;g++)Dl(p[g])||(d=Math.min(d,p[g]),v=Math.max(v,p[g]))}var y=d<0?-d:0,m=new Set;for(h=0;h<t.data.length;h++)(A=t.data[h]).theta&&Ol(A.theta)&&A.theta.forEach((function(t){return m.add(String(t))}));var b=[],x=[],w=null,C=function(s){var c=t.data[s];Ol(c.theta)&&(c.__axisLabel=Array.from(m)),c.x=[],c.y=[];var d=c.theta,v=c.r;if(!Ol(v)||!Ol(d))return f.data[s]=c,"continue";var h="clockwise"===(null===(e=null===(i=null===(n=t.layout)||void 0===n?void 0:n.polar)||void 0===i?void 0:i.angularaxis)||void 0===e?void 0:e.direction)?-1:1,p=(null!==(l=null===(a=null===(u=null===(r=t.layout)||void 0===r?void 0:r.polar)||void 0===u?void 0:u.angularaxis)||void 0===a?void 0:a.rotation)&&void 0!==l?l:0)*Math.PI/180,g=[],C=!1;kl(d)||(g=Array.from(new Set(d)),C=!0);for(var M=0;M<v.length;M++)if(!Dl(null==d?void 0:d[M])&&!Dl(null==v?void 0:v[M])){var k;k=C?p+h*g.indexOf(d[M])*(2*Math.PI/g.length):p+h*(d[M]*Math.PI/180);var A=v[M]+y,S=A*Math.cos(k),L=A*Math.sin(k);0===s&&0===M&&(w=y),c.x.push(S),c.y.push(L),b.push(S),x.push(L)}c.x&&c.y&&(c.data=c.x.map((function(t,n){return(0,o.Cl)({x:t,y:c.y[n]},c.text?{text:c.text[n]}:{})}))),f.data[s]=c};for(h=0;h<t.data.length;h++)C(h);if(null!==w){for(h=0;h<f.data.length;h++)(A=f.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t-w})));for(var M=0;M<b.length;M++)b[M]=b[M]-w}var k=Math.max.apply(Math,(0,o.fX)((0,o.fX)([],b.map(Math.abs),!1),x.map(Math.abs),!1));for(k=0===k?1:k,h=0;h<f.data.length;h++){var A;(A=f.data[h]).x&&A.y&&(A.x=A.x.map((function(t){return t/(2*k)})),A.y=A.y.map((function(t){return t/(2*k)})))}var S=(null===(s=t.layout)||void 0===s?void 0:s.width)||(null===(c=t.layout)||void 0===c?void 0:c.height)||500;return f.layout=(0,o.Cl)((0,o.Cl)({},f.layout),{width:S,height:S}),f.layout.__polarOriginX=null!=w?w:void 0,f}(l);l.data=C.data,l.layout=C.layout,s.forEach((function(t,n){var i,e;if("scatterpolar"===t.type){var r=null!==(e=null===(i=l.data[n])||void 0===i?void 0:i.mode)&&void 0!==e?e:"";r.includes("line")?s[n].type="line":r.includes("markers")||"text"===r?s[n].type="scatter":s[n].type="line"}}))}var M={},k=0;l.data.forEach((function(t,n){var i,e="";Tg(r.validTracesInfo[n].type)?(e="".concat(Qp).concat(k+1),k++):e=null!==(i=t.xaxis)&&void 0!==i?i:"x",M[e]||(M[e]=[]),M[e].push(n)})),p.current=Object.keys(M).length>1;var A=function(t,n,i){var e,r,o=[],u=[],a={},l="1fr",s="1fr",c={};if(!n)return{templateRows:l,templateColumns:s,layout:c};var f=null==t?void 0:t.layout;if(null!=f&&Object.keys(f).length>0&&Object.keys(null!=f?f:{}).forEach((function(t){var n,i,e,r,a;if(t.startsWith("xaxis")){var c=Og(t,"xaxis"),d=null!==(i=null===(n=f[t])||void 0===n?void 0:n.anchor)&&void 0!==i?i:"y";if(c!==(p=Og(d,"y")))throw new Error("Invalid layout: xaxis ".concat(c+1," anchor should be y").concat(p+1));var v=f[t],h={start:(null==v?void 0:v.domain)?v.domain[0]:0,end:(null==v?void 0:v.domain)?v.domain[1]:1};o.push(h)}else if(t.startsWith("yaxis")){var p;if(c=Og(t,"yaxis"),d=null!==(r=null===(e=f[t])||void 0===e?void 0:e.anchor)&&void 0!==r?r:"x",c!==(p=Og(d,"x"))){if(1===c&&0===p||"right"===(null===(a=f.yaxis2)||void 0===a?void 0:a.side))return{templateRows:l,templateColumns:s};throw new Error("Invalid layout: yaxis ".concat(c+1," anchor should be x").concat(p+1))}var g=f[t],y={start:(null==g?void 0:g.domain)?g.domain[0]:0,end:(null==g?void 0:g.domain)?g.domain[1]:1};u.push(y)}})),r=o.length,i.forEach((function(n,i){var e,r,a,l,s;if(Tg(n.type)){var c=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e[i],f={start:(null===(r=c.domain)||void 0===r?void 0:r.x)?c.domain.x[0]:0,end:(null===(a=c.domain)||void 0===a?void 0:a.x)?c.domain.x[1]:1},d={start:(null===(l=c.domain)||void 0===l?void 0:l.y)?c.domain.y[0]:0,end:(null===(s=c.domain)||void 0===s?void 0:s.y)?c.domain.y[1]:1};o.push(f),u.push(d)}})),null!=f&&Object.keys(f).length>0&&(null===(e=f.annotations)||void 0===e||e.forEach((function(t){var n=o.flatMap((function(n,i){return(null==t?void 0:t.x)>=n.start&&(null==t?void 0:t.x)<=n.end?[i]:[]})),i=u.findIndex((function(i,e){return n.includes(e)&&(null==t?void 0:t.y)>=i.start&&(null==t?void 0:t.y)<=i.end}));-1!==i&&(void 0===a[i]&&(a[i]={}),90===(null==t?void 0:t.textangle)?a[i].yAnnotation=t.text:a[i].xAnnotation=t.text)}))),o.length>0){var d=new Map;o.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);d.has(n)||d.set(n,t)}));var v=Array.from(d.values()).map((function(t){return t.start})).sort();s="repeat(".concat(v.length,", 1fr)"),o.forEach((function(t,n){var i=n>=r?"".concat(Qp).concat(n-r+1):"x".concat(0===n?"":n+1),e=v.findIndex((function(n){return n===t.start}))+1,o=a[n],u={row:-1,column:e,xAnnotation:null==o?void 0:o.xAnnotation,xDomain:t,yDomain:{start:0,end:1}};c[i]=u}))}if(u.length>0){var h=new Map;u.forEach((function(t){var n="".concat(t.start,"-").concat(t.end);h.has(n)||h.set(n,t)}));var p=Array.from(h.values()).map((function(t){return t.start})).sort(),g=p.length;l="repeat(".concat(g,", 1fr)"),u.forEach((function(t,n){var i=n>=r?"".concat(Qp).concat(n-r+1):"x".concat(0===n?"":n+1),e=p.findIndex((function(n){return n===t.start})),o=g-e,u=a[n],l=null==u?void 0:u.yAnnotation,s=c[i];void 0!==s&&(s.row=o,s.yAnnotation=l,s.yDomain=t)}))}return{templateRows:l,templateColumns:s,layout:c}}(l,p.current,r.validTracesInfo);p.current&&A.templateRows===tg&&A.templateColumns===tg&&(Object.keys(M).forEach((function(t,n){n>0&&delete M[t]})),p.current=!1);var S,L=function(t,n,i,e,r){var o=[];return t.data.reduce((function(t,n){return t||!0===n.showlegend||void 0===n.showlegend}),!1)&&t.data.forEach((function(u,a){var l,s,c,f,d,v,h,p,g,y,m,b,x,w;if("donut"===e[a].type){var C=u,M=Up(null!==(s=null===(l=t.layout)||void 0===l?void 0:l.piecolorway)&&void 0!==s?s:null===(d=null===(f=null===(c=t.layout)||void 0===c?void 0:c.template)||void 0===f?void 0:f.layout)||void 0===d?void 0:d.colorway,i,null!==(h=null===(v=t.layout)||void 0===v?void 0:v.piecolorway)&&void 0!==h?h:null===(p=null==C?void 0:C.marker)||void 0===p?void 0:p.colors,n,r);null===(g=C.labels)||void 0===g||g.forEach((function(t,i){var e="".concat(t),u=Zp(M,i,e,n,r);""!==e&&!1===o.some((function(t){return t.title===e}))&&o.push({title:e,color:u})}))}else if(!1===Tg(e[a].type)){var k=u,A=k.legendgroup,S=(null===(y=k.line)||void 0===y?void 0:y.color)||(null===(m=k.marker)||void 0===m?void 0:m.color),L=Lg(k),V=Up(null===(w=null===(x=null===(b=t.layout)||void 0===b?void 0:b.template)||void 0===x?void 0:x.layout)||void 0===w?void 0:w.colorway,i,S,n,r);void 0!==A&&""!==A&&!1===o.some((function(t){return t.title===A}))&&o.push({title:A,color:V,shape:L})}})),{legends:o,centerLegends:!0,enabledWrapLines:!0,canSelectMultipleLegends:!0}}(l,f,t.colorwayType,r.validTracesInfo,v);return u.createElement(u.Fragment,null,u.createElement("div",{style:{display:"grid",gridTemplateRows:A.templateRows,gridTemplateColumns:A.templateColumns}},Object.entries(M).map((function(n){var i,e,a,c=n[0],d=n[1],h=(0,o.Cl)((0,o.Cl)({},l),{data:d.map((function(t){return l.data[t]}))}),g=s.filter((function(t){return d.includes(t.index)})),y=s.some((function(t){return t.type===ty}))||r.type===ty?ty:g[0].type;s.some((function(t){return"line"===t.type}))&&s.some((function(t){return"scatter"===t.type}))&&(y="line");var m=iy[y];if(m){var b=m.transformer,w=m.renderer,C=m.preTransformCondition,M=m.preTransformOperation;if(void 0===C||C(h)){var k=M?M(h):h,S=A.layout[c];return function(t,n,i,e,r,a){var l=n.apply(void 0,i);return u.createElement("div",{key:"".concat(r,"_").concat(a),style:{gridRowStart:r,gridRowEnd:r+1,gridColumnStart:a,gridColumnEnd:a+1}},u.createElement(t,(0,o.Cl)({},l,e)))}(w,b,[k,p.current,f,t.colorwayType,v],(0,o.Cl)((0,o.Cl)({},x),{xAxisAnnotation:null==S?void 0:S.xAnnotation,yAxisAnnotation:null==S?void 0:S.yAnnotation}),null!==(i=null==S?void 0:S.row)&&void 0!==i?i:1,null!==(e=null==S?void 0:S.column)&&void 0!==e?e:1)}return u.createElement(u.Fragment,null)}throw new Error("Unsupported chart type :".concat(null===(a=h.data[0])||void 0===a?void 0:a.type))}))),p.current&&(S=L,u.createElement(jf,(0,o.Cl)({},S,{selectedLegends:y,onChange:b}))))}));ey.displayName="DeclarativeChart",ey.defaultProps={colorwayType:"default"},(0,i(887).v)("@fluentui/react-charting","0.0.0"),FluentUIReactCharting=e}();