@openmrs/esm-generic-patient-widgets-app 5.1.1-pre.3021 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -2
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-generic-patient-widgets-app.js +1 -1
- package/dist/openmrs-esm-generic-patient-widgets-app.js.buildmanifest.json +6 -6
- package/dist/openmrs-esm-generic-patient-widgets-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e,t,n={8988:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.AlluvialChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2313:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.StackedAreaChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2409:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.AreaChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},9252:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.GroupedBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5481:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.SimpleBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8886:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.StackedBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5899:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this,r=t.options,i=t.data;return r||console.error("Missing options!"),i||console.error("Missing data!"),n.data=t.data||[],n.options=t.options||{},Object.assign(n,n.chart),n}return i(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.data!==e.data||this.props.options!==e.options},t.prototype.componentDidUpdate=function(){this.chart.model.setData(this.props.data),this.chart.model.setOptions(this.props.options)},t}(a(n(7900)).default.Component);t.default=o},9076:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BoxplotChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2490:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BubbleChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4587:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BulletChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},3439:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.CirclePackChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},176:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.ComboChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7125:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.DonutChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},1965:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.GaugeChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7768:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.HeatmapChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5777:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.HistogramChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},419:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeatmapChart=t.AlluvialChart=t.WordCloudChart=t.CirclePackChart=t.TreemapChart=t.TreeChart=t.ComboChart=t.RadarChart=t.MeterChart=t.ScatterChart=t.PieChart=t.LollipopChart=t.LineChart=t.HistogramChart=t.GaugeChart=t.DonutChart=t.BulletChart=t.BubbleChart=t.BoxplotChart=t.StackedBarChart=t.SimpleBarChart=t.GroupedBarChart=t.StackedAreaChart=t.AreaChart=void 0;var i=r(n(2409));t.AreaChart=i.default;var a=r(n(2313));t.StackedAreaChart=a.default;var o=r(n(9252));t.GroupedBarChart=o.default;var s=r(n(5481));t.SimpleBarChart=s.default;var l=r(n(8886));t.StackedBarChart=l.default;var c=r(n(9076));t.BoxplotChart=c.default;var u=r(n(2490));t.BubbleChart=u.default;var d=r(n(4587));t.BulletChart=d.default;var h=r(n(7125));t.DonutChart=h.default;var f=r(n(1965));t.GaugeChart=f.default;var p=r(n(5777));t.HistogramChart=p.default;var m=r(n(5998));t.LineChart=m.default;var g=r(n(4397));t.LollipopChart=g.default;var v=r(n(5108));t.PieChart=v.default;var y=r(n(4617));t.ScatterChart=y.default;var b=r(n(3064));t.MeterChart=b.default;var _=r(n(8507));t.RadarChart=_.default;var w=r(n(176));t.ComboChart=w.default;var E=r(n(7930));t.TreeChart=E.default;var x=r(n(1087));t.TreemapChart=x.default;var S=r(n(3439));t.CirclePackChart=S.default;var O=r(n(257));t.WordCloudChart=O.default;var C=r(n(8988));t.AlluvialChart=C.default;var T=r(n(7768));t.HeatmapChart=T.default},5998:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.LineChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4397:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.LollipopChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},3064:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.MeterChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5108:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.PieChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8507:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.RadarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4617:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.ScatterChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7930:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.TreeChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},1087:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.TreemapChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},6978:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChartBeenInitialized=void 0,t.hasChartBeenInitialized=function(e){return!!e.querySelector("div.bx--cc--chart-wrapper")}},257:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.WordCloudChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8132:function(e,t,n){e=n.nmd(e),function(t){"use strict";function r(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function i(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a(e){let t,n,a;function s(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}return 2!==e.length?(t=r,n=(t,n)=>r(e(t),n),a=(t,n)=>e(t)-n):(t=e===r||e===i?e:o,n=e,a=e),{left:s,center:function(e,t,n=0,r=e.length){const i=s(e,t,n,r-1);return i>n&&a(e[i-1],t)>-a(e[i],t)?i-1:i},right:function(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}}}function o(){return 0}const s=a(r).right;a((function(e){return null===e?NaN:+e})).center;const l=s;function c(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class u{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],a=e+i,o=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);o&&(t[n++]=o),e=a}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,a=0;if(i>0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}class d extends Map{constructor(e,t=f){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(h(this,e))}has(e){return super.has(h(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function h({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function f(e){return null!==e&&"object"==typeof e?e.valueOf():e}function p(e){return e}function m(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}var g=Array.prototype.slice;function v(e){return()=>e}const y=Math.sqrt(50),b=Math.sqrt(10),_=Math.sqrt(2);function w(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=y?10:a>=b?5:a>=_?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?w(e,t,2*n):[s,l,c]}function E(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,a,o]=r?w(t,e,n):w(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let e=0;e<s;++e)l[e]=(a-e)/-o;else for(let e=0;e<s;++e)l[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)l[e]=(i+e)/-o;else for(let e=0;e<s;++e)l[e]=(i+e)*o;return l}function x(e,t,n){return w(e=+e,t=+t,n=+n)[2]}function S(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?x(t,e,n):x(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function O(e){return Math.max(1,Math.ceil(Math.log(function(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}(e))/Math.LN2)+1)}function C(){var e=p,t=c,n=O;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o,s=r.length,u=new Array(s);for(i=0;i<s;++i)u[i]=e(r[i],i,r);var d=t(u),h=d[0],f=d[1],p=n(u,h,f);if(!Array.isArray(p)){const e=f,n=+p;if(t===c&&([h,f]=function(e,t,n){let r;for(;;){const i=x(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}(h,f,n)),(p=E(h,f,n))[0]<=h&&(o=x(h,f,n)),p[p.length-1]>=f)if(e>=f&&t===c){const e=x(h,f,n);isFinite(e)&&(e>0?f=(Math.floor(f/e)+1)*e:e<0&&(f=(Math.ceil(f*-e)+1)/-e))}else p.pop()}for(var m=p.length,g=0,v=m;p[g]<=h;)++g;for(;p[v-1]>f;)--v;(g||v<m)&&(p=p.slice(g,v),m=v-g);var y,b=new Array(m+1);for(i=0;i<=m;++i)(y=b[i]=[]).x0=i>0?p[i-1]:h,y.x1=i<m?p[i]:f;if(isFinite(o)){if(o>0)for(i=0;i<s;++i)null!=(a=u[i])&&h<=a&&a<=f&&b[Math.min(m,Math.floor((a-h)/o))].push(r[i]);else if(o<0)for(i=0;i<s;++i)if(null!=(a=u[i])&&h<=a&&a<=f){const e=Math.floor((h-a)*o);b[Math.min(m,e+(p[e]<=a))].push(r[i])}}else for(i=0;i<s;++i)null!=(a=u[i])&&h<=a&&a<=f&&b[l(p,a,0,m)].push(r[i]);return b}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:v(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:v([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:v(Array.isArray(e)?g.call(e):e),r):n},r}function T(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function A(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function M(e,t,n=0,i=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(a=void 0===a?m:function(e=r){if(e===r)return m;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);i>n;){if(i-n>600){const r=i-n+1,o=t-n+1,s=Math.log(r),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(r-l)/r)*(o-r/2<0?-1:1);M(e,t,Math.max(n,Math.floor(t-o*l/r+c)),Math.min(i,Math.floor(t+(r-o)*l/r+c)),a)}const r=e[t];let o=n,s=i;for(k(e,n,t),a(e[i],r)>0&&k(e,n,i);o<s;){for(k(e,o,s),++o,--s;a(e[o],r)<0;)++o;for(;a(e[s],r)>0;)--s}0===a(e[n],r)?k(e,n,s):(++s,k(e,s,i)),s<=t&&(n=s+1),t<=s&&(i=s-1)}return e}function k(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function L(e,t,n){if((r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length)&&!isNaN(t=+t)){if(t<=0||r<2)return A(e);if(t>=1)return T(e);var r,i=(r-1)*t,a=Math.floor(i),o=T(M(e,a).subarray(0,a+1));return o+(A(e.subarray(a+1))-o)*(i-a)}}function D(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function R(e){return e}var N=1,I=2,P=3,$=4,B=1e-6;function z(e){return"translate("+e+",0)"}function U(e){return"translate(0,"+e+")"}function j(e){return t=>+e(t)}function F(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function V(){return!this.__axis}function H(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===N||e===$?-1:1,u=e===$||e===I?"x":"y",d=e===N||e===P?z:U;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):R),m=Math.max(a,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?F:j)(t.copy(),l),_=h.selection?h.selection():h,w=_.selectAll(".domain").data([null]),E=_.selectAll(".tick").data(f,t).order(),x=E.exit(),S=E.enter().append("g").attr("class","tick"),O=E.select("line"),C=E.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(S),O=O.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(S.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===N?"0em":e===P?"0.71em":"0.32em")),h!==_&&(w=w.transition(h),E=E.transition(h),O=O.transition(h),C=C.transition(h),x=x.transition(h).attr("opacity",B).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),S.attr("opacity",B).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),w.attr("d",e===$||e===I?o?"M"+c*o+","+v+"H"+l+"V"+y+"H"+c*o:"M"+l+","+v+"V"+y:o?"M"+v+","+c*o+"V"+l+"H"+y+"V"+c*o:"M"+v+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),O.attr(u+"2",c*a),C.attr(u,c*m).text(p),_.filter(V).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===I?"start":e===$?"end":"middle"),_.each((function(){this.__axis=b}))}return h.scale=function(e){return arguments.length?(t=e,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),h):n.slice()},h.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),h):r&&r.slice()},h.tickFormat=function(e){return arguments.length?(i=e,h):i},h.tickSize=function(e){return arguments.length?(a=o=+e,h):a},h.tickSizeInner=function(e){return arguments.length?(a=+e,h):a},h.tickSizeOuter=function(e){return arguments.length?(o=+e,h):o},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function G(e){return H(N,e)}function W(e){return H(I,e)}function q(e){return H(P,e)}function Z(e){return H($,e)}var Y={value:()=>{}};function K(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new X(r)}function X(e){this._=e}function Q(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function J(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Y,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}X.prototype=K.prototype={constructor:X,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=J(r[n],e.name,t);else if(null==t)for(n in r)r[n]=J(r[n],e.name,null);return this}for(;++a<o;)if((n=(e=i[a]).type)&&(n=Q(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new X(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var ee="http://www.w3.org/1999/xhtml";const te={svg:"http://www.w3.org/2000/svg",xhtml:ee,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),te.hasOwnProperty(t)?{space:te[t],local:e}:e}function re(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ee&&t.documentElement.namespaceURI===ee?t.createElement(e):t.createElementNS(n,e)}}function ie(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ae(e){var t=ne(e);return(t.local?ie:re)(t)}function oe(){}function se(e){return null==e?oe:function(){return this.querySelector(e)}}function le(){return[]}function ce(e){return null==e?le:function(){return this.querySelectorAll(e)}}function ue(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function de(e){return function(){return this.matches(e)}}function he(e){return function(t){return t.matches(e)}}var fe=Array.prototype.find;function pe(){return this.firstElementChild}var me=Array.prototype.filter;function ge(){return Array.from(this.children)}function ve(e){return new Array(e.length)}function ye(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function be(e,t,n,r,i,a){for(var o,s=0,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new ye(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function _e(e,t,n,r,i,a,o){var s,l,c,u=new Map,d=t.length,h=a.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=o.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=o.call(e,a[s],s,a)+"",(l=u.get(c))?(r[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new ye(e,a[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function we(e){return e.__data__}function Ee(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Se(e){return function(){this.removeAttribute(e)}}function Oe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ce(e,t){return function(){this.setAttribute(e,t)}}function Te(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ae(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Me(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function ke(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Le(e){return function(){this.style.removeProperty(e)}}function De(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Re(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ne(e,t){return e.style.getPropertyValue(t)||ke(e).getComputedStyle(e,null).getPropertyValue(t)}function Ie(e){return function(){delete this[e]}}function Pe(e,t){return function(){this[e]=t}}function $e(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Be(e){return e.trim().split(/^|\s+/)}function ze(e){return e.classList||new Ue(e)}function Ue(e){this._node=e,this._names=Be(e.getAttribute("class")||"")}function je(e,t){for(var n=ze(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fe(e,t){for(var n=ze(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ve(e){return function(){je(this,e)}}function He(e){return function(){Fe(this,e)}}function Ge(e,t){return function(){(t.apply(this,arguments)?je:Fe)(this,e)}}function We(){this.textContent=""}function qe(e){return function(){this.textContent=e}}function Ze(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ye(){this.innerHTML=""}function Ke(e){return function(){this.innerHTML=e}}function Xe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Qe(){this.nextSibling&&this.parentNode.appendChild(this)}function Je(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(){return null}function tt(){var e=this.parentNode;e&&e.removeChild(this)}function nt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function it(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function at(e,t,n){return function(){var r,i=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(r):this.__on=[r]}}function ot(e,t,n){var r=ke(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function st(e,t){return function(){return ot(this,e,t)}}function lt(e,t){return function(){return ot(this,e,t.apply(this,arguments))}}ye.prototype={constructor:ye,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Ue.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ct=[null];function ut(e,t){this._groups=e,this._parents=t}function dt(){return new ut([[document.documentElement]],ct)}function ht(e){return"string"==typeof e?new ut([[document.querySelector(e)]],[document.documentElement]):new ut([[e]],ct)}function ft(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}ut.prototype=dt.prototype={constructor:ut,select:function(e){"function"!=typeof e&&(e=se(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=e.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new ut(r,this._parents)},selectAll:function(e){e="function"==typeof e?ue(e):ce(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o,s=t[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(e.call(o,o.__data__,c,s)),i.push(o));return new ut(r,i)},selectChild:function(e){return this.select(null==e?pe:function(e){return function(){return fe.call(this.children,e)}}("function"==typeof e?e:he(e)))},selectChildren:function(e){return this.selectAll(null==e?ge:function(e){return function(){return me.call(this.children,e)}}("function"==typeof e?e:he(e)))},filter:function(e){"function"!=typeof e&&(e=de(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&e.call(a,a.__data__,c,o)&&l.push(a);return new ut(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,we);var n=t?_e:be,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var a=i.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=i[c],h=d.length,f=Ee(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=o[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,_=0;b<p;++b)if(v=m[b]){for(b>=_&&(_=b+1);!(y=g[_])&&++_<p;);v._next=y||null}}return(o=new ut(o,r))._enter=s,o._exit=l,o},enter:function(){return new ut(this._enter||this._groups.map(ve),this._parents)},exit:function(){return new ut(this._exit||this._groups.map(ve),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),l=0;l<o;++l)for(var c,u=n[l],d=r[l],h=u.length,f=s[l]=new Array(h),p=0;p<h;++p)(c=u[p]||d[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new ut(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=xe);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,c=i[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(t)}return new ut(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,a=t[n],o=0,s=a.length;o<s;++o)(i=a[o])&&e.call(i,i.__data__,o,a);return this},attr:function(e,t){var n=ne(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Oe:Se:"function"==typeof t?n.local?Me:Ae:n.local?Te:Ce)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Le:"function"==typeof t?Re:De)(e,t,n??"")):Ne(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ie:"function"==typeof t?$e:Pe)(e,t)):this.node()[e]},classed:function(e,t){var n=Be(e+"");if(arguments.length<2){for(var r=ze(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Ge:t?Ve:He)(n,t))},text:function(e){return arguments.length?this.each(null==e?We:("function"==typeof e?Ze:qe)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ye:("function"==typeof e?Xe:Ke)(e)):this.node().innerHTML},raise:function(){return this.each(Qe)},lower:function(){return this.each(Je)},append:function(e){var t="function"==typeof e?e:ae(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:ae(e),r=null==t?et:"function"==typeof t?t:se(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(tt)},clone:function(e){return this.select(e?rt:nt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,a=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),o=a.length;if(!(arguments.length<2)){for(s=t?at:it,r=0;r<o;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?lt:st)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const pt={capture:!0,passive:!1};function mt(e){e.preventDefault(),e.stopImmediatePropagation()}function gt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yt(){}var bt=.7,_t=1/bt,wt="\\s*([+-]?\\d+)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",St=/^#([0-9a-f]{3,8})$/,Ot=new RegExp(`^rgb\\(${wt},${wt},${wt}\\)$`),Ct=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Tt=new RegExp(`^rgba\\(${wt},${wt},${wt},${Et}\\)$`),At=new RegExp(`^rgba\\(${xt},${xt},${xt},${Et}\\)$`),Mt=new RegExp(`^hsl\\(${Et},${xt},${xt}\\)$`),kt=new RegExp(`^hsla\\(${Et},${xt},${xt},${Et}\\)$`),Lt={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 Dt(){return this.rgb().formatHex()}function Rt(){return this.rgb().formatRgb()}function Nt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=St.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?It(t):3===n?new Bt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Pt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Pt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ot.exec(e))?new Bt(t[1],t[2],t[3],1):(t=Ct.exec(e))?new Bt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tt.exec(e))?Pt(t[1],t[2],t[3],t[4]):(t=At.exec(e))?Pt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Mt.exec(e))?Ht(t[1],t[2]/100,t[3]/100,1):(t=kt.exec(e))?Ht(t[1],t[2]/100,t[3]/100,t[4]):Lt.hasOwnProperty(e)?It(Lt[e]):"transparent"===e?new Bt(NaN,NaN,NaN,0):null}function It(e){return new Bt(e>>16&255,e>>8&255,255&e,1)}function Pt(e,t,n,r){return r<=0&&(e=t=n=NaN),new Bt(e,t,n,r)}function $t(e,t,n,r){return 1===arguments.length?function(e){return e instanceof yt||(e=Nt(e)),e?new Bt((e=e.rgb()).r,e.g,e.b,e.opacity):new Bt}(e):new Bt(e,t,n,r??1)}function Bt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function zt(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}`}function Ut(){const e=jt(this.opacity);return`${1===e?"rgb(":"rgba("}${Ft(this.r)}, ${Ft(this.g)}, ${Ft(this.b)}${1===e?")":`, ${e})`}`}function jt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ft(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vt(e){return((e=Ft(e))<16?"0":"")+e.toString(16)}function Ht(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qt(e,t,n,r)}function Gt(e){if(e instanceof qt)return new qt(e.h,e.s,e.l,e.opacity);if(e instanceof yt||(e=Nt(e)),!e)return new qt;if(e instanceof qt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new qt(o,s,l,e.opacity)}function Wt(e,t,n,r){return 1===arguments.length?Gt(e):new qt(e,t,n,r??1)}function qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Zt(e){return(e=(e||0)%360)<0?e+360:e}function Yt(e){return Math.max(0,Math.min(1,e||0))}function Kt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}gt(yt,Nt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dt,formatHex:Dt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Gt(this).formatHsl()},formatRgb:Rt,toString:Rt}),gt(Bt,$t,vt(yt,{brighter(e){return e=null==e?_t:Math.pow(_t,e),new Bt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?bt:Math.pow(bt,e),new Bt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bt(Ft(this.r),Ft(this.g),Ft(this.b),jt(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:zt,formatHex:zt,formatHex8:function(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}${Vt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ut,toString:Ut})),gt(qt,Wt,vt(yt,{brighter(e){return e=null==e?_t:Math.pow(_t,e),new qt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?bt:Math.pow(bt,e),new qt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Bt(Kt(e>=240?e-240:e+120,i,r),Kt(e,i,r),Kt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new qt(Zt(this.h),Yt(this.s),Yt(this.l),jt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=jt(this.opacity);return`${1===e?"hsl(":"hsla("}${Zt(this.h)}, ${100*Yt(this.s)}%, ${100*Yt(this.l)}%${1===e?")":`, ${e})`}`}}));const Xt=e=>()=>e;function Qt(e){return 1==(e=+e)?Jt:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Xt(isNaN(t)?n:t)}}function Jt(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Xt(isNaN(e)?t:e)}const en=function e(t){var n=Qt(t);function r(e,t){var r=n((e=$t(e)).r,(t=$t(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Jt(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function tn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function nn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=un(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}function rn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function an(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function on(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=un(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var sn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ln=new RegExp(sn.source,"g");function cn(e,t){var n,r,i,a=sn.lastIndex=ln.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(n=sn.exec(e))&&(r=ln.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:an(n,r)})),a=ln.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function un(e,t){var n,r=typeof t;return null==t||"boolean"===r?Xt(t):("number"===r?an:"string"===r?(n=Nt(t))?(t=n,en):cn:t instanceof Nt?en:t instanceof Date?rn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?tn:Array.isArray(t)?nn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?on:an)(e,t)}function dn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hn,fn=180/Math.PI,pn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mn(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*fn,skewX:Math.atan(l)*fn,scaleX:o,scaleY:s}}function gn(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(a,o){var s=[],l=[];return a=e(a),o=e(o),function(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push("translate(",null,t,null,n);s.push({i:l-4,x:an(e,i)},{i:l-2,x:an(r,a)})}else(i||a)&&o.push("translate("+i+t+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:an(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:an(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,l),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:an(e,n)},{i:s-2,x:an(t,r)})}else(1!==n||1!==r)&&a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var vn=gn((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pn:mn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),yn=gn((function(e){return null!=e&&(hn||(hn=document.createElementNS("http://www.w3.org/2000/svg","g")),hn.setAttribute("transform",e),e=hn.transform.baseVal.consolidate())?mn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):pn}),", ",")",")");var bn,_n,wn=0,En=0,xn=0,Sn=1e3,On=0,Cn=0,Tn=0,An="object"==typeof performance&&performance.now?performance:Date,Mn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kn(){return Cn||(Mn(Ln),Cn=An.now()+Tn)}function Ln(){Cn=0}function Dn(){this._call=this._time=this._next=null}function Rn(e,t,n){var r=new Dn;return r.restart(e,t,n),r}function Nn(){Cn=(On=An.now())+Tn,wn=En=0;try{!function(){kn(),++wn;for(var e,t=bn;t;)(e=Cn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--wn}()}finally{wn=0,function(){for(var e,t,n=bn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:bn=t);_n=e,Pn(r)}(),Cn=0}}function In(){var e=An.now(),t=e-On;t>Sn&&(Tn-=t,On=e)}function Pn(e){wn||(En&&(En=clearTimeout(En)),e-Cn>24?(e<1/0&&(En=setTimeout(Nn,e-An.now()-Tn)),xn&&(xn=clearInterval(xn))):(xn||(On=An.now(),xn=setInterval(In,Sn)),wn=1,Mn(Nn)))}function $n(e,t,n){var r=new Dn;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Dn.prototype=Rn.prototype={constructor:Dn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?kn():+n)+(null==t?0:+t),!this._next&&_n!==this&&(_n?_n._next=this:bn=this,_n=this),this._call=e,this._time=n,Pn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pn())}};var Bn=K("start","end","cancel","interrupt"),zn=[],Un=0,jn=1,Fn=2,Vn=3,Hn=4,Gn=5,Wn=6;function qn(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(e){n.state=jn,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var c,u,d,h;if(n.state!==jn)return l();for(c in i)if((h=i[c]).name===n.name){if(h.state===Vn)return $n(o);h.state===Hn?(h.state=Wn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=Wn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if($n((function(){n.state===Vn&&(n.state=Hn,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=Fn,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Fn){for(n.state=Vn,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function s(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=Gn,1),a=-1,o=r.length;++a<o;)r[a].call(e,i);n.state===Gn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=Wn,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Rn(a,0,n.time)}(e,n,{name:t,index:r,group:i,on:Bn,tween:zn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Un})}function Zn(e,t){var n=Kn(e,t);if(n.state>Un)throw new Error("too late; already scheduled");return n}function Yn(e,t){var n=Kn(e,t);if(n.state>Vn)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Xn(e,t){var n,r,i,a=e.__transition,o=!0;if(a){for(i in t=null==t?null:t+"",a)(n=a[i]).name===t?(r=n.state>Fn&&n.state<Gn,n.state=Wn,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete e.__transition}}function Qn(e,t){var n,r;return function(){var i=Yn(this,e),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===t){(r=r.slice()).splice(o,1);break}i.tween=r}}function Jn(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Yn(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}a.tween=i}}function er(e,t,n){var r=e._id;return e.each((function(){var e=Yn(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Kn(e,r).value[t]}}function tr(e,t){var n;return("number"==typeof t?an:t instanceof Nt?en:(n=Nt(t))?(t=n,en):cn)(e,t)}function nr(e){return function(){this.removeAttribute(e)}}function rr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ir(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}}function ar(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}function or(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttribute(e):(o=this.getAttribute(e))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}function sr(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}function lr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function cr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function ur(e,t){return function(){Zn(this,e).delay=+t.apply(this,arguments)}}function dr(e,t){return t=+t,function(){Zn(this,e).delay=t}}function hr(e,t){return function(){Yn(this,e).duration=+t.apply(this,arguments)}}function fr(e,t){return t=+t,function(){Yn(this,e).duration=t}}var pr=dt.prototype.constructor;function mr(e){return function(){this.style.removeProperty(e)}}var gr=0;function vr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yr(){return++gr}var br=dt.prototype;vr.prototype={constructor:vr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=se(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=r[o],u=c.length,d=a[o]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=e.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,qn(d[h],t,n,h,d,Kn(s,n)));return new vr(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=ce(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,f=e.call(l,l.__data__,d,c),p=Kn(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&qn(h,t,n,m,f,p);a.push(f),o.push(l)}return new vr(a,o,t,n)},selectChild:br.selectChild,selectChildren:br.selectChildren,filter:function(e){"function"!=typeof e&&(e=de(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&e.call(a,a.__data__,c,o)&&l.push(a);return new vr(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var l,c=t[s],u=n[s],d=c.length,h=o[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)o[s]=t[s];return new vr(o,this._parents,this._name,this._id)},selection:function(){return new pr(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=yr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=Kn(o,t);qn(o,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new vr(r,this._parents,e,n)},call:br.call,nodes:br.nodes,node:br.node,size:br.size,empty:br.empty,each:br.each,on:function(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Zn:Yn;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}(n,e,t))},attr:function(e,t){var n=ne(e),r="transform"===n?yn:tr;return this.attrTween(e,"function"==typeof t?(n.local?sr:or)(n,r,er(this,"attr."+e,t)):null==t?(n.local?rr:nr)(n):(n.local?ar:ir)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=ne(e);return this.tween(n,(r.local?lr:cr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vn:tr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var a=Ne(this,e),o=(this.style.removeProperty(e),Ne(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}(e,r)).on("end.style."+e,mr(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,a;return function(){var o=Ne(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Ne(this,e)),o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s))}}(e,r,er(this,"style."+e,t))).each(function(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var l=Yn(this,e),c=l.on,u=null==l.value[o]?a||(a=mr(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,a=n+"";return function(){var o=Ne(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(er(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Kn(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===e)return r.value;return null}return this.each((null==t?Qn:Jn)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ur:dr)(t,e)):Kn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?hr:fr)(t,e)):Kn(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Yn(this,e).ease=t}}(t,e)):Kn(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Yn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},l={value:function(){0==--i&&a()}};n.each((function(){var n=Yn(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&a()}))},[Symbol.iterator]:br[Symbol.iterator]};const _r=e=>+e;function wr(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Er={time:null,delay:0,duration:250,ease:wr};function xr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}dt.prototype.interrupt=function(e){return this.each((function(){Xn(this,e)}))},dt.prototype.transition=function(e){var t,n;e instanceof vr?(t=e._id,e=e._name):(t=yr(),(n=Er).time=kn(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)(o=s[c])&&qn(o,e,t,c,s,n||xr(o,t));return new vr(r,this._parents,e,t)};const Sr=e=>()=>e;function Or(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Cr(e){e.preventDefault(),e.stopImmediatePropagation()}var Tr={name:"drag"},Ar={name:"space"},Mr={name:"handle"},kr={name:"center"};const{abs:Lr,max:Dr,min:Rr}=Math;function Nr(e){return[+e[0],+e[1]]}function Ir(e){return[Nr(e[0]),Nr(e[1])]}var Pr={name:"x",handles:["w","e"].map(Vr),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},$r={name:"y",handles:["n","s"].map(Vr),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Br={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zr={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ur={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},jr={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Fr={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Vr(e){return{type:e}}function Hr(e){return!e.ctrlKey&&!e.button}function Gr(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Wr(){return navigator.maxTouchPoints||"ontouchstart"in this}function qr(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Zr(){return function(e){var t,n=Gr,r=Hr,i=Wr,a=!0,o=K("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([Vr("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Br.overlay).merge(n).each((function(){var e=qr(this).extent;ht(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([Vr("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Br.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return Br[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=ht(this),t=qr(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new d(e,t,n):r}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function h(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,o,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,_="selection"===(a&&n.metaKey?b="overlay":b)?Tr:a&&n.altKey?kr:Mr,w=e===$r?null:jr[b],E=e===Pr?null:Fr[b],x=qr(y),S=x.extent,O=x.selection,C=S[0][0],T=S[0][1],A=S[1][0],M=S[1][1],k=0,L=0,D=w&&E&&a&&n.shiftKey,R=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=ft(e,y)).point0=e.slice(),e.identifier=t,e}));Xn(y);var N=u(y,arguments,!0).beforestart();if("overlay"===b){O&&(m=!0);const t=[R[0],R[1]||R[0]];x.selection=O=[[i=e===$r?C:Rr(t[0][0],t[1][0]),s=e===Pr?T:Rr(t[0][1],t[1][1])],[d=e===$r?A:Dr(t[0][0],t[1][0]),f=e===Pr?M:Dr(t[0][1],t[1][1])]],R.length>1&&z(n)}else i=O[0][0],s=O[0][1],d=O[1][0],f=O[1][1];o=i,l=s,h=d,p=f;var I=ht(y).attr("pointer-events","none"),P=I.selectAll(".overlay").attr("cursor",Br[b]);if(n.touches)N.moved=B,N.ended=U;else{var $=ht(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",U,!0);a&&$.on("keydown.brush",j,!0).on("keyup.brush",F,!0),function(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",mt,pt);"onselectstart"in t?n.on("selectstart.drag",mt,pt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),N.start(n,_.name)}function B(e){for(const t of e.changedTouches||[e])for(const e of R)e.identifier===t.identifier&&(e.cur=ft(t,y));if(D&&!g&&!v&&1===R.length){const e=R[0];Lr(e.cur[0]-e[0])>Lr(e.cur[1]-e[1])?v=!0:g=!0}for(const e of R)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,Cr(e),z(e)}function z(e){const t=R[0],n=t.point0;var r;switch(k=t[0]-n[0],L=t[1]-n[1],_){case Ar:case Tr:w&&(k=Dr(C-i,Rr(A-d,k)),o=i+k,h=d+k),E&&(L=Dr(T-s,Rr(M-f,L)),l=s+L,p=f+L);break;case Mr:R[1]?(w&&(o=Dr(C,Rr(A,R[0][0])),h=Dr(C,Rr(A,R[1][0])),w=1),E&&(l=Dr(T,Rr(M,R[0][1])),p=Dr(T,Rr(M,R[1][1])),E=1)):(w<0?(k=Dr(C-i,Rr(A-i,k)),o=i+k,h=d):w>0&&(k=Dr(C-d,Rr(A-d,k)),o=i,h=d+k),E<0?(L=Dr(T-s,Rr(M-s,L)),l=s+L,p=f):E>0&&(L=Dr(T-f,Rr(M-f,L)),l=s,p=f+L));break;case kr:w&&(o=Dr(C,Rr(A,i-k*w)),h=Dr(C,Rr(A,d+k*w))),E&&(l=Dr(T,Rr(M,s-L*E)),p=Dr(T,Rr(M,f+L*E)))}h<o&&(w*=-1,r=i,i=d,d=r,r=o,o=h,h=r,b in zr&&P.attr("cursor",Br[b=zr[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in Ur&&P.attr("cursor",Br[b=Ur[b]])),x.selection&&(O=x.selection),g&&(o=O[0][0],h=O[1][0]),v&&(l=O[0][1],p=O[1][1]),(O[0][0]!==o||O[0][1]!==l||O[1][0]!==h||O[1][1]!==p)&&(x.selection=[[o,l],[h,p]],c.call(y),N.brush(e,_.name))}function U(e){if(function(e){e.stopImmediatePropagation()}(e),e.touches){if(e.touches.length)return;t&&clearTimeout(t),t=setTimeout((function(){t=null}),500)}else(function(e,t){var n=e.document.documentElement,r=ht(e).on("dragstart.drag",null);t&&(r.on("click.drag",mt,pt),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(e.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),P.attr("cursor",Br.overlay),x.selection&&(O=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(O)&&(x.selection=null,c.call(y)),N.end(e,_.name)}function j(e){switch(e.keyCode){case 16:D=w&&E;break;case 18:_===Mr&&(w&&(d=h-k*w,i=o+k*w),E&&(f=p-L*E,s=l+L*E),_=kr,z(e));break;case 32:(_===Mr||_===kr)&&(w<0?d=h-k:w>0&&(i=o-k),E<0?f=p-L:E>0&&(s=l-L),_=Ar,P.attr("cursor",Br.selection),z(e));break;default:return}Cr(e)}function F(e){switch(e.keyCode){case 16:D&&(g=v=D=!1,z(e));break;case 18:_===kr&&(w<0?d=h:w>0&&(i=o),E<0?f=p:E>0&&(s=l),_=Mr,z(e));break;case 32:_===Ar&&(e.altKey?(w&&(d=h-k*w,i=o+k*w),E&&(f=p-L*E,s=l+L*E),_=kr):(w<0?d=h:w>0&&(i=o),E<0?f=p:E>0&&(s=l),_=Mr),P.attr("cursor",Br[b]),z(e));break;default:return}Cr(e)}}function f(e){u(this,arguments).moved(e)}function p(e){u(this,arguments).ended(e)}function m(){var t=this.__brush||{selection:null};return t.extent=Ir(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n,r){t.tween?t.on("start.brush",(function(e){u(this,arguments).beforestart().start(e)})).on("interrupt.brush end.brush",(function(e){u(this,arguments).end(e)})).tween("brush",(function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=un(a,o);function l(e){r.selection=1===e&&null===o?null:s(e),c.call(t),i.brush()}return null!==a&&null!==o?l:l(1)})):t.each((function(){var t=this,i=arguments,a=t.__brush,o=e.input("function"==typeof n?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();Xn(t),a.selection=null===o?null:o,c.call(t),s.start(r).brush(r).end(r)}))},l.clear=function(e,t){l.move(e,null,t)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0==--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var i=ht(this.that).datum();o.call(t,this.that,new Or(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:o}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:Sr(Ir(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:Sr(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:Sr(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(a=!!e,l):a},l.on=function(){var e=o.on.apply(o,arguments);return e===o?l:e},l}(Pr)}const Yr=Math.PI,Kr=2*Yr,Xr=1e-6,Qr=Kr-Xr;function Jr(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let ei=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Jr:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jr;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Xr)if(Math.abs(u*s-l*c)>Xr&&i){let h=n-a,f=r-o,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Yr-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,_=y/g;Math.abs(b-1)>Xr&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+_*s},${this._y1=t+_*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Xr||Math.abs(this._y1-c)>Xr)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Kr+Kr),d>Qr?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Xr&&this._append`A${n},${n},0,${+(d>=Yr)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function ti(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ni(e){return(e=ti(Math.abs(e)))?e[1]:NaN}var ri,ii=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ai(e){if(!(t=ii.exec(e)))throw new Error("invalid format: "+e);var t;return new oi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function oi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function si(e,t){var n=ti(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}ai.prototype=oi.prototype,oi.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};const li={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>si(100*e,t),r:si,s:function(e,t){var n=ti(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(ri=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ti(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ci(e){return e}var ui,di,hi,fi=Array.prototype.map,pi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mi(e){var t=void 0===e.grouping||void 0===e.thousands?ci:function(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}(fi.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?ci:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(fi.call(e.numerals,String)),o=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=ai(e)).fill,u=e.align,d=e.sign,h=e.symbol,f=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):li[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var b="$"===h?n:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===h?r:/[%p]/.test(y)?o:"",w=li[y],E=/[defgprs%]/.test(y);function x(e){var n,r,o,h=b,x=_;if("c"===y)x=w(e)+x,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),h=(S?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?pi[8+ri/3]:"")+x+(S&&"("===d?")":""),E)for(n=-1,r=e.length;++n<r;)if(48>(o=e.charCodeAt(n))||o>57){x=(46===o?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var O=h.length+e.length+x.length,C=O<p?new Array(p-O+1).join(c):"";switch(m&&f&&(e=t(C+e,C.length?p-x.length:1/0),C=""),u){case"<":e=h+e+x+C;break;case"=":e=h+C+e+x;break;case"^":e=C.slice(0,O=C.length>>1)+h+e+x+C.slice(O);break;default:e=C+h+e+x}return a(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return e+""},x}return{format:c,formatPrefix:function(e,t){var n=c(((e=ai(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(ni(t)/3))),i=Math.pow(10,-r),a=pi[8+r/3];return function(e){return n(i*e)+a}}}}!function(e){ui=mi(e),di=ui.format,hi=ui.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});var gi=1e-6,vi=1e-12,yi=Math.PI,bi=yi/2,_i=yi/4,wi=2*yi,Ei=180/yi,xi=yi/180,Si=Math.abs,Oi=Math.atan,Ci=Math.atan2,Ti=Math.cos,Ai=Math.exp,Mi=Math.log,ki=Math.sin,Li=Math.sign||function(e){return e>0?1:e<0?-1:0},Di=Math.sqrt,Ri=Math.tan;function Ni(e){return e>1?bi:e<-1?-bi:Math.asin(e)}function Ii(){}function Pi(e,t){e&&Bi.hasOwnProperty(e.type)&&Bi[e.type](e,t)}var $i={Feature:function(e,t){Pi(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Pi(n[r].geometry,t)}},Bi={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){zi(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)zi(n[r],t,0)},Polygon:function(e,t){Ui(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ui(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Pi(n[r],t)}};function zi(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function Ui(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)zi(e[n],t,1);t.polygonEnd()}function ji(e,t){e&&$i.hasOwnProperty(e.type)?$i[e.type](e,t):Pi(e,t)}function Fi(e){return[Ci(e[1],e[0]),Ni(e[2])]}function Vi(e){var t=e[0],n=e[1],r=Ti(n);return[r*Ti(t),r*ki(t),ki(n)]}function Hi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Gi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wi(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function qi(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Zi(e){var t=Di(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Yi(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Ki(e,t){return Si(e)>yi&&(e-=Math.round(e/wi)*wi),[e,t]}function Xi(e,t,n){return(e%=wi)?t||n?Yi(Ji(e),ea(t,n)):Ji(e):t||n?ea(t,n):Ki}function Qi(e){return function(t,n){return Si(t+=e)>yi&&(t-=Math.round(t/wi)*wi),[t,n]}}function Ji(e){var t=Qi(e);return t.invert=Qi(-e),t}function ea(e,t){var n=Ti(e),r=ki(e),i=Ti(t),a=ki(t);function o(e,t){var o=Ti(t),s=Ti(e)*o,l=ki(e)*o,c=ki(t),u=c*n+s*r;return[Ci(l*i-u*a,s*n-c*r),Ni(u*i+l*a)]}return o.invert=function(e,t){var o=Ti(t),s=Ti(e)*o,l=ki(e)*o,c=ki(t),u=c*i-l*a;return[Ci(l*i+c*a,s*n+u*r),Ni(u*n-s*r)]},o}function ta(e,t){(t=Vi(t))[0]-=e,Zi(t);var n=function(e){return e>1?0:e<-1?yi:Math.acos(e)}(-t[1]);return((-t[2]<0?-n:n)+wi-gi)%wi}function na(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:Ii,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function ra(e,t){return Si(e[0]-t[0])<gi&&Si(e[1]-t[1])<gi}function ia(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function aa(e,t,n,r,i){var a,o,s=[],l=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if(ra(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);return void i.lineEnd()}o[0]+=2*gi}s.push(n=new ia(r,e,null,!0)),l.push(n.o=new ia(r,null,n,!1)),s.push(n=new ia(o,e,null,!1)),l.push(n.o=new ia(o,null,n,!0))}})),s.length){for(l.sort(t),oa(s),oa(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,u,d=s[0];;){for(var h=d,f=!0;h.v;)if((h=h.n)===d)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(a=0,o=c.length;a<o;++a)i.point((u=c[a])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(c=h.p.z,a=c.length-1;a>=0;--a)i.point((u=c[a])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,f=!f}while(!h.v);i.lineEnd()}}}function oa(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function sa(e){return Si(e[0])<=yi?e[0]:Li(e[0])*((Si(e[0])+yi)%wi-yi)}function la(e,t,n,r){return function(i){var a,o,s,l=t(i),c=na(),d=t(c),h=!1,f={point:p,lineStart:g,lineEnd:v,polygonStart:function(){f.point=y,f.lineStart=b,f.lineEnd=_,o=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=v,o=D(o);var e=function(e,t){var n=sa(t),r=t[1],i=ki(r),a=[ki(n),-Ti(n),0],o=0,s=0,l=new u;1===i?r=bi+gi:-1===i&&(r=-bi-gi);for(var c=0,d=e.length;c<d;++c)if(f=(h=e[c]).length)for(var h,f,p=h[f-1],m=sa(p),g=p[1]/2+_i,v=ki(g),y=Ti(g),b=0;b<f;++b,m=w,v=x,y=S,p=_){var _=h[b],w=sa(_),E=_[1]/2+_i,x=ki(E),S=Ti(E),O=w-m,C=O>=0?1:-1,T=C*O,A=T>yi,M=v*x;if(l.add(Ci(M*C*ki(T),y*S+M*Ti(T))),o+=A?O+C*wi:O,A^m>=n^w>=n){var k=Gi(Vi(p),Vi(_));Zi(k);var L=Gi(a,k);Zi(L);var D=(A^O>=0?-1:1)*Ni(L[2]);(r>D||r===D&&(k[0]||k[1]))&&(s+=A^O>=0?1:-1)}}return(o<-gi||o<gi&&l<-vi)^1&s}(a,r);o.length?(h||(i.polygonStart(),h=!0),aa(o,ua,e,n,i)):e&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){l.point(e,t)}function g(){f.point=m,l.lineStart()}function v(){f.point=p,l.lineEnd()}function y(e,t){s.push([e,t]),d.point(e,t)}function b(){d.lineStart(),s=[]}function _(){y(s[0][0],s[0][1]),d.lineEnd();var e,t,n,r,l=d.clean(),u=c.result(),f=u.length;if(s.pop(),a.push(s),s=null,f){if(1&l){if((t=(n=u[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}return}f>1&&2&l&&u.push(u.pop().concat(u.shift())),o.push(u.filter(ca))}}return f}}function ca(e){return e.length>1}function ua(e,t){return((e=e.x)[0]<0?e[1]-bi-gi:bi-e[1])-((t=t.x)[0]<0?t[1]-bi-gi:bi-t[1])}Ki.invert=Ki;const da=la((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?yi:-yi,l=Si(a-n);Si(l-yi)<gi?(e.point(n,r=(r+o)/2>0?bi:-bi),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&l>=yi&&(Si(n-i)<gi&&(n-=i*gi),Si(a-s)<gi&&(a-=s*gi),r=function(e,t,n,r){var i,a,o=ki(e-n);return Si(o)>gi?Oi((ki(t)*(a=Ti(r))*ki(n)-ki(r)*(i=Ti(t))*ki(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*bi,r.point(-yi,i),r.point(0,i),r.point(yi,i),r.point(yi,0),r.point(yi,-i),r.point(0,-i),r.point(-yi,-i),r.point(-yi,0),r.point(-yi,i);else if(Si(e[0]-t[0])>gi){var a=e[0]<t[0]?yi:-yi;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-yi,-bi]);function ha(e){var t=Ti(e),n=6*xi,r=t>0,i=Si(t)>gi;function a(e,n){return Ti(e)*Ti(n)>t}function o(e,n,r){var i=[1,0,0],a=Gi(Vi(e),Vi(n)),o=Hi(a,a),s=a[0],l=o-s*s;if(!l)return!r&&e;var c=t*o/l,u=-t*s/l,d=Gi(i,a),h=qi(i,c);Wi(h,qi(a,u));var f=d,p=Hi(h,f),m=Hi(f,f),g=p*p-m*(Hi(h,h)-1);if(!(g<0)){var v=Di(g),y=qi(f,(-p-v)/m);if(Wi(y,h),y=Fi(y),!r)return y;var b,_=e[0],w=n[0],E=e[1],x=n[1];w<_&&(b=_,_=w,w=b);var S=w-_,O=Si(S-yi)<gi;if(!O&&x<E&&(b=E,E=x,x=b),O||S<gi?O?E+x>0^y[1]<(Si(y[0]-_)<gi?E:x):E<=y[1]&&y[1]<=x:S>yi^(_<=y[0]&&y[0]<=w)){var C=qi(f,(-p+v)/m);return Wi(C,h),[y,Fi(C)]}}}function s(t,n){var i=r?e:yi-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return la(a,(function(e){var t,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(d,h){var f,p=[d,h],m=a(d,h),g=r?m?0:s(d,h):m?s(d+(d<0?yi:-yi),h):0;if(!t&&(c=l=m)&&e.lineStart(),m!==l&&(!(f=o(t,p))||ra(t,f)||ra(p,f))&&(p[2]=1),m!==l)u=0,m?(e.lineStart(),f=o(p,t),e.point(f[0],f[1])):(f=o(t,p),e.point(f[0],f[1],2),e.lineEnd()),t=f;else if(i&&t&&r^m){var v;!(g&n)&&(v=o(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}m&&(!t||!ra(t,p))&&e.point(p[0],p[1]),t=p,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,r,i,a){!function(e,t,n,r,i,a){if(n){var o=Ti(t),s=ki(t),l=r*n;null==i?(i=t+r*wi,a=t-l/2):(i=ta(o,i),a=ta(o,a),(r>0?i<a:i>a)&&(i+=r*wi));for(var c,u=i;r>0?u>a:u<a;u-=l)c=Fi([o,-s*Ti(u),-s*ki(u)]),e.point(c[0],c[1])}}(a,e,n,i,t,r)}),r?[0,-e]:[-yi,e-yi])}var fa=1e9,pa=-fa;function ma(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,c){var u=0,d=0;if(null==i||(u=o(i,s))!==(d=o(a,s))||l(i,a)<0^s>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+s+4)%4)!==d);else c.point(a[0],a[1])}function o(r,i){return Si(r[0]-e)<gi?i>0?0:3:Si(r[0]-n)<gi?i>0?2:1:Si(r[1]-t)<gi?i>0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var l,c,u,d,h,f,p,m,g,v,y,b=o,_=na(),w={point:E,lineStart:function(){w.point=x,c&&c.push(u=[]),v=!0,g=!1,p=m=NaN},lineEnd:function(){l&&(x(d,h),f&&g&&_.rejoin(),l.push(_.result())),w.point=E,g&&b.lineEnd()},polygonStart:function(){b=_,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],l=1,u=s.length,d=s[0],h=d[0],f=d[1];l<u;++l)a=h,o=f,h=(d=s[l])[0],f=d[1],o<=r?f>r&&(h-a)*(r-o)>(f-o)*(e-a)&&++t:f<=r&&(h-a)*(r-o)<(f-o)*(e-a)&&--t;return t}(),n=y&&t,i=(l=D(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&aa(l,s,t,a,o),o.polygonEnd()),b=o,l=c=u=null}};function E(e,t){i(e,t)&&b.point(e,t)}function x(a,o){var s=i(a,o);if(c&&u.push([a,o]),v)d=a,h=o,f=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var l=[p=Math.max(pa,Math.min(fa,p)),m=Math.max(pa,Math.min(fa,m))],_=[a=Math.max(pa,Math.min(fa,a)),o=Math.max(pa,Math.min(fa,o))];!function(e,t,n,r,i,a){var o,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,h=t[1]-l;if(o=n-s,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-s,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}return c>0&&(e[0]=s+c*d,e[1]=l+c*h),u<1&&(t[0]=s+u*d,t[1]=l+u*h),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(a,o),y=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),y=!1)}p=a,m=o,g=s}return w}}const ga=e=>e;var va,ya,ba,_a,wa=new u,Ea=new u,xa={point:Ii,lineStart:Ii,lineEnd:Ii,polygonStart:function(){xa.lineStart=Sa,xa.lineEnd=Ta},polygonEnd:function(){xa.lineStart=xa.lineEnd=xa.point=Ii,wa.add(Si(Ea)),Ea=new u},result:function(){var e=wa/2;return wa=new u,e}};function Sa(){xa.point=Oa}function Oa(e,t){xa.point=Ca,va=ba=e,ya=_a=t}function Ca(e,t){Ea.add(_a*e-ba*t),ba=e,_a=t}function Ta(){Ca(va,ya)}const Aa=xa;var Ma=1/0,ka=Ma,La=-Ma,Da=La;const Ra={point:function(e,t){e<Ma&&(Ma=e),e>La&&(La=e),t<ka&&(ka=t),t>Da&&(Da=t)},lineStart:Ii,lineEnd:Ii,polygonStart:Ii,polygonEnd:Ii,result:function(){var e=[[Ma,ka],[La,Da]];return La=Da=-(ka=Ma=1/0),e}};var Na,Ia,Pa,$a,Ba=0,za=0,Ua=0,ja=0,Fa=0,Va=0,Ha=0,Ga=0,Wa=0,qa={point:Za,lineStart:Ya,lineEnd:Qa,polygonStart:function(){qa.lineStart=Ja,qa.lineEnd=eo},polygonEnd:function(){qa.point=Za,qa.lineStart=Ya,qa.lineEnd=Qa},result:function(){var e=Wa?[Ha/Wa,Ga/Wa]:Va?[ja/Va,Fa/Va]:Ua?[Ba/Ua,za/Ua]:[NaN,NaN];return Ba=za=Ua=ja=Fa=Va=Ha=Ga=Wa=0,e}};function Za(e,t){Ba+=e,za+=t,++Ua}function Ya(){qa.point=Ka}function Ka(e,t){qa.point=Xa,Za(Pa=e,$a=t)}function Xa(e,t){var n=e-Pa,r=t-$a,i=Di(n*n+r*r);ja+=i*(Pa+e)/2,Fa+=i*($a+t)/2,Va+=i,Za(Pa=e,$a=t)}function Qa(){qa.point=Za}function Ja(){qa.point=to}function eo(){no(Na,Ia)}function to(e,t){qa.point=no,Za(Na=Pa=e,Ia=$a=t)}function no(e,t){var n=e-Pa,r=t-$a,i=Di(n*n+r*r);ja+=i*(Pa+e)/2,Fa+=i*($a+t)/2,Va+=i,Ha+=(i=$a*e-Pa*t)*(Pa+e),Ga+=i*($a+t),Wa+=3*i,Za(Pa=e,$a=t)}const ro=qa;function io(e){this._context=e}io.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,wi)}},result:Ii};var ao,oo,so,lo,co,uo=new u,ho={point:Ii,lineStart:function(){ho.point=fo},lineEnd:function(){ao&&po(oo,so),ho.point=Ii},polygonStart:function(){ao=!0},polygonEnd:function(){ao=null},result:function(){var e=+uo;return uo=new u,e}};function fo(e,t){ho.point=po,oo=lo=e,so=co=t}function po(e,t){lo-=e,co-=t,uo.add(Di(lo*lo+co*co)),lo=e,co=t}const mo=ho;let go,vo,yo,bo;class _o{constructor(e){this._append=null==e?wo:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return wo;if(t!==go){const e=10**t;go=t,vo=function(t){let n=1;this._+=t[0];for(const r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return vo}(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==yo||this._append!==vo){const e=this._radius,t=this._;this._="",this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,yo=e,vo=this._append,bo=this._,this._=t}this._+=bo}}result(){const e=this._;return this._="",e.length?e:null}}function wo(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Eo(e){return function(t){var n=new xo;for(var r in e)n[r]=e[r];return n.stream=t,n}}function xo(){}function So(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),ji(n,e.stream(Ra)),t(Ra.result()),null!=r&&e.clipExtent(r),e}function Oo(e,t,n){return So(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}xo.prototype={constructor:xo,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Co=16,To=Ti(30*xi);function Ao(e,t){return+t?function(e,t){function n(r,i,a,o,s,l,c,u,d,h,f,p,m,g){var v=c-r,y=u-i,b=v*v+y*y;if(b>4*t&&m--){var _=o+h,w=s+f,E=l+p,x=Di(_*_+w*w+E*E),S=Ni(E/=x),O=Si(Si(E)-1)<gi||Si(a-d)<gi?(a+d)/2:Ci(w,_),C=e(O,S),T=C[0],A=C[1],M=T-r,k=A-i,L=y*M-v*k;(L*L/b>t||Si((v*M+y*k)/b-.5)>.3||o*h+s*f+l*p<To)&&(n(r,i,a,o,s,l,T,A,O,_/=x,w/=x,E,m,g),g.point(T,A),n(T,A,O,_,w,E,c,u,d,h,f,p,m,g))}}return function(t){var r,i,a,o,s,l,c,u,d,h,f,p,m={point:g,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),m.lineStart=_},polygonEnd:function(){t.polygonEnd(),m.lineStart=v}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){u=NaN,m.point=y,t.lineStart()}function y(r,i){var a=Vi([r,i]),o=e(r,i);n(u,d,c,h,f,p,u=o[0],d=o[1],c=r,h=a[0],f=a[1],p=a[2],Co,t),t.point(u,d)}function b(){m.point=g,t.lineEnd()}function _(){v(),m.point=w,m.lineEnd=E}function w(e,t){y(r=e,t),i=u,a=d,o=h,s=f,l=p,m.point=y}function E(){n(u,d,c,h,f,p,i,a,r,o,s,l,Co,t),m.lineEnd=b,b()}return m}}(e,t):function(e){return Eo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var Mo=Eo({point:function(e,t){this.stream.point(e*xi,t*xi)}});function ko(e,t,n,r,i,a){if(!a)return function(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}(e,t,n,r,i);var o=Ti(a),s=ki(a),l=o*e,c=s*e,u=o/e,d=s/e,h=(s*n-o*t)/e,f=(s*t+o*n)/e;function p(e,a){return[l*(e*=r)-c*(a*=i)+t,n-c*e-l*a]}return p.invert=function(e,t){return[r*(u*e-d*t+h),i*(f-d*e-u*t)]},p}function Lo(e){return Do((function(){return e}))()}function Do(e){var t,n,r,i,a,o,s,l,c,u,d=150,h=480,f=250,p=0,m=0,g=0,v=0,y=0,b=0,_=1,w=1,E=null,x=da,S=null,O=ga,C=.5;function T(e){return l(e[0]*xi,e[1]*xi)}function A(e){return(e=l.invert(e[0],e[1]))&&[e[0]*Ei,e[1]*Ei]}function M(){var e=ko(d,0,0,_,w,b).apply(null,t(p,m)),r=ko(d,h-e[0],f-e[1],_,w,b);return n=Xi(g,v,y),s=Yi(t,r),l=Yi(n,s),o=Ao(s,C),k()}function k(){return c=u=null,T}return T.stream=function(e){return c&&u===e?c:c=Mo(function(e){return Eo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(x(o(O(u=e)))))},T.preclip=function(e){return arguments.length?(x=e,E=void 0,k()):x},T.postclip=function(e){return arguments.length?(O=e,S=r=i=a=null,k()):O},T.clipAngle=function(e){return arguments.length?(x=+e?ha(E=e*xi):(E=null,da),k()):E*Ei},T.clipExtent=function(e){return arguments.length?(O=null==e?(S=r=i=a=null,ga):ma(S=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),k()):null==S?null:[[S,r],[i,a]]},T.scale=function(e){return arguments.length?(d=+e,M()):d},T.translate=function(e){return arguments.length?(h=+e[0],f=+e[1],M()):[h,f]},T.center=function(e){return arguments.length?(p=e[0]%360*xi,m=e[1]%360*xi,M()):[p*Ei,m*Ei]},T.rotate=function(e){return arguments.length?(g=e[0]%360*xi,v=e[1]%360*xi,y=e.length>2?e[2]%360*xi:0,M()):[g*Ei,v*Ei,y*Ei]},T.angle=function(e){return arguments.length?(b=e%360*xi,M()):b*Ei},T.reflectX=function(e){return arguments.length?(_=e?-1:1,M()):_<0},T.reflectY=function(e){return arguments.length?(w=e?-1:1,M()):w<0},T.precision=function(e){return arguments.length?(o=Ao(s,C=e*e),k()):Di(C)},T.fitExtent=function(e,t){return Oo(T,e,t)},T.fitSize=function(e,t){return function(e,t,n){return Oo(e,[[0,0],t],n)}(T,e,t)},T.fitWidth=function(e,t){return function(e,t,n){return So(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}(T,e,t)},T.fitHeight=function(e,t){return function(e,t,n){return So(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&A,M()}}function Ro(e){var t=0,n=yi/3,r=Do(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*xi,n=e[1]*xi):[t*Ei,n*Ei]},i}function No(e,t){var n=ki(e),r=(n+ki(t))/2;if(Si(r)<gi)return function(e){var t=Ti(e);function n(e,n){return[e*t,ki(n)/t]}return n.invert=function(e,n){return[e/t,Ni(n*t)]},n}(e);var i=1+n*(2*r-n),a=Di(i)/r;function o(e,t){var n=Di(i-2*r*ki(t))/r;return[n*ki(e*=r),a-n*Ti(e)]}return o.invert=function(e,t){var n=a-t,o=Ci(e,Si(n))*Li(n);return n*r<0&&(o-=yi*Li(e)*Li(n)),[o/r,Ni((i-(e*e+n*n)*r*r)/(2*r))]},o}function Io(){return Ro(No).scale(155.424).center([0,33.6442])}function Po(e,t){return[e,Mi(Ri((bi+t)/2))]}function $o(){return function(e){var t,n,r,i=Lo(e),a=i.center,o=i.scale,s=i.translate,l=i.clipExtent,c=null;function u(){var a=yi*o(),s=i(function(e){function t(t){return(t=e(t[0]*xi,t[1]*xi))[0]*=Ei,t[1]*=Ei,t}return e=Xi(e[0]*xi,e[1]*xi,e.length>2?e[2]*xi:0),t.invert=function(t){return(t=e.invert(t[0]*xi,t[1]*xi))[0]*=Ei,t[1]*=Ei,t},t}(i.rotate()).invert([0,0]));return l(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:e===Po?[[Math.max(s[0]-a,c),t],[Math.min(s[0]+a,n),r]]:[[c,Math.max(s[1]-a,t)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(e){return arguments.length?(o(e),u()):o()},i.translate=function(e){return arguments.length?(s(e),u()):s()},i.center=function(e){return arguments.length?(a(e),u()):a()},i.clipExtent=function(e){return arguments.length?(null==e?c=t=n=r=null:(c=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),u()):null==c?null:[[c,t],[n,r]]},u()}(Po).scale(961/wi)}function Bo(e,t){return[e,t]}function zo(e,t){var n=Ti(e),r=e===t?ki(e):(n-Ti(t))/(t-e),i=n/r+e;if(Si(r)<gi)return Bo;function a(e,t){var n=i-t,a=r*e;return[n*ki(a),i-n*Ti(a)]}return a.invert=function(e,t){var n=i-t,a=Ci(e,Si(n))*Li(n);return n*r<0&&(a-=yi*Li(e)*Li(n)),[a/r,i-Li(r)*Di(e*e+n*n)]},a}Po.invert=function(e,t){return[e,2*Oi(Ai(t))-bi]},Bo.invert=Bo;var Uo=1.340264,jo=-.081106,Fo=893e-6,Vo=.003796,Ho=Di(3)/2;function Go(e,t){var n=Ni(Ho*ki(t)),r=n*n,i=r*r*r;return[e*Ti(n)/(Ho*(Uo+3*jo*r+i*(7*Fo+9*Vo*r))),n*(Uo+jo*r+i*(Fo+Vo*r))]}function Wo(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function qo(e,t){return e.parent===t.parent?1:2}function Zo(e,t){return e+t.x}function Yo(e,t){return Math.max(e,t.y)}function Ko(){var e=qo,t=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(Zo,0)/e.length}(n),t.y=function(e){return 1+e.reduce(Yo,0)}(n)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=s.x-e(s,l)/2,u=l.x+e(l,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function Xo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Qo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=es)):void 0===t&&(t=Jo);for(var n,r,i,a,o,s=new rs(e),l=[s];n=l.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new rs(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(ns)}function Jo(e){return e.children}function es(e){return Array.isArray(e)?e[1]:null}function ts(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function ns(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function rs(e){this.data=e,this.depth=this.height=0,this.parent=null}function is(e){if("function"!=typeof e)throw new Error;return e}function as(){return 0}function os(e){return function(){return e}}Go.invert=function(e,t){for(var n,r=t,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Uo+jo*i+a*(Fo+Vo*i))-t)/(Uo+3*jo*i+a*(7*Fo+9*Vo*i)))*r)*i*i,!(Si(n)<vi));++o);return[Ho*e*(Uo+3*jo*i+a*(7*Fo+9*Vo*i))/Ti(r),Ni(ki(r)/Ho)]},Wo.invert=function(e,t){var n,r=t,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-t)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Si(n)>gi&&--i>0);return[e/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},rs.prototype=Qo.prototype={constructor:rs,count:function(){return this.eachAfter(Xo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)e.call(t,a,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(e.call(t,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Qo(this).eachBefore(ts)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}};const ss=1664525,ls=1013904223,cs=4294967296;function us(e,t){var n,r;if(fs(t,e))return[t];for(n=0;n<e.length;++n)if(ds(t,e[n])&&fs(ms(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(ds(ms(e[n],e[r]),t)&&ds(ms(e[n],t),e[r])&&ds(ms(e[r],t),e[n])&&fs(gs(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function ds(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function hs(e,t){var n=e.r-t.r+1e-9*Math.max(e.r,t.r,1),r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function fs(e,t){for(var n=0;n<t.length;++n)if(!hs(e,t[n]))return!1;return!0}function ps(e){switch(e.length){case 1:return function(e){return{x:e.x,y:e.y,r:e.r}}(e[0]);case 2:return ms(e[0],e[1]);case 3:return gs(e[0],e[1],e[2])}}function ms(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,l=a-n,c=o-r,u=s-i,d=Math.sqrt(l*l+c*c);return{x:(n+a+l/d*u)/2,y:(r+o+c/d*u)/2,r:(d+i+s)/2}}function gs(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-o,f=r-c,p=i-s,m=i-u,g=l-a,v=d-a,y=r*r+i*i-a*a,b=y-o*o-s*s+l*l,_=y-c*c-u*u+d*d,w=f*p-h*m,E=(p*_-m*b)/(2*w)-r,x=(m*g-p*v)/w,S=(f*b-h*_)/(2*w)-i,O=(h*v-f*g)/w,C=x*x+O*O-1,T=2*(a+E*x+S*O),A=E*E+S*S-a*a,M=-(Math.abs(C)>1e-6?(T+Math.sqrt(T*T-4*C*A))/(2*C):A/T);return{x:r+E+x*M,y:i+S+O*M,r:M}}function vs(e,t,n){var r,i,a,o,s=e.x-t.x,l=e.y-t.y,c=s*s+l*l;c?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function ys(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function bs(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function _s(e){this._=e,this.next=null,this.previous=null}function ws(e,t){if(!(a=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,r,i,a,o,s,l,c,u,d,h;if((n=e[0]).x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;vs(r,n,i=e[2]),n=new _s(n),r=new _s(r),i=new _s(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(l=3;l<a;++l){vs(n._,r._,i=e[l]),i=new _s(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do{if(d<=h){if(ys(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue e}d+=c._.r,c=c.next}else{if(ys(u._,i._)){(n=u).next=r,r.previous=n,--l;continue e}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=bs(n);(i=i.next)!==r;)(s=bs(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=function(e,t){for(var n,r,i=0,a=(e=function(e,t){let n,r,i=e.length;for(;i;)r=t()*i--|0,n=e[i],e[i]=e[r],e[r]=n;return e}(Array.from(e),t)).length,o=[];i<a;)n=e[i],r&&hs(r,n)?++i:(r=ps(o=us(o,n)),i=0);return r}(n,t),l=0;l<a;++l)(n=e[l]).x-=i.x,n.y-=i.y;return i.r}function Es(e){return Math.sqrt(e.value)}function xs(){var e=null,t=1,n=1,r=as;function i(i){const a=function(){let e=1;return()=>(e=(ss*e+ls)%cs)/cs}();return i.x=t/2,i.y=n/2,e?i.eachBefore(Ss(e)).eachAfter(Os(r,.5,a)).eachBefore(Cs(1)):i.eachBefore(Ss(Es)).eachAfter(Os(as,1,a)).eachAfter(Os(r,i.r/Math.min(t,n),a)).eachBefore(Cs(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:is(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:os(+e),i):r},i}function Ss(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Os(e,t,n){return function(r){if(i=r.children){var i,a,o,s=i.length,l=e(r)*t||0;if(l)for(a=0;a<s;++a)i[a].r+=l;if(o=ws(i,n),l)for(a=0;a<s;++a)i[a].r-=l;r.r=o+l}}}function Cs(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Ts(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function As(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,c=e.value&&(r-t)/e.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function Ms(e,t){return e.parent===t.parent?1:2}function ks(e){var t=e.children;return t?t[0]:e.t}function Ls(e){var t=e.children;return t?t[t.length-1]:e.t}function Ds(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Rs(e,t,n){return e.a.parent===t.parent?e.a:n}function Ns(e,t){this._=e,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=t}function Is(){var e=Ms,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,a,o=new Ns(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new Ns(r[i],i)),n.parent=t;return(o.parent=new Ns(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.x<c.x&&(c=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)}));var h=c===u?1:e(c,u)/2,f=h-c.x,p=t/(u.x+h+f),m=n/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+f)*p,e.y=e.depth*m}))}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,a=t,o=t,s=n,l=a.parent.children[0],c=a.m,u=o.m,d=s.m,h=l.m;s=Ls(s),a=ks(a),s&&a;)l=ks(l),(o=Ls(o)).a=t,(i=s.z+d-a.z-c+e(s._,a._))>0&&(Ds(Rs(s,t,r),t,i),c+=i,u+=i),d+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!Ls(o)&&(o.t=s,o.m+=d-u),a&&!ks(l)&&(l.t=a,l.m+=c-h,r=t)}return r}(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function Ps(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,c=e.value&&(i-n)/e.value;++s<l;)(a=o[s]).x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Ns.prototype=Object.create(rs.prototype);const $s=function e(t){function n(e,n,r,i,a){!function(e,t,n,r,i,a){for(var o,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,_=0,w=y.length,E=t.value;b<w;){l=i-n,c=a-r;do{u=y[_++].value}while(!u&&_<w);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(E*e)),p=Math.max(h/g,g/d);_<w;++_){if(u+=s=y[_].value,s<d&&(d=s),s>h&&(h=s),g=u*u*m,(f=Math.max(h/g,g/d))>p){u-=s;break}p=f}v.push(o={value:u,dice:l<c,children:y.slice(b,_)}),o.dice?As(o,n,r,i,E?r+=c*u/E:a):Ps(o,n,r,E?n+=l*u/E:i,a),E-=u,b=_}}(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2);function Bs(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const zs=Symbol("implicit");function Us(){var e=new d,t=[],n=[],r=zs;function i(i){let a=e.get(i);if(void 0===a){if(r!==zs)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new d;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Us(t,n).unknown(r)},Bs.apply(i,arguments),i}function js(){var e,t,n=Us().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=o<a,h=d?o:a,f=d?a:o;e=(f-h)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),h+=(f-h-e*(n-l))*u,t=e*(1-l),s&&(h=Math.round(h),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}(n).map((function(t){return h+e*t}));return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([a,o]=e,a=+a,o=+o,d()):[a,o]},n.rangeRound=function(e){return[a,o]=e,a=+a,o=+o,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return js(r(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},Bs.apply(d(),arguments)}function Fs(e){return+e}var Vs=[0,1];function Hs(e){return e}function Gs(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Ws(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Gs(i,r),a=n(o,a)):(r=Gs(r,i),a=n(a,o)),function(e){return a(r(e))}}function qs(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Gs(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=l(e,t,1,r)-1;return a[n](i[n](t))}}function Zs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ys(){var e,t,n,r,i,a,o=Vs,s=Vs,l=un,c=Hs;function u(){var e=Math.min(o.length,s.length);return c!==Hs&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?qs:Ws,i=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,o.map(e),an)))(n)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Fs),u()):o.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=dn,u()},d.clamp=function(e){return arguments.length?(c=!!e||Hs,u()):c!==Hs},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Ks(){return Ys()(Hs,Hs)}function Xs(e,t,n,r){var i,a=S(e,t,n);switch((r=ai(r??",f")).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ni(t)/3)))-ni(Math.abs(e)))}(a,o))&&(r.precision=i),hi(r,o);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ni(t)-ni(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(i=function(e){return Math.max(0,-ni(Math.abs(e)))}(a))&&(r.precision=i-2*("%"===r.type))}return di(r)}function Qs(e){var t=e.domain;return e.ticks=function(e){var n=t();return E(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Xs(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,a=t(),o=0,s=a.length-1,l=a[o],c=a[s],u=10;for(c<l&&(i=l,l=c,c=i,i=o,o=s,s=i);u-- >0;){if((i=x(l,c,n))===r)return a[o]=l,a[s]=c,t(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Js(){var e=Ks();return e.copy=function(){return Zs(e,Js())},Bs.apply(e,arguments),Qs(e)}function el(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),e[r]=t.floor(a),e[i]=t.ceil(o),e}function tl(e){return Math.log(e)}function nl(e){return Math.exp(e)}function rl(e){return-Math.log(-e)}function il(e){return-Math.exp(-e)}function al(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ol(e){return(t,n)=>-e(-t,n)}function sl(e){const t=e(tl,nl),n=t.domain;let r,i,a=10;function o(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),i=function(e){return 10===e?al:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=ol(r),i=ol(i),e(rl,il)):e(tl,nl),t}return t.base=function(e){return arguments.length?(a=+e,o()):a},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{const t=n();let o=t[0],s=t[t.length-1];const l=s<o;l&&([o,s]=[s,o]);let c,u,d=r(o),h=r(s);const f=null==e?10:+e;let p=[];if(!(a%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),o>0){for(;d<=h;++d)for(c=1;c<a;++c)if(u=d<0?c/i(-d):c*i(d),!(u<o)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=a-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<o)){if(u>s)break;p.push(u)}2*p.length<f&&(p=E(o,s,f))}else p=E(d,h,Math.min(h-d,f)).map(i);return l?p.reverse():p},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(!(a%1)&&null==(n=ai(n)).precision&&(n.trim=!0),n=di(n)),e===1/0)return n;const o=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*a<a-.5&&(t*=a),t<=o?n(e):""}},t.nice=()=>n(el(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function ll(){const e=sl(Ys()).domain([1,10]);return e.copy=()=>Zs(e,ll()).base(e.base()),Bs.apply(e,arguments),e}function cl(){var e,t=0,n=1,r=1,i=[.5],a=[0,1];function o(t){return null!=t&&t<=t?a[l(i,t,0,r)]:e}function s(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return o}return o.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},o.range=function(e){return arguments.length?(r=(a=Array.from(e)).length-1,s()):a.slice()},o.invertExtent=function(e){var o=a.indexOf(e);return o<0?[NaN,NaN]:o<1?[t,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(t){return arguments.length&&(e=t),o},o.thresholds=function(){return i.slice()},o.copy=function(){return cl().domain([t,n]).range(a).unknown(e)},Bs.apply(Qs(o),arguments)}const ul=new Date,dl=new Date;function hl(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return o;let s;do{o.push(s=new Date(+n)),t(n,a),e(n)}while(s<n&&n<r);return o},i.filter=n=>hl((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(ul.setTime(+t),dl.setTime(+r),e(ul),e(dl),Math.floor(n(ul,dl))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const fl=hl((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));fl.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?hl((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):fl:null),fl.range;const pl=1e3,ml=6e4,gl=60*ml,vl=24*gl,yl=7*vl,bl=30*vl,_l=365*vl,wl=hl((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*pl)}),((e,t)=>(t-e)/pl),(e=>e.getUTCSeconds()));wl.range;const El=hl((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pl)}),((e,t)=>{e.setTime(+e+t*ml)}),((e,t)=>(t-e)/ml),(e=>e.getMinutes()));El.range,hl((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*ml)}),((e,t)=>(t-e)/ml),(e=>e.getUTCMinutes())).range;const xl=hl((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pl-e.getMinutes()*ml)}),((e,t)=>{e.setTime(+e+t*gl)}),((e,t)=>(t-e)/gl),(e=>e.getHours()));xl.range,hl((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*gl)}),((e,t)=>(t-e)/gl),(e=>e.getUTCHours())).range;const Sl=hl((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ml)/vl),(e=>e.getDate()-1));Sl.range;const Ol=hl((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/vl),(e=>e.getUTCDate()-1));function Cl(e){return hl((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ml)/yl))}Ol.range,hl((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/vl),(e=>Math.floor(e/vl))).range;const Tl=Cl(0),Al=Cl(1),Ml=Cl(2),kl=Cl(3),Ll=Cl(4),Dl=Cl(5),Rl=Cl(6);function Nl(e){return hl((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/yl))}Tl.range,Al.range,Ml.range,kl.range,Ll.range,Dl.range,Rl.range;const Il=Nl(0),Pl=Nl(1),$l=Nl(2),Bl=Nl(3),zl=Nl(4),Ul=Nl(5),jl=Nl(6);Il.range,Pl.range,$l.range,Bl.range,zl.range,Ul.range,jl.range;const Fl=hl((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Fl.range,hl((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())).range;const Vl=hl((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));Vl.every=e=>isFinite(e=Math.floor(e))&&e>0?hl((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,Vl.range;const Hl=hl((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Hl.every=e=>isFinite(e=Math.floor(e))&&e>0?hl((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Hl.range;const[Gl,Wl]=function(e,t,n,r,i,o){const s=[[wl,1,pl],[wl,5,5e3],[wl,15,15e3],[wl,30,3e4],[o,1,ml],[o,5,5*ml],[o,15,15*ml],[o,30,30*ml],[i,1,gl],[i,3,3*gl],[i,6,6*gl],[i,12,12*gl],[r,1,vl],[r,2,2*vl],[n,1,yl],[t,1,bl],[t,3,3*bl],[e,1,_l]];function l(t,n,r){const i=Math.abs(n-t)/r,o=a((([,,e])=>e)).right(s,i);if(o===s.length)return e.every(S(t/_l,n/_l,r));if(0===o)return fl.every(Math.max(S(t,n,r),1));const[l,c]=s[i/s[o-1][2]<s[o][2]/i?o-1:o];return l.every(c)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:l(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a},l]}(Vl,Fl,Tl,Sl,xl,El);function ql(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Zl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Yl(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Kl,Xl,Ql={"-":"",_:" ",0:"0"},Jl=/^\s*\d+/,ec=/^%/,tc=/[\\^$*+?|[\]().{}]/g;function nc(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function rc(e){return e.replace(tc,"\\$&")}function ic(e){return new RegExp("^(?:"+e.map(rc).join("|")+")","i")}function ac(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function oc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function cc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function uc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function dc(e,t,n){var r=Jl.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function fc(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function pc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function mc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function gc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vc(e,t,n){var r=Jl.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function yc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function bc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _c(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wc(e,t,n){var r=Jl.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ec(e,t,n){var r=Jl.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function xc(e,t,n){var r=ec.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Sc(e,t,n){var r=Jl.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Oc(e,t,n){var r=Jl.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Cc(e,t){return nc(e.getDate(),t,2)}function Tc(e,t){return nc(e.getHours(),t,2)}function Ac(e,t){return nc(e.getHours()%12||12,t,2)}function Mc(e,t){return nc(1+Sl.count(Vl(e),e),t,3)}function kc(e,t){return nc(e.getMilliseconds(),t,3)}function Lc(e,t){return kc(e,t)+"000"}function Dc(e,t){return nc(e.getMonth()+1,t,2)}function Rc(e,t){return nc(e.getMinutes(),t,2)}function Nc(e,t){return nc(e.getSeconds(),t,2)}function Ic(e){var t=e.getDay();return 0===t?7:t}function Pc(e,t){return nc(Tl.count(Vl(e)-1,e),t,2)}function $c(e){var t=e.getDay();return t>=4||0===t?Ll(e):Ll.ceil(e)}function Bc(e,t){return e=$c(e),nc(Ll.count(Vl(e),e)+(4===Vl(e).getDay()),t,2)}function zc(e){return e.getDay()}function Uc(e,t){return nc(Al.count(Vl(e)-1,e),t,2)}function jc(e,t){return nc(e.getFullYear()%100,t,2)}function Fc(e,t){return nc((e=$c(e)).getFullYear()%100,t,2)}function Vc(e,t){return nc(e.getFullYear()%1e4,t,4)}function Hc(e,t){var n=e.getDay();return nc((e=n>=4||0===n?Ll(e):Ll.ceil(e)).getFullYear()%1e4,t,4)}function Gc(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nc(t/60|0,"0",2)+nc(t%60,"0",2)}function Wc(e,t){return nc(e.getUTCDate(),t,2)}function qc(e,t){return nc(e.getUTCHours(),t,2)}function Zc(e,t){return nc(e.getUTCHours()%12||12,t,2)}function Yc(e,t){return nc(1+Ol.count(Hl(e),e),t,3)}function Kc(e,t){return nc(e.getUTCMilliseconds(),t,3)}function Xc(e,t){return Kc(e,t)+"000"}function Qc(e,t){return nc(e.getUTCMonth()+1,t,2)}function Jc(e,t){return nc(e.getUTCMinutes(),t,2)}function eu(e,t){return nc(e.getUTCSeconds(),t,2)}function tu(e){var t=e.getUTCDay();return 0===t?7:t}function nu(e,t){return nc(Il.count(Hl(e)-1,e),t,2)}function ru(e){var t=e.getUTCDay();return t>=4||0===t?zl(e):zl.ceil(e)}function iu(e,t){return e=ru(e),nc(zl.count(Hl(e),e)+(4===Hl(e).getUTCDay()),t,2)}function au(e){return e.getUTCDay()}function ou(e,t){return nc(Pl.count(Hl(e)-1,e),t,2)}function su(e,t){return nc(e.getUTCFullYear()%100,t,2)}function lu(e,t){return nc((e=ru(e)).getUTCFullYear()%100,t,2)}function cu(e,t){return nc(e.getUTCFullYear()%1e4,t,4)}function uu(e,t){var n=e.getUTCDay();return nc((e=n>=4||0===n?zl(e):zl.ceil(e)).getUTCFullYear()%1e4,t,4)}function du(){return"+0000"}function hu(){return"%"}function fu(e){return+e}function pu(e){return Math.floor(+e/1e3)}function mu(e){return new Date(e)}function gu(e){return e instanceof Date?+e:+new Date(+e)}function vu(e,t,n,r,i,a,o,s,l,c){var u=Ks(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),_=c("%Y");function w(e){return(l(e)<e?f:s(e)<e?p:o(e)<e?m:a(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:_)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,gu)):h().map(mu)},u.ticks=function(t){var n=h();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=h();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?h(el(n,e)):u},u.copy=function(){return Zs(u,vu(e,t,n,r,i,a,o,s,l,c))},u}function yu(){return Bs.apply(vu(Gl,Wl,Vl,Fl,Tl,Sl,xl,El,wl,Xl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bu(e){return function(){return e}}!function(e){Kl=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=ic(i),u=ac(i),d=ic(a),h=ac(a),f=ic(o),p=ac(o),m=ic(s),g=ac(s),v=ic(l),y=ac(l),b={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Cc,e:Cc,f:Lc,g:Fc,G:Hc,H:Tc,I:Ac,j:Mc,L:kc,m:Dc,M:Rc,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:fu,s:pu,S:Nc,u:Ic,U:Pc,V:Bc,w:zc,W:Uc,x:null,X:null,y:jc,Y:Vc,Z:Gc,"%":hu},_={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Wc,e:Wc,f:Xc,g:lu,G:uu,H:qc,I:Zc,j:Yc,L:Kc,m:Qc,M:Jc,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:fu,s:pu,S:eu,u:tu,U:nu,V:iu,w:au,W:ou,x:null,X:null,y:su,Y:cu,Z:du,"%":hu},w={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:gc,e:gc,f:Ec,g:hc,G:dc,H:yc,I:yc,j:vc,L:wc,m:mc,M:bc,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:pc,Q:Sc,s:Oc,S:_c,u:sc,U:lc,V:cc,w:oc,W:uc,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:hc,Y:dc,Z:fc,"%":xc};function E(e,t){return function(n){var r,i,a,o=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(o.push(e.slice(l,s)),null!=(i=Ql[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(a=t[r])&&(r=a(n,i)),o.push(r),l=s+1);return o.push(e.slice(l,s)),o.join("")}}function x(e,t){return function(n){var r,i,a=Yl(1900,void 0,1);if(S(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Zl(Yl(a.y,0,1))).getUTCDay(),r=i>4||0===i?Pl.ceil(r):Pl(r),r=Ol.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=ql(Yl(a.y,0,1))).getDay(),r=i>4||0===i?Al.ceil(r):Al(r),r=Sl.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Zl(Yl(a.y,0,1)).getUTCDay():ql(Yl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Zl(a)):ql(a)}}function S(e,t,n,r){for(var i,a,o=0,s=t.length,l=n.length;o<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=w[i in Ql?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),_.x=E(n,_),_.X=E(r,_),_.c=E(t,_),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}(e),Xl=Kl.format,Kl.parse,Kl.utcFormat,Kl.utcParse}({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"]});const _u=Math.abs,wu=Math.atan2,Eu=Math.cos,xu=Math.max,Su=Math.min,Ou=Math.sin,Cu=Math.sqrt,Tu=1e-12,Au=Math.PI,Mu=Au/2,ku=2*Au;function Lu(e){return e>=1?Mu:e<=-1?-Mu:Math.asin(e)}function Du(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ei(t)}function Ru(e){return e.innerRadius}function Nu(e){return e.outerRadius}function Iu(e){return e.startAngle}function Pu(e){return e.endAngle}function $u(e){return e&&e.padAngle}function Bu(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/Cu(s*s+l*l),u=c*l,d=-c*s,h=e+u,f=t+d,p=n+u,m=r+d,g=(h+p)/2,v=(f+m)/2,y=p-h,b=m-f,_=y*y+b*b,w=i-a,E=h*m-p*f,x=(b<0?-1:1)*Cu(xu(0,w*w*_-E*E)),S=(E*b-y*x)/_,O=(-E*y-b*x)/_,C=(E*b+y*x)/_,T=(-E*y+b*x)/_,A=S-g,M=O-v,k=C-g,L=T-v;return A*A+M*M>k*k+L*L&&(S=C,O=T),{cx:S,cy:O,x01:-u,y01:-d,x11:S*(i/w-1),y11:O*(i/w-1)}}function zu(){var e=Ru,t=Nu,n=bu(0),r=null,i=Iu,a=Pu,o=$u,s=null,l=Du(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-Mu,p=a.apply(this,arguments)-Mu,m=_u(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>Tu)if(m>ku-Tu)s.moveTo(h*Eu(f),h*Ou(f)),s.arc(0,0,h,f,p,!g),d>Tu&&(s.moveTo(d*Eu(p),d*Ou(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,_=p,w=f,E=p,x=m,S=m,O=o.apply(this,arguments)/2,C=O>Tu&&(r?+r.apply(this,arguments):Cu(d*d+h*h)),T=Su(_u(h-d)/2,+n.apply(this,arguments)),A=T,M=T;if(C>Tu){var k=Lu(C/d*Ou(O)),L=Lu(C/h*Ou(O));(x-=2*k)>Tu?(w+=k*=g?1:-1,E-=k):(x=0,w=E=(f+p)/2),(S-=2*L)>Tu?(b+=L*=g?1:-1,_-=L):(S=0,b=_=(f+p)/2)}var D=h*Eu(b),R=h*Ou(b),N=d*Eu(E),I=d*Ou(E);if(T>Tu){var P,$=h*Eu(_),B=h*Ou(_),z=d*Eu(w),U=d*Ou(w);if(m<Au)if(P=function(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,d=s-a,h=d*l-u*c;if(!(h*h<Tu))return[e+(h=(u*(t-a)-d*(e-i))/h)*l,t+h*c]}(D,R,z,U,$,B,N,I)){var j=D-P[0],F=R-P[1],V=$-P[0],H=B-P[1],G=1/Ou(function(e){return e>1?0:e<-1?Au:Math.acos(e)}((j*V+F*H)/(Cu(j*j+F*F)*Cu(V*V+H*H)))/2),W=Cu(P[0]*P[0]+P[1]*P[1]);A=Su(T,(d-W)/(G-1)),M=Su(T,(h-W)/(G+1))}else A=M=0}S>Tu?M>Tu?(v=Bu(z,U,D,R,h,M,g),y=Bu($,B,N,I,h,M,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,wu(v.y01,v.x01),wu(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,M,wu(v.y01,v.x01),wu(v.y11,v.x11),!g),s.arc(0,0,h,wu(v.cy+v.y11,v.cx+v.x11),wu(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,M,wu(y.y11,y.x11),wu(y.y01,y.x01),!g))):(s.moveTo(D,R),s.arc(0,0,h,b,_,!g)):s.moveTo(D,R),d>Tu&&x>Tu?A>Tu?(v=Bu(N,I,$,B,d,-A,g),y=Bu(D,R,z,U,d,-A,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,wu(v.y01,v.x01),wu(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,A,wu(v.y01,v.x01),wu(v.y11,v.x11),!g),s.arc(0,0,d,wu(v.cy+v.y11,v.cx+v.x11),wu(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,A,wu(y.y11,y.x11),wu(y.y01,y.x01),!g))):s.arc(0,0,d,E,w,g):s.lineTo(N,I)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Au/2;return[Eu(r)*n,Ou(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:bu(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:bu(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),c):i},c.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:bu(+e),c):a},c.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:bu(+e),c):o},c.context=function(e){return arguments.length?(s=e??null,c):s},c}var Uu=Array.prototype.slice;function ju(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Fu(e){this._context=e}function Vu(e){return new Fu(e)}function Hu(e){return e[0]}function Gu(e){return e[1]}function Wu(e,t){var n=bu(!0),r=null,i=Vu,a=null,o=Du(s);function s(s){var l,c,u,d=(s=ju(s)).length,h=!1;for(null==r&&(a=i(u=o())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(c,l,s),+t(c,l,s));if(u)return a=null,u+""||null}return e="function"==typeof e?e:void 0===e?Hu:bu(e),t="function"==typeof t?t:void 0===t?Gu:bu(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:bu(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=a=null:a=i(r=e),s):r},s}function qu(e,t,n){var r=null,i=bu(!0),a=null,o=Vu,s=null,l=Du(c);function c(c){var u,d,h,f,p,m=(c=ju(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==a&&(s=o(p=l())),u=0;u<=m;++u){if(!(u<m&&i(f=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=d;--h)s.point(v[h],y[h]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(f,u,c),y[u]=+t(f,u,c),s.point(r?+r(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return s=null,p+""||null}function u(){return Wu().defined(i).curve(o).context(a)}return e="function"==typeof e?e:void 0===e?Hu:bu(+e),t="function"==typeof t?t:bu(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Gu:bu(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:bu(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:bu(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:bu(!!e),c):i},c.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),c):o},c.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),c):a},c}function Zu(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Yu(e){return e}Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Ku=Qu(Vu);function Xu(e){this._curve=e}function Qu(e){function t(t){return new Xu(e(t))}return t._curve=e,t}function Ju(){return function(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(Qu(e)):t()._curve},e}(Wu().curve(Ku))}Xu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};class ed{constructor(e,t){this._context=e,this._x=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function td(e){return new ed(e,!0)}function nd(e){return e.source}function rd(e){return e.target}function id(){return function(e){let t=nd,n=rd,r=Hu,i=Gu,a=null,o=null,s=Du(l);function l(){let l;const c=Uu.call(arguments),u=t.apply(this,c),d=n.apply(this,c);if(null==a&&(o=e(l=s())),o.lineStart(),c[0]=u,o.point(+r.apply(this,c),+i.apply(this,c)),c[0]=d,o.point(+r.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(e){return arguments.length?(t=e,l):t},l.target=function(e){return arguments.length?(n=e,l):n},l.x=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),l):r},l.y=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),l):i},l.context=function(t){return arguments.length?(null==t?a=o=null:o=e(a=t),l):a},l}(td)}function ad(){}function od(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function sd(e){this._context=e}function ld(e){return new sd(e)}function cd(e){this._context=e}function ud(e){return new cd(e)}function dd(e){this._context=e}function hd(e){return new dd(e)}function fd(e,t){this._basis=new sd(e),this._beta=t}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:od(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},cd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*o),this._beta*t[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pd=function e(t){function n(e){return 1===t?new sd(e):new fd(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function md(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function gd(e,t){this._context=e,this._k=(1-t)/6}gd.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:md(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vd=function e(t){function n(e){return new gd(e,t)}return n.tension=function(t){return e(+t)},n}(0);function yd(e,t){this._context=e,this._k=(1-t)/6}yd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const bd=function e(t){function n(e){return new yd(e,t)}return n.tension=function(t){return e(+t)},n}(0);function _d(e,t){this._context=e,this._k=(1-t)/6}_d.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wd=function e(t){function n(e){return new _d(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ed(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Tu){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Tu){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function xd(e,t){this._context=e,this._alpha=t}xd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Sd=function e(t){function n(e){return t?new xd(e,t):new gd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Od(e,t){this._context=e,this._alpha=t}Od.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Cd=function e(t){function n(e){return t?new Od(e,t):new yd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Td(e,t){this._context=e,this._alpha=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ad=function e(t){function n(e){return t?new Td(e,t):new _d(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Md(e){this._context=e}function kd(e){return new Md(e)}function Ld(e){return e<0?-1:1}function Dd(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ld(a)+Ld(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Rd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nd(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Id(e){this._context=e}function Pd(e){this._context=new $d(e)}function $d(e){this._context=e}function Bd(e){return new Id(e)}function zd(e){return new Pd(e)}function Ud(e){this._context=e}function jd(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fd(e){return new Ud(e)}function Vd(e,t){this._context=e,this._t=t}function Hd(e){return new Vd(e,.5)}function Gd(e){return new Vd(e,0)}function Wd(e){return new Vd(e,1)}function qd(e,t){if((i=e.length)>1)for(var n,r,i,a=1,o=e[t[0]],s=o.length;a<i;++a)for(r=o,o=e[t[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Zd(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Yd(e,t){return e[t]}function Kd(e){const t=[];return t.key=e,t}function Xd(){var e=bu([]),t=Zd,n=qd,r=Yd;function i(i){var a,o,s=Array.from(e.apply(this,arguments),Kd),l=s.length,c=-1;for(const e of i)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(e,s[a].key,c,i)]).data=e;for(a=0,o=ju(t(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:bu(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Zd:"function"==typeof e?e:bu(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??qd,i):n},i}function Qd(e,t){if((s=e.length)>0)for(var n,r,i,a,o,s,l=0,c=e[t[0]].length;l<c;++l)for(a=o=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Jd(e,t,n){this.k=e,this.x=t,this.y=n}Md.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Id.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:Nd(this,this._t0,Rd(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Nd(this,Rd(this,n=Dd(this,e,t)),n);break;default:Nd(this,this._t0,n=Dd(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Pd.prototype=Object.create(Id.prototype)).point=function(e,t){Id.prototype.point.call(this,t,e)},$d.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}},Ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=jd(e),i=jd(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Vd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},Jd.prototype={constructor:Jd,scale:function(e){return 1===e?this:new Jd(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Jd(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Jd.prototype;const eh="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var th="object"==typeof self&&self&&self.Object===Object&&self;const nh=eh||th||Function("return this")(),rh=nh.Symbol;var ih=Object.prototype,ah=ih.hasOwnProperty,oh=ih.toString,sh=rh?rh.toStringTag:void 0;var lh=Object.prototype.toString;var ch="[object Null]",uh="[object Undefined]",dh=rh?rh.toStringTag:void 0;function hh(e){return null==e?void 0===e?uh:ch:dh&&dh in Object(e)?function(e){var t=ah.call(e,sh),n=e[sh];try{e[sh]=void 0;var r=!0}catch{}var i=oh.call(e);return r&&(t?e[sh]=n:delete e[sh]),i}(e):function(e){return lh.call(e)}(e)}function fh(e){return null!=e&&"object"==typeof e}var ph="[object Symbol]";function mh(e){return"symbol"==typeof e||fh(e)&&hh(e)==ph}function gh(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}const vh=Array.isArray;var yh=1/0,bh=rh?rh.prototype:void 0,_h=bh?bh.toString:void 0;function wh(e){if("string"==typeof e)return e;if(vh(e))return gh(e,wh)+"";if(mh(e))return _h?_h.call(e):"";var t=e+"";return"0"==t&&1/e==-yh?"-0":t}var Eh=/\s/;var xh=/^\s+/;function Sh(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Eh.test(e.charAt(t)););return t}(e)+1).replace(xh,"")}function Oh(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ch=NaN,Th=/^[-+]0x[0-9a-f]+$/i,Ah=/^0b[01]+$/i,Mh=/^0o[0-7]+$/i,kh=parseInt;function Lh(e){if("number"==typeof e)return e;if(mh(e))return Ch;if(Oh(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Oh(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Sh(e);var n=Ah.test(e);return n||Mh.test(e)?kh(e.slice(2),n?2:8):Th.test(e)?Ch:+e}function Dh(e){return e}var Rh="[object AsyncFunction]",Nh="[object Function]",Ih="[object GeneratorFunction]",Ph="[object Proxy]";function $h(e){if(!Oh(e))return!1;var t=hh(e);return t==Nh||t==Ih||t==Rh||t==Ph}const Bh=nh["__core-js_shared__"];var zh,Uh=(zh=/[^.]+$/.exec(Bh&&Bh.keys&&Bh.keys.IE_PROTO||""))?"Symbol(src)_1."+zh:"";var jh=Function.prototype.toString;function Fh(e){if(null!=e){try{return jh.call(e)}catch{}try{return e+""}catch{}}return""}var Vh=/^\[object .+?Constructor\]$/,Hh=Function.prototype,Gh=Object.prototype,Wh=Hh.toString,qh=Gh.hasOwnProperty,Zh=RegExp("^"+Wh.call(qh).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yh(e){return!(!Oh(e)||function(e){return!!Uh&&Uh in e}(e))&&($h(e)?Zh:Vh).test(Fh(e))}function Kh(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Yh(n)?n:void 0}const Xh=Kh(nh,"WeakMap");var Qh=Object.create;const Jh=function(){function e(){}return function(t){if(!Oh(t))return{};if(Qh)return Qh(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ef(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var tf=Date.now;function nf(e){return function(){return e}}const rf=function(){try{var e=Kh(Object,"defineProperty");return e({},"",{}),e}catch{}}(),af=function(e){var t=0,n=0;return function(){var r=tf(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(rf?function(e,t){return rf(e,"toString",{configurable:!0,enumerable:!1,value:nf(t),writable:!0})}:Dh);function of(e){return e!=e}function sf(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}(e,of,n)}(e,t,0)>-1}var lf=9007199254740991,cf=/^(?:0|[1-9]\d*)$/;function uf(e,t){var n=typeof e;return!!(t=t??lf)&&("number"==n||"symbol"!=n&&cf.test(e))&&e>-1&&e%1==0&&e<t}function df(e,t,n){"__proto__"==t&&rf?rf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function hf(e,t){return e===t||e!=e&&t!=t}var ff=Object.prototype.hasOwnProperty;function pf(e,t,n){var r=e[t];(!ff.call(e,t)||!hf(r,n)||void 0===n&&!(t in e))&&df(e,t,n)}function mf(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?df(n,s,l):pf(n,s,l)}return n}var gf=Math.max;function vf(e,t){return af(function(e,t,n){return t=gf(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=gf(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,Dh),e+"")}var yf=9007199254740991;function bf(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=yf}function _f(e){return null!=e&&bf(e.length)&&!$h(e)}function wf(e,t,n){if(!Oh(n))return!1;var r=typeof t;return!!("number"==r?_f(n)&&uf(t,n.length):"string"==r&&t in n)&&hf(n[t],e)}var Ef=Object.prototype;function xf(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ef)}function Sf(e){return fh(e)&&"[object Arguments]"==hh(e)}var Of=Object.prototype,Cf=Of.hasOwnProperty,Tf=Of.propertyIsEnumerable,Af=Sf(function(){return arguments}())?Sf:function(e){return fh(e)&&Cf.call(e,"callee")&&!Tf.call(e,"callee")};const Mf=Af;var kf="object"==typeof t&&t&&!t.nodeType&&t,Lf=kf&&e&&!e.nodeType&&e,Df=Lf&&Lf.exports===kf?nh.Buffer:void 0;const Rf=(Df?Df.isBuffer:void 0)||function(){return!1};var Nf={};function If(e){return function(t){return e(t)}}Nf["[object Float32Array]"]=Nf["[object Float64Array]"]=Nf["[object Int8Array]"]=Nf["[object Int16Array]"]=Nf["[object Int32Array]"]=Nf["[object Uint8Array]"]=Nf["[object Uint8ClampedArray]"]=Nf["[object Uint16Array]"]=Nf["[object Uint32Array]"]=!0,Nf["[object Arguments]"]=Nf["[object Array]"]=Nf["[object ArrayBuffer]"]=Nf["[object Boolean]"]=Nf["[object DataView]"]=Nf["[object Date]"]=Nf["[object Error]"]=Nf["[object Function]"]=Nf["[object Map]"]=Nf["[object Number]"]=Nf["[object Object]"]=Nf["[object RegExp]"]=Nf["[object Set]"]=Nf["[object String]"]=Nf["[object WeakMap]"]=!1;var Pf="object"==typeof t&&t&&!t.nodeType&&t,$f=Pf&&e&&!e.nodeType&&e,Bf=$f&&$f.exports===Pf&&eh.process;const zf=function(){try{return $f&&$f.require&&$f.require("util").types||Bf&&Bf.binding&&Bf.binding("util")}catch{}}();var Uf=zf&&zf.isTypedArray;const jf=Uf?If(Uf):function(e){return fh(e)&&bf(e.length)&&!!Nf[hh(e)]};var Ff=Object.prototype.hasOwnProperty;function Vf(e,t){var n=vh(e),r=!n&&Mf(e),i=!n&&!r&&Rf(e),a=!n&&!r&&!i&&jf(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||Ff.call(e,c))&&(!o||!("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||uf(c,l)))&&s.push(c);return s}function Hf(e,t){return function(n){return e(t(n))}}const Gf=Hf(Object.keys,Object);var Wf=Object.prototype.hasOwnProperty;function qf(e){if(!xf(e))return Gf(e);var t=[];for(var n in Object(e))Wf.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Zf(e){return _f(e)?Vf(e):qf(e)}var Yf=Object.prototype.hasOwnProperty;function Kf(e){if(!Oh(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=xf(e),n=[];for(var r in e)"constructor"==r&&(t||!Yf.call(e,r))||n.push(r);return n}function Xf(e){return _f(e)?Vf(e,!0):Kf(e)}var Qf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jf=/^\w*$/;function ep(e,t){if(vh(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!mh(e))||Jf.test(e)||!Qf.test(e)||null!=t&&e in Object(t)}const tp=Kh(Object,"create");var np=Object.prototype.hasOwnProperty;var rp=Object.prototype.hasOwnProperty;function ip(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ap(e,t){for(var n=e.length;n--;)if(hf(e[n][0],t))return n;return-1}ip.prototype.clear=function(){this.__data__=tp?tp(null):{},this.size=0},ip.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ip.prototype.get=function(e){var t=this.__data__;if(tp){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return np.call(t,e)?t[e]:void 0},ip.prototype.has=function(e){var t=this.__data__;return tp?void 0!==t[e]:rp.call(t,e)},ip.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tp&&void 0===t?"__lodash_hash_undefined__":t,this};var op=Array.prototype.splice;function sp(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sp.prototype.clear=function(){this.__data__=[],this.size=0},sp.prototype.delete=function(e){var t=this.__data__,n=ap(t,e);return!(n<0||(n==t.length-1?t.pop():op.call(t,n,1),--this.size,0))},sp.prototype.get=function(e){var t=this.__data__,n=ap(t,e);return n<0?void 0:t[n][1]},sp.prototype.has=function(e){return ap(this.__data__,e)>-1},sp.prototype.set=function(e,t){var n=this.__data__,r=ap(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const lp=Kh(nh,"Map");function cp(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function up(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}up.prototype.clear=function(){this.size=0,this.__data__={hash:new ip,map:new(lp||sp),string:new ip}},up.prototype.delete=function(e){var t=cp(this,e).delete(e);return this.size-=t?1:0,t},up.prototype.get=function(e){return cp(this,e).get(e)},up.prototype.has=function(e){return cp(this,e).has(e)},up.prototype.set=function(e,t){var n=cp(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var dp="Expected a function";function hp(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(dp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(hp.Cache||up),n}hp.Cache=up;var fp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pp=/\\(\\)?/g;const mp=function(e){var t=hp(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(fp,(function(e,n,r,i){t.push(r?i.replace(pp,"$1"):n||e)})),t}));function gp(e){return null==e?"":wh(e)}function vp(e,t){return vh(e)?e:ep(e,t)?[e]:mp(gp(e))}var yp=1/0;function bp(e){if("string"==typeof e||mh(e))return e;var t=e+"";return"0"==t&&1/e==-yp?"-0":t}function _p(e,t){for(var n=0,r=(t=vp(t,e)).length;null!=e&&n<r;)e=e[bp(t[n++])];return n&&n==r?e:void 0}function wp(e,t,n){var r=null==e?void 0:_p(e,t);return void 0===r?n:r}function Ep(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var xp=rh?rh.isConcatSpreadable:void 0;function Sp(e){return vh(e)||Mf(e)||!!(xp&&e&&e[xp])}function Op(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Sp),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?Op(s,t-1,n,r,i):Ep(i,s):r||(i[i.length]=s)}return i}function Cp(e){return null!=e&&e.length?Op(e,1):[]}const Tp=Hf(Object.getPrototypeOf,Object);var Ap="[object Object]",Mp=Function.prototype,kp=Object.prototype,Lp=Mp.toString,Dp=kp.hasOwnProperty,Rp=Lp.call(Object);function Np(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}(e,t,n)}var Ip=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Pp(e){return Ip.test(e)}var $p="\\ud800-\\udfff",Bp="["+$p+"]",zp="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Up="\\ud83c[\\udffb-\\udfff]",jp="[^"+$p+"]",Fp="(?:\\ud83c[\\udde6-\\uddff]){2}",Vp="[\\ud800-\\udbff][\\udc00-\\udfff]",Hp="(?:"+zp+"|"+Up+")?",Gp="[\\ufe0e\\ufe0f]?",Wp=Gp+Hp+("(?:\\u200d(?:"+[jp,Fp,Vp].join("|")+")"+Gp+Hp+")*"),qp="(?:"+[jp+zp+"?",zp,Fp,Vp,Bp].join("|")+")",Zp=RegExp(Up+"(?="+Up+")|"+qp+Wp,"g");function Yp(e){return Pp(e)?function(e){return e.match(Zp)||[]}(e):function(e){return e.split("")}(e)}const Kp=function(e){return function(t){var n=Pp(t=gp(t))?Yp(t):void 0,r=n?n[0]:t.charAt(0),i=n?Np(n,1).join(""):t.slice(1);return r[e]()+i}}("toUpperCase");const Xp=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var Qp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var em=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var tm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var nm="\\ud800-\\udfff",rm="\\u2700-\\u27bf",im="a-z\\xdf-\\xf6\\xf8-\\xff",am="A-Z\\xc0-\\xd6\\xd8-\\xde",om="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sm="["+om+"]",lm="\\d+",cm="["+rm+"]",um="["+im+"]",dm="[^"+nm+om+lm+rm+im+am+"]",hm="(?:\\ud83c[\\udde6-\\uddff]){2}",fm="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+am+"]",mm="(?:"+um+"|"+dm+")",gm="(?:"+pm+"|"+dm+")",vm="(?:['’](?:d|ll|m|re|s|t|ve))?",ym="(?:['’](?:D|LL|M|RE|S|T|VE))?",bm="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_m="[\\ufe0e\\ufe0f]?",wm=_m+bm+("(?:\\u200d(?:"+["[^"+nm+"]",hm,fm].join("|")+")"+_m+bm+")*"),Em="(?:"+[cm,hm,fm].join("|")+")"+wm,xm=RegExp([pm+"?"+um+"+"+vm+"(?="+[sm,pm,"$"].join("|")+")",gm+"+"+ym+"(?="+[sm,pm+mm,"$"].join("|")+")",pm+"?"+mm+"+"+vm,pm+"+"+ym,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lm,Em].join("|"),"g");function Sm(e,t,n){return e=gp(e),void 0===(t=n?void 0:t)?function(e){return tm.test(e)}(e)?function(e){return e.match(xm)||[]}(e):function(e){return e.match(em)||[]}(e):e.match(t)||[]}var Om=RegExp("['’]","g");function Cm(e){return function(t){return function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}(Sm(function(e){return(e=gp(e))&&e.replace(Qp,Xp).replace(Jp,"")}(t).replace(Om,"")),e,"")}}const Tm=Cm((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return Kp(gp(e).toLowerCase())}(t):t)}));function Am(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Lh(n))==n?n:0),void 0!==t&&(t=(t=Lh(t))==t?t:0),function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(Lh(e),t,n)}function Mm(e){var t=this.__data__=new sp(e);this.size=t.size}Mm.prototype.clear=function(){this.__data__=new sp,this.size=0},Mm.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mm.prototype.get=function(e){return this.__data__.get(e)},Mm.prototype.has=function(e){return this.__data__.has(e)},Mm.prototype.set=function(e,t){var n=this.__data__;if(n instanceof sp){var r=n.__data__;if(!lp||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new up(r)}return n.set(e,t),this.size=n.size,this};var km="object"==typeof t&&t&&!t.nodeType&&t,Lm=km&&e&&!e.nodeType&&e,Dm=Lm&&Lm.exports===km?nh.Buffer:void 0,Rm=Dm?Dm.allocUnsafe:void 0;function Nm(e,t){if(t)return e.slice();var n=e.length,r=Rm?Rm(n):new e.constructor(n);return e.copy(r),r}function Im(){return[]}var Pm=Object.prototype.propertyIsEnumerable,$m=Object.getOwnPropertySymbols;const Bm=$m?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}($m(e),(function(t){return Pm.call(e,t)})))}:Im;const zm=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ep(t,Bm(e)),e=Tp(e);return t}:Im;function Um(e,t,n){var r=t(e);return vh(e)?r:Ep(r,n(e))}function jm(e){return Um(e,Zf,Bm)}function Fm(e){return Um(e,Xf,zm)}const Vm=Kh(nh,"DataView"),Hm=Kh(nh,"Promise"),Gm=Kh(nh,"Set");var Wm="[object Map]",qm="[object Promise]",Zm="[object Set]",Ym="[object WeakMap]",Km="[object DataView]",Xm=Fh(Vm),Qm=Fh(lp),Jm=Fh(Hm),eg=Fh(Gm),tg=Fh(Xh),ng=hh;(Vm&&ng(new Vm(new ArrayBuffer(1)))!=Km||lp&&ng(new lp)!=Wm||Hm&&ng(Hm.resolve())!=qm||Gm&&ng(new Gm)!=Zm||Xh&&ng(new Xh)!=Ym)&&(ng=function(e){var t=hh(e),n="[object Object]"==t?e.constructor:void 0,r=n?Fh(n):"";if(r)switch(r){case Xm:return Km;case Qm:return Wm;case Jm:return qm;case eg:return Zm;case tg:return Ym}return t});const rg=ng;var ig=Object.prototype.hasOwnProperty;const ag=nh.Uint8Array;function og(e){var t=new e.constructor(e.byteLength);return new ag(t).set(new ag(e)),t}var sg=/\w*$/;var lg=rh?rh.prototype:void 0,cg=lg?lg.valueOf:void 0;function ug(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dg="[object Boolean]",hg="[object Date]",fg="[object Map]",pg="[object Number]",mg="[object RegExp]",gg="[object Set]",vg="[object String]",yg="[object Symbol]",bg="[object ArrayBuffer]",_g="[object DataView]",wg="[object Float32Array]",Eg="[object Float64Array]",xg="[object Int8Array]",Sg="[object Int16Array]",Og="[object Int32Array]",Cg="[object Uint8Array]",Tg="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Mg="[object Uint32Array]";function kg(e,t,n){var r=e.constructor;switch(t){case bg:return og(e);case dg:case hg:return new r(+e);case _g:return function(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case wg:case Eg:case xg:case Sg:case Og:case Cg:case Tg:case Ag:case Mg:return ug(e,n);case fg:return new r;case pg:case vg:return new r(e);case mg:return function(e){var t=new e.constructor(e.source,sg.exec(e));return t.lastIndex=e.lastIndex,t}(e);case gg:return new r;case yg:return function(e){return cg?Object(cg.call(e)):{}}(e)}}function Lg(e){return"function"!=typeof e.constructor||xf(e)?{}:Jh(Tp(e))}var Dg=zf&&zf.isMap;const Rg=Dg?If(Dg):function(e){return fh(e)&&"[object Map]"==rg(e)};var Ng=zf&&zf.isSet;const Ig=Ng?If(Ng):function(e){return fh(e)&&"[object Set]"==rg(e)};var Pg=1,$g=2,Bg=4,zg="[object Arguments]",Ug="[object Function]",jg="[object GeneratorFunction]",Fg="[object Object]",Vg={};function Hg(e,t,n,r,i,a){var o,s=t&Pg,l=t&$g,c=t&Bg;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!Oh(e))return e;var u=vh(e);if(u){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ig.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return ef(e,o)}else{var d=rg(e),h=d==Ug||d==jg;if(Rf(e))return Nm(e,s);if(d==Fg||d==zg||h&&!i){if(o=l||h?{}:Lg(e),!s)return l?function(e,t){return mf(e,zm(e),t)}(e,function(e,t){return e&&mf(t,Xf(t),e)}(o,e)):function(e,t){return mf(e,Bm(e),t)}(e,function(e,t){return e&&mf(t,Zf(t),e)}(o,e))}else{if(!Vg[d])return i?e:{};o=kg(e,d,s)}}a||(a=new Mm);var f=a.get(e);if(f)return f;a.set(e,o),Ig(e)?e.forEach((function(r){o.add(Hg(r,t,n,r,e,a))})):Rg(e)&&e.forEach((function(r,i){o.set(i,Hg(r,t,n,i,e,a))}));var p=u?void 0:(c?l?Fm:jm:l?Xf:Zf)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(p||e,(function(r,i){p&&(r=e[i=r]),pf(o,i,Hg(r,t,n,i,e,a))})),o}Vg[zg]=Vg["[object Array]"]=Vg["[object ArrayBuffer]"]=Vg["[object DataView]"]=Vg["[object Boolean]"]=Vg["[object Date]"]=Vg["[object Float32Array]"]=Vg["[object Float64Array]"]=Vg["[object Int8Array]"]=Vg["[object Int16Array]"]=Vg["[object Int32Array]"]=Vg["[object Map]"]=Vg["[object Number]"]=Vg[Fg]=Vg["[object RegExp]"]=Vg["[object Set]"]=Vg["[object String]"]=Vg["[object Symbol]"]=Vg["[object Uint8Array]"]=Vg["[object Uint8ClampedArray]"]=Vg["[object Uint16Array]"]=Vg["[object Uint32Array]"]=!0,Vg["[object Error]"]=Vg[Ug]=Vg["[object WeakMap]"]=!1;var Gg=1,Wg=4;function qg(e){return Hg(e,Gg|Wg)}function Zg(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new up;++t<n;)this.add(e[t])}function Yg(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Kg(e,t){return e.has(t)}Zg.prototype.add=Zg.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Zg.prototype.has=function(e){return this.__data__.has(e)};var Xg=1,Qg=2;function Jg(e,t,n,r,i,a){var o=n&Xg,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Qg?new Zg:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Yg(t,(function(e,t){if(!Kg(f,t)&&(p===e||i(p,e,n,r,a)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ev(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function tv(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var nv=1,rv=2,iv="[object Boolean]",av="[object Date]",ov="[object Error]",sv="[object Map]",lv="[object Number]",cv="[object RegExp]",uv="[object Set]",dv="[object String]",hv="[object Symbol]",fv="[object ArrayBuffer]",pv="[object DataView]",mv=rh?rh.prototype:void 0,gv=mv?mv.valueOf:void 0;var vv=1,yv=Object.prototype.hasOwnProperty;var bv=1,_v="[object Arguments]",wv="[object Array]",Ev="[object Object]",xv=Object.prototype.hasOwnProperty;function Sv(e,t,n,r,i,a){var o=vh(e),s=vh(t),l=o?wv:rg(e),c=s?wv:rg(t),u=(l=l==_v?Ev:l)==Ev,d=(c=c==_v?Ev:c)==Ev,h=l==c;if(h&&Rf(e)){if(!Rf(t))return!1;o=!0,u=!1}if(h&&!u)return a||(a=new Mm),o||jf(e)?Jg(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case pv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fv:return!(e.byteLength!=t.byteLength||!a(new ag(e),new ag(t)));case iv:case av:case lv:return hf(+e,+t);case ov:return e.name==t.name&&e.message==t.message;case cv:case dv:return e==t+"";case sv:var s=ev;case uv:var l=r&nv;if(s||(s=tv),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=rv,o.set(e,t);var u=Jg(s(e),s(t),r,i,a,o);return o.delete(e),u;case hv:if(gv)return gv.call(e)==gv.call(t)}return!1}(e,t,l,n,r,i,a);if(!(n&bv)){var f=u&&xv.call(e,"__wrapped__"),p=d&&xv.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return a||(a=new Mm),i(m,g,n,r,a)}}return!!h&&(a||(a=new Mm),function(e,t,n,r,i,a){var o=n&vv,s=jm(e),l=s.length;if(l!=jm(t).length&&!o)return!1;for(var c=l;c--;){var u=s[c];if(!(o?u in t:yv.call(t,u)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var f=!0;a.set(e,t),a.set(t,e);for(var p=o;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=o?r(g,m,u,t,e,a):r(m,g,u,e,t,a);if(!(void 0===v?m===g||i(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,i,a))}function Ov(e,t,n,r,i){return e===t||(null==e||null==t||!fh(e)&&!fh(t)?e!=e&&t!=t:Sv(e,t,n,r,Ov,i))}var Cv=1,Tv=2;function Av(e){return e==e&&!Oh(e)}function Mv(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function kv(e){var t=function(e){for(var t=Zf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Av(i)]}return t}(e);return 1==t.length&&t[0][2]?Mv(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var l=(s=n[i])[0],c=e[l],u=s[1];if(o&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Mm;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?Ov(u,c,Cv|Tv,r,d):h))return!1}}return!0}(n,e,t)}}function Lv(e,t){return null!=e&&t in Object(e)}function Dv(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=vp(t,e)).length,a=!1;++r<i;){var o=bp(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&bf(i)&&uf(o,i)&&(vh(e)||Mf(e))}(e,t,Lv)}var Rv=1,Nv=2;function Iv(e){return ep(e)?function(e){return function(t){return null==t?void 0:t[e]}}(bp(e)):function(e){return function(t){return _p(t,e)}}(e)}function Pv(e){return"function"==typeof e?e:null==e?Dh:"object"==typeof e?vh(e)?function(e,t){return ep(e)&&Av(t)?Mv(bp(e),t):function(n){var r=wp(n,e);return void 0===r&&r===t?Dv(n,e):Ov(t,r,Rv|Nv)}}(e[0],e[1]):kv(e):Iv(e)}function $v(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}const Bv=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}();const zv=function(e,t){return function(n,r){if(null==n)return n;if(!_f(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(e,t){return e&&Bv(e,t,Zf)}));function Uv(e,t,n,r){return zv(e,(function(e,i,a){t(r,e,n(e),a)})),r}const jv=function(){return nh.Date.now()};var Fv=Math.max,Vv=Math.min;function Hv(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function m(){var e=jv();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Vv(n,a-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,o)}function v(){var e=jv(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),o}return t=Lh(t)||0,Oh(n)&&(u=!!n.leading,a=(d="maxWait"in n)?Fv(Lh(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?o:g(jv())},v}function Gv(e,t,n){(void 0!==n&&!hf(e[t],n)||void 0===n&&!(t in e))&&df(e,t,n)}function Wv(e){return fh(e)&&_f(e)}function qv(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Zv(e,t,n,r,i,a,o){var s=qv(e,n),l=qv(t,n),c=o.get(l);if(c)Gv(e,n,c);else{var u=a?a(s,l,n+"",e,t,o):void 0,d=void 0===u;if(d){var h=vh(l),f=!h&&Rf(l),p=!h&&!f&&jf(l);u=l,h||f||p?vh(s)?u=s:Wv(s)?u=ef(s):f?(d=!1,u=Nm(l,!0)):p?(d=!1,u=ug(l,!0)):u=[]:function(e){if(!fh(e)||hh(e)!=Ap)return!1;var t=Tp(e);if(null===t)return!0;var n=Dp.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Lp.call(n)==Rp}(l)||Mf(l)?(u=s,Mf(s)?u=function(e){return mf(e,Xf(e))}(s):(!Oh(s)||$h(s))&&(u=Lg(l))):d=!1}d&&(o.set(l,u),i(u,l,r,a,o),o.delete(l)),Gv(e,n,u)}}function Yv(e,t,n,r,i){e!==t&&Bv(t,(function(a,o){if(i||(i=new Mm),Oh(a))Zv(e,t,o,n,Yv,r,i);else{var s=r?r(qv(e,o),a,o+"",e,t,i):void 0;void 0===s&&(s=a),Gv(e,o,s)}}),Xf)}function Kv(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Xv(e,t){var n=-1,r=_f(e)?Array(e.length):[];return zv(e,(function(e,i,a){r[++n]=t(e,i,a)})),r}function Qv(e,t){return(vh(e)?gh:Xv)(e,Pv(t))}var Jv=Object.prototype.hasOwnProperty;const ey=function(e,t){return function(n,r){var i=vh(n)?$v:Uv,a=t?t():{};return i(n,e,Pv(r),a)}}((function(e,t,n){Jv.call(e,n)?e[n].push(t):df(e,n,[t])}));var ty="[object Map]",ny="[object Set]",ry=Object.prototype.hasOwnProperty;function iy(e){if(null==e)return!0;if(_f(e)&&(vh(e)||"string"==typeof e||"function"==typeof e.splice||Rf(e)||jf(e)||Mf(e)))return!e.length;var t=rg(e);if(t==ty||t==ny)return!e.size;if(xf(e))return!qf(e).length;for(var n in e)if(ry.call(e,n))return!1;return!0}function ay(e,t){return Ov(e,t)}const oy=Cm((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),sy=function(e){return vf((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&wf(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}((function(e,t,n){Yv(e,t,n)}));function ly(e,t){var n;return zv(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function cy(e,t,n){var r=vh(e)?Yg:ly;return n&&wf(e,t,n)&&(t=void 0),r(e,Pv(t))}const uy=Gm&&1/tv(new Gm([,-0]))[1]==1/0?function(e){return new Gm(e)}:function(){};var dy=200;function hy(e,t,n){var r=-1,i=sf,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=Kv;else if(a>=dy){var c=t?null:uy(e);if(c)return tv(c);o=!1,i=Kg,l=new Zg}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}const fy=vf((function(e){var t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e);return Wv(t)&&(t=void 0),hy(Op(e,1,Wv,!0),Pv(t))}));function py(e){return e&&e.length?hy(e):[]}var my=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(my||{}),gy=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(gy||{}),vy=(e=>(e.UPDATE="model-update",e))(vy||{}),yy=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(yy||{}),by=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(by||{}),_y=(e=>(e.CHANGE="zoom-domain-change",e))(_y||{}),wy=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(wy||{}),Ey=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Ey||{}),xy=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(xy||{}),Sy=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Sy||{}),Oy=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Oy||{}),Cy=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Cy||{}),Ty=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Ty||{}),Ay=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Ay||{}),My=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(My||{}),ky=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(ky||{}),Ly=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(Ly||{}),Dy=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Dy||{}),Ry=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Ry||{}),Ny=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Ny||{}),Iy=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Iy||{}),Py=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Py||{}),$y=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))($y||{}),By=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(By||{}),zy=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(zy||{}),Uy=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Uy||{}),jy=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(jy||{});const Fy=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:By,Area:xy,Axis:Ey,Bar:Ty,Boxplot:Ay,CanvasZoom:wy,Chart:my,Choropleth:jy,CirclePack:$y,Gauge:Cy,Heatmap:Uy,Legend:Py,Line:ky,Meter:zy,Modal:gy,Model:vy,Pie:Oy,Radar:Ly,Scatter:My,Threshold:Iy,Toolbar:yy,Tooltip:Ny,Tree:Dy,Treemap:Ry,WordCloud:Sy,ZoomBar:by,ZoomDomain:_y},Symbol.toStringTag,{value:"Module"}));var Vy=(e=>(e.HTML="html",e.SVG="svg",e))(Vy||{}),Hy=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Hy||{}),Gy=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(Gy||{}),Wy=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(Wy||{}),qy=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(qy||{}),Zy=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Zy||{}),Yy=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Yy||{}),Ky=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Ky||{}),Xy=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Xy||{}),Qy=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Qy||{}),Jy=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Jy||{}),eb=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(eb||{}),tb=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(tb||{}),nb=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(nb||{}),rb=(e=>(e.CENTER="center",e))(rb||{}),ib=(e=>(e.LEFT="left",e.RIGHT="right",e))(ib||{}),ab=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(ab||{}),ob=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(ob||{}),sb=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(sb||{}),lb=(e=>(e.SEMI="semi",e.FULL="full",e))(lb||{}),cb=(e=>(e.UP="up",e.DOWN="down",e))(cb||{}),ub=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(ub||{}),db=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(db||{}),hb=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(hb||{}),fb=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(fb||{}),pb=(e=>(e.LEFT="left",e.RIGHT="right",e))(pb||{}),mb=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(mb||{}),gb=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(gb||{}),vb=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(vb||{}),yb=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(yb||{}),bb=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(bb||{});const _b="cds",wb={unselected:.05,selected:.4},Eb={number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},xb={reference:"value",compareTo:"marker"},Sb=.1,Ob={rectanglePadding:4},Cb={duration:1e3,ease:wr,zoomLevel:3},Tb={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Ab={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},Mb={radius:4,opacity:{hovered:1,default:.3}},kb={opacity:{hovered:.5,default:.3}},Lb={default:1,thicker:2},Db={defaultBins:10},Rb={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Nb={unselected:.3,selected:1},Ib={selected:2,unselected:1},Pb={paddingRight:5},$b={indicatorSize:16,paddingLeft:15},Bb={paddingLeft:36,paddingRight:24},zb={default:8,proportional:16},Ub=2,jb=-15,Fb=2,Vb=.007,Hb={outerRadiusOffset:3},Gb=30,Wb=20,qb=10,Zb={minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},Yb={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Kb=4,Xb=24,Qb={unfocus:.3,default:.8,selected:1},Jb=16,e_={size:24},t_={horizontalOffset:10},n_={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},r_={height:{[qy.GRAPH_VIEW]:32,[qy.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},i_=[{type:mb.RADIUS,name:"Radius"},{type:mb.AREA,name:"Poor area"},{type:mb.AREA,name:"Satisfactory area"},{type:mb.AREA,name:"Great area"},{type:mb.QUARTILE,name:"Quartiles"}];function a_(e,t){var n;const r=qg(e),i=Object.keys(t.axes||{});null!=(n=null==t?void 0:t.toolbar)&&n.controls&&delete r.toolbar.controls,0===i.length&&delete r.axes;for(const e in r.axes)if(i.includes(e)){const n=t.axes[e];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===Ky.TIME?n.mapsTo="date":e===Ky.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return u_(r,t),sy(r,t)}function o_(e){if(!e)return;const t=e.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!t)return null;if(t[0]){const e=t[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:e[0],ty:e[1]}}return null}function s_(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const e=t[1].split(",");if(e.length>1)return{x:parseFloat(e[0]),y:parseFloat(e[1])}}return{x:0,y:0}}function l_(e,t,n="value",r=!1){const i=e/t.reduce(((e,t)=>e+t[n]),0)*100;return r?i:i%1!=0?parseFloat(i.toFixed(1)):i}function c_(e,t,n){return n>e.length?e:t===Zy.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===Zy.FRONT_LINE?"..."+e.substr(-n):t===Zy.END_LINE?e.substr(0,n)+"...":void 0}function u_(e,t){const n=d_(e,"legend","additionalItems"),r=d_(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),a=n.map((e=>e.type)),o=i_.filter((e=>a.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=o,t.legend.additionalItems=fy(o,r,"name")}}const d_=(e,...t)=>{let n=e;if(n){for(const e of t){if(null===n[e]||void 0===n[e])return null;n=n[e]}return n}return null},h_=(e,t)=>t===Yy.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,f_=(e,t)=>{const{x0:n,x1:r,y0:i,y1:a}=h_(e,t);return`M${n},${i}L${n},${a}L${r},${a}L${r},${i}L${n},${i}`};function p_(e,t,n){return n===Yy.VERTICAL?[e,t]:[t,e]}function m_(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function g_(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var o=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function v_(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o,s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(l,(function(e){return e.test(s)}));return o=e.valueCallback?e.valueCallback(c):c,{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(s.length)}}}function y_(e){return(y_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function __(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function w_(e){__(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===y_(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function E_(e,t){__(2,arguments);var n=w_(e),r=b_(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function x_(e,t){__(2,arguments);var n=w_(e),r=b_(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),a=new Date(n.getTime());return a.setMonth(n.getMonth()+r+1,0),i>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),i),n)}function S_(e,t){__(2,arguments);var n=w_(e).getTime(),r=b_(t);return new Date(n+r)}var O_=36e5;function C_(e,t){return __(2,arguments),S_(e,b_(t)*O_)}var T_={};function A_(){return T_}function M_(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function k_(e){__(1,arguments);var t=w_(e);return t.setHours(0,0,0,0),t}var L_=864e5;var D_=6e4;function R_(e,t){return __(2,arguments),S_(e,b_(t)*D_)}function N_(e,t){return __(2,arguments),S_(e,1e3*b_(t))}function I_(e,t){return __(2,arguments),x_(e,12*b_(t))}function P_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var $_=6e4,B_=36e5;function z_(e){if(__(1,arguments),!function(e){return __(1,arguments),e instanceof Date||"object"===y_(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=w_(e);return!isNaN(Number(t))}function U_(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function j_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=U_(n,r),a=Math.abs(function(e,t){__(2,arguments);var n=k_(e),r=k_(t),i=n.getTime()-M_(n),a=r.getTime()-M_(r);return Math.round((i-a)/L_)}(n,r));n.setDate(n.getDate()-i*a);var o=i*(a-+(U_(n,r)===-i));return 0===o?0:o}function F_(e,t){return __(2,arguments),w_(e).getTime()-w_(t).getTime()}var V_={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},H_="trunc";function G_(e){return e?V_[e]:V_[H_]}function W_(e,t,n){__(2,arguments);var r=F_(e,t)/$_;return G_(null==n?void 0:n.roundingMethod)(r)}function q_(e){__(1,arguments);var t=w_(e);return function(e){__(1,arguments);var t=w_(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){__(1,arguments);var t=w_(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()}function Z_(e,t){__(2,arguments);var n,r=w_(e),i=w_(t),a=P_(r,i),o=Math.abs(function(e,t){__(2,arguments);var n=w_(e),r=w_(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,i));if(o<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*o);var s=P_(r,i)===-a;q_(w_(e))&&1===o&&1===P_(e,i)&&(s=!1),n=a*(o-Number(s))}return 0===n?0:n}function Y_(e,t,n){__(2,arguments);var r=F_(e,t)/1e3;return G_(null==n?void 0:n.roundingMethod)(r)}function K_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=P_(n,r),a=Math.abs(function(e,t){__(2,arguments);var n=w_(e),r=w_(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var o=P_(n,r)===-i,s=i*(a-Number(o));return 0===s?0:s}function X_(e){__(1,arguments);var t=w_(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Q_(e){__(1,arguments);var t=w_(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=X_(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=X_(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function J_(e){__(1,arguments);var t=w_(e),n=X_(t).getTime()-function(e){__(1,arguments);var t=Q_(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),X_(n)}(t).getTime();return Math.round(n/6048e5)+1}function ew(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=A_(),d=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=w_(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function tw(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=w_(e),d=u.getUTCFullYear(),h=A_(),f=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:h.firstWeekContainsDate)&&void 0!==r?r:null===(l=h.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var m=ew(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var v=ew(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function nw(e,t){__(1,arguments);var n=w_(e),r=ew(n,t).getTime()-function(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=A_(),d=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),h=tw(e,t),f=new Date(0);return f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0),ew(f,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function rw(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}const iw=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return rw("yy"===t?r%100:r,t.length)},aw=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):rw(n+1,2)},ow=function(e,t){return rw(e.getUTCDate(),t.length)},sw=function(e,t){return rw(e.getUTCHours()%12||12,t.length)},lw=function(e,t){return rw(e.getUTCHours(),t.length)},cw=function(e,t){return rw(e.getUTCMinutes(),t.length)},uw=function(e,t){return rw(e.getUTCSeconds(),t.length)},dw=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return rw(Math.floor(r*Math.pow(10,n-3)),t.length)};var hw="midnight",fw="noon",pw="morning",mw="afternoon",gw="evening",vw="night";function yw(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=t||"";return n+String(i)+o+rw(a,2)}function bw(e,t){return e%60==0?(e>0?"-":"+")+rw(Math.abs(e)/60,2):_w(e,t)}function _w(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+rw(Math.floor(i/60),2)+n+rw(i%60,2)}const ww={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return iw(e,t)},Y:function(e,t,n,r){var i=tw(e,r),a=i>0?i:1-i;return"YY"===t?rw(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):rw(a,t.length)},R:function(e,t){return rw(Q_(e),t.length)},u:function(e,t){return rw(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rw(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rw(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return aw(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return rw(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=nw(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):rw(i,t.length)},I:function(e,t,n){var r=J_(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):rw(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ow(e,t)},D:function(e,t,n){var r=function(e){__(1,arguments);var t=w_(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):rw(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return rw(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return rw(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return rw(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?fw:0===i?hw:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?gw:i>=12?mw:i>=4?pw:vw,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return sw(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):lw(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):rw(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):rw(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):cw(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):uw(e,t)},S:function(e,t){return dw(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return bw(i);case"XXXX":case"XX":return _w(i);default:return _w(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return bw(i);case"xxxx":case"xx":return _w(i);default:return _w(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yw(i,":");default:return"GMT"+_w(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yw(i,":");default:return"GMT"+_w(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return rw(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return rw((r._originalDate||e).getTime(),t.length)}};var Ew=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xw=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const Sw={p:xw,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Ew(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Ew(i,t)).replace("{{time}}",xw(a,t))}};var Ow=["D","DD"],Cw=["YY","YYYY"];function Tw(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Aw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Mw={date:m_({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m_({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m_({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var kw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const Lw={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:g_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:g_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:g_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:g_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:g_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};var Dw={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:v_({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:v_({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:v_({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:v_({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:v_({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const Rw={code:"en-US",formatDistance:function(e,t,n){var r,i=Aw[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Mw,formatRelative:function(e,t,n,r){return kw[e]},localize:Lw,match:Dw,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Nw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Iw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pw=/^'([^]*?)'?$/,$w=/''/g,Bw=/[a-zA-Z]/;function zw(e,t,n){var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,_;__(2,arguments);var w=String(t),E=A_(),x=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:E.locale)&&void 0!==r?r:Rw,S=b_(null!==(a=null!==(o=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==o?o:null===(d=E.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=b_(null!==(f=null!==(p=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==p?p:null===(b=E.locale)||void 0===b||null===(_=b.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var C=w_(e);if(!z_(C))throw new RangeError("Invalid time value");var T=function(e,t){return __(2,arguments),S_(e,-b_(t))}(C,M_(C)),A={firstWeekContainsDate:S,weekStartsOn:O,locale:x,_originalDate:C};return w.match(Iw).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Sw[t])(e,x.formatLong):e})).join("").match(Nw).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(Pw);return t?t[1].replace($w,"'"):e}(r);var a=ww[i];if(a)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==Cw.indexOf(e)}(r)&&Tw(r,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==Ow.indexOf(e)}(r)&&Tw(r,t,String(e)),a(T,r,x.localize,A);if(i.match(Bw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}function Uw(e,t){return __(2,arguments),E_(e,-b_(t))}function jw(e,t){return __(2,arguments),x_(e,-b_(t))}function Fw(e,t){return __(2,arguments),C_(e,-b_(t))}function Vw(e,t){return __(2,arguments),R_(e,-b_(t))}function Hw(e,t){return __(2,arguments),N_(e,-b_(t))}function Gw(e,t){return __(2,arguments),I_(e,-b_(t))}const Ww={type:Zy.END_LINE,threshold:16,numCharacter:14},qw={enabled:!0,position:Xy.BOTTOM,clickable:!0,truncation:Ww,alignment:Qy.LEFT,order:null,additionalItems:[]},Zw={enabled:!0,showTotal:!0,truncation:Ww,groupLabel:"Group"},Yw={top:{visible:!0,includeZero:!0,truncation:Ww},bottom:{visible:!0,includeZero:!0,truncation:Ww},left:{visible:!0,includeZero:!0,truncation:Ww},right:{visible:!0,includeZero:!0,truncation:Ww}},Kw={addSpaceOnEdges:1,showDayName:!1,localeObject:Rw,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},Xw=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Qw={width:null,height:null,resizable:!0,theme:Hy.WHITE,tooltip:Zw,legend:qw,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:fb.SHOW_AS_DATATABLE},...Xw?[{type:fb.MAKE_FULLSCREEN}]:[],{type:fb.EXPORT_CSV},{type:fb.EXPORT_PNG},{type:fb.EXPORT_JPG}]}},Jw=sy({},Qw,{thematic:{projection:bb.geoNaturalEarth1}}),eE=sy({},Qw,{axes:Yw,timeScale:Kw,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:qy.GRAPH_VIEW}}}),tE=sy({},eE,{bars:{maxWidth:16,spacingFactor:.25},timeScale:sy(Kw,{addSpaceOnEdges:1})}),nE=sy({},tE,{}),rE=sy({},tE,{}),iE=sy({},tE,{bars:sy({},tE.bars,{dividerSize:1.5})}),aE=sy({},tE,{}),oE=sy({},eE,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),sE=oE,lE=sy({},oE,{points:{radius:3,filled:!1,enabled:!0}}),cE=sy({},lE,{timeScale:sy(Kw,{addSpaceOnEdges:0})}),uE=cE,dE=sy({},eE,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[3*t/400,25*t/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:mb.RADIUS,name:"Radius"}]}}),hE=sy({},eE,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:mb.AREA,name:"Poor area"},{type:mb.AREA,name:"Satisfactory area"},{type:mb.AREA,name:"Great area"},{type:mb.QUARTILE,name:"Quartiles"}]}}),fE=sy({},tE,{bars:{dividerSize:1.5},timeScale:sy(Kw,{addSpaceOnEdges:0})}),pE=sy({},Qw,{tooltip:sy({},Zw,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[20*t/400,75*t/400]},wordMapsTo:"word"}}),mE=sy({},Qw,{pie:{labels:{formatter:null,enabled:!0},alignment:Qy.LEFT,sortFunction:null,valueMapsTo:"value"}}),gE=sy({},Qw,{legend:{enabled:!1},gauge:{type:lb.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!=0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:Qy.LEFT}}),vE=sy({},mE,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:Qy.LEFT}}),yE=sy({},Qw,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),bE=sy({},yE,{legend:{enabled:!0}}),_E=sy({},Qw,{radar:{axes:{angle:"key",value:"value"},alignment:Qy.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),wE=sy({},tE,{comboChartTypes:[]}),EE=sy({tree:{type:eb.TREE}},Qw,{}),xE=sy({},Qw,{data:sy(Qw.data,{groupMapsTo:"name"})}),SE=sy({},Qw,Tb,{data:sy(Qw.data,{groupMapsTo:"name"})}),OE=sy({},Qw,{alluvial:{data:sy(Qw.data,{groupMapsTo:"source"}),nodeAlignment:Qy.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),CE=sy({},Qw,{axes:Yw,heatmap:{divider:{state:vb.AUTO},colorLegend:{type:"linear"}}}),TE={alluvialChart:OE,areaChart:cE,axisChart:eE,boxplotChart:aE,bubbleChart:dE,bulletChart:hE,chart:Qw,circlePackChart:SE,choroplethChart:sy({},Jw,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:wE,donutChart:vE,gaugeChart:gE,groupedBarChart:rE,heatmapChart:CE,histogramChart:fE,lineChart:lE,lollipopChart:sE,meterChart:yE,pieChart:mE,proportionalMeterChart:bE,radarChart:_E,scatterChart:oE,simpleBarChart:nE,stackedAreaChart:uE,stackedBarChart:iE,thematicChart:Jw,treeChart:EE,treemapChart:xE,wordCloudChart:pE};var AE=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(AE||{});const ME=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function kE(e,t,n,r,i){const a=0===t,o=2===Number(zw(new Date(e),"c")),s=1===Number(zw(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return a||function(e){const{s:t,m:n,H:r}=DE(e);return 0===r&&0===n&&0===t}(e)||NE(e,l)||IE(e);case"daily":return i?a||o||IE(e):a||NE(e,l)||IE(e);case"weekly":return a||o||IE(e);case"monthly":return a||IE(e);case"quarterly":return a||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function LE(e,t,n,r,i){const a=i.showDayName,o="daily"===r&&a?"weekly":r,s=new Date(e),l=d_(i,"timeIntervalFormats")[o],c=d_(l,"primary"),u=d_(l,"secondary");let d=kE(e,t,n,r,a)?c:u;return"15seconds"===r&&0!==s.getMilliseconds()&&(d=d.replace("pp","h:mm:ss.SSS a")),zw(s,d,{locale:i.localeObject})}function DE(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function RE(e,t){return AE[t]?t:1===e.length?"15seconds":function(e){const t=ME.reduce(((t,[,n],r)=>{const i=ME[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return ME[t][0]}(A(function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e)))}function NE(e,t){return DE(e).M!==DE(t).M}function IE(e){const{M:t,d:n,s:r,m:i,H:a}=DE(e);return 1===t&&1===n&&0===a&&0===i&&0===r}function PE(e){return void 0===e?"":e.toISOString()}class $E{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=d_(t,"data"),a=d_(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),a&&Object.keys(a).forEach((e=>{const t=a[e].mapsTo,r=a[e].scaleType;if((r===Ky.LINEAR||r===Ky.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&a[e].domain)if(r===Ky.LABELS)n=n.filter((n=>a[e].domain.includes(n[t])));else{const[r,i]=a[e].domain;n=n.filter((e=>!(t in e)||e[t]>=r&&e[t]<=i))}})),n.filter((e=>r.find((t=>t.name===e[i]))))}getDisplayData(e){if(!this.get("data"))return null;const{ACTIVE:t}=Rb.items.status,n=this.getDataGroups(e),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(e).filter((e=>n.find((n=>n.name===e[r]&&n.status===t))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(e){const t=this.sanitize(qg(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return d_(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Rb.items.status;return this.getDataGroups(e).filter((e=>e.status===t))}getDataGroupNames(e){return this.getDataGroups(e).map((e=>e.name))}getActiveDataGroupNames(e){return this.getActiveDataGroups(e).map((e=>e.name))}aggregateBinDataByGroup(e){return ey(e,"group")}getBinConfigurations(){const e=this.getDisplayData(),t=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),i=t.axes[n],{groupMapsTo:a}=t.data,{bins:o=Db.defaultBins}=i,s=Array.isArray(o),l=C().value((e=>e[r])).thresholds(o)(e);if(s)l[l.length-1].x1=o[o.length-1];else{const e=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+e}const c=s?[o[0],o[o.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[a])))),d=[];return l.forEach((e=>{const t=`${e.x0}-${e.x1}`,n=this.aggregateBinDataByGroup(e);u.forEach((r=>{d.push({group:r,key:t,value:n[r]||0,bin:e.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:r});return Xd().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const a=e[i];return a[t]=n[r],a}))))}getGroupedData(e){const t=this.getDisplayData(e),n={},{groupMapsTo:r}=this.getOptions().data;return t.map((e=>{const t=e[r];null!==n[t]&&void 0!==n[t]?n[t].push(e):n[t]=[e]})),Object.keys(n).map((e=>({name:e,data:n[e]})))}getStackKeys({bins:e=null,groups:t=null}={bins:null,groups:null}){const n=this.getOptions(),r=this.getDisplayData(t);let i;i=e?e.map((e=>`${e.x0}-${e.x1}`)):py(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?PE(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const a=this.services.cartesianScales.domainAxisPosition,o=n.axes[a].scaleType;return o===Ky.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(o===Ky.LOG||o===Ky.LINEAR)&&i.sort(((e,t)=>e-t)),i}getDataValuesGroupedByKeys({bins:e=null,groups:t=null}){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getDisplayData(t),a=this.getDataGroupNames(),o=this.getStackKeys({bins:e,groups:t});return e?o.map((t=>{const[n,i]=t.split("-"),o={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return a.forEach((e=>{o[e]=s.filter((t=>t[r]===e)).length})),o})):o.map((e=>{const t={sharedStackKey:e};return a.forEach((n=>{const a=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?PE(t[i])===e:t[i].toString()===e)})),o=this.services.cartesianScales.getRangeIdentifier(t);t[n]=a?a[o]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,a=this.getActiveDataGroupNames(t),o=this.getDataValuesGroupedByKeys({groups:t});if(e){const e=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(o.map((e=>[e.sharedStackKey,0])));o.forEach((t=>{a.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),o.forEach((t=>{a.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Xd().offset(Qd):Xd()).keys(a)(o).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=a[t],r}))))}getOptions(){return this.state.options}set(e,t){this.state=Object.assign({},this.state,e);const n=Object.assign({skipUpdate:!1,animate:!0},t);n.skipUpdate||this.update(n.animate)}get(e){return e?this.state[e]:this.state}setOptions(e){const t=this.getOptions();u_(t,e),this.set({options:sy(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(Fy.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Rb.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),a=r.filter((e=>e.status===t));if(i)if(1===a.length&&a[0].name===e)r.forEach(((e,n)=>{r[n].status=t}));else{const i=r.findIndex((t=>t.name===e));r[i].status=r[i].status===n?t:n}else r.forEach(((i,a)=>{r[a].status=i.name===e?t:n}));const o=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=o.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(Fy.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(e,t,n,r){const i=this.getOptions();return i.getIsFilled?i.getIsFilled(e,t,n,r):r}getFillColor(e,t,n){const r=this.getOptions(),i=d_(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=d_(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=d_(this.getOptions(),"color","scale"),t=this.getDataGroups();return null!=e&&0!=Object.keys(e).length&&t.some((t=>Object.keys(e).includes(t.name)))}getColorClassName(e){const t=this.colorClassNames(e.dataGroupName);let n=e.originalClassName;return e.classNameTypes.forEach((r=>n=e.originalClassName?`${n} ${r}-${t}`:`${r}-${t}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(e){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let a;const o=d_(e,"label");if(null===o){a=d_(r,i)||"Ungrouped"}else a=o;const s={group:a,key:r[i]};isNaN(n)?(s.value=n.value,s.date=n.date):s.value=n,t.push(s)}))})),t}getTabularDataArray(){return[]}exportToCSV(){const e=this.getTabularDataArray().map((e=>e.map((e=>`"${"–"===e?"–":e}"`))));let t="",n="";e.forEach((function(r,i){n=r.join(","),t+=i<e.length?n+"\n":n}));const r=this.getOptions();let i="myChart";const a=d_(r,"fileDownload","fileName");"function"==typeof a?i=a("csv"):"string"==typeof a&&(i=a),this.services.files.downloadCSV(t,`${i}.csv`)}getTabularData(e){return Array.isArray(e)?e:this.transformToTabularData(e)}sanitize(e){return this.getTabularData(e)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((e=>{-1===this.allDataGroups.indexOf(e)&&this.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(e){const{groupMapsTo:t}=this.getOptions().data,{ACTIVE:n,DISABLED:r}=Rb.items.status,i=this.getOptions(),a=py(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>a.includes(e)))||(i.data.selectedGroups=[]));const o=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return a.map((e=>({name:e,status:o(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=d_(e,"color","scale");Object.keys(t).forEach((e=>{this.allDataGroups.includes(e)||console.warn(`"${e}" does not exist in data groups.`)})),this.allDataGroups.filter((e=>t[e])).forEach((e=>this.colorScale[e]=t[e]))}setColorClassNames(){const e=d_(this.getOptions(),"color","pairing");let t=d_(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=d_(e,"option");const r=t>5?14:t;n=n<=Ab[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=Us().range(i).domain(this.allDataGroups)}}const BE=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4)}${e}`)})();function zE(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function UE(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function jE(e){const t=UE(e,"border-left-width"),n=UE(e,"border-right-width");return e.clientWidth+t+n}function FE(e){const t=UE(e,"border-top-width"),n=UE(e,"border-bottom-width");return e.clientHeight+t+n}function VE(e,t={}){return{width:t.width||jE(e),height:t.height||FE(e)}}const HE=16384;function GE(e){return new Promise(((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e}))}async function WE(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),async function(e){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(e))).then(encodeURIComponent).then((e=>`data:image/svg+xml;charset=utf-8,${e}`))}(i)}const qE=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||qE(n,t))};function ZE(e,t,n){const r=`.${e}:${t}`,i=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return zE(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}function YE(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const a=BE();try{t.className=`${t.className} ${a}`}catch{return}const o=document.createElement("style");o.appendChild(ZE(a,n,r)),t.appendChild(o)}const KE="application/font-woff",XE="image/jpeg",QE={woff:KE,woff2:KE,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:XE,jpeg:XE,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function JE(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return QE[t]||""}function ex(e){return-1!==e.search(/^(data:)/)}function tx(e,t){return`data:${t};base64,${e}`}async function nx(e,t,n){const r=await fetch(e,t);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise(((e,t)=>{const a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)}))}const rx={};async function ix(e,t,n){const r=function(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}(e,t,n.includeQueryParams);if(null!=rx[r])return rx[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{i=tx(await nx(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n)))),t)}catch(t){i=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${e}`;t&&(r="string"==typeof t?t:t.message),r&&console.warn(r)}return rx[r]=i,i}async function ax(e,t){return qE(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):GE(t)}(e):qE(e,HTMLVideoElement)?async function(e,t){if(e.currentSrc){const t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==n||n.drawImage(e,0,0,t.width,t.height),GE(t.toDataURL())}const n=e.poster,r=JE(n);return GE(await ix(n,r,t))}(e,t):qE(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await lx(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}const ox=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();function sx(e,t){return qE(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):zE(r).forEach((i=>{let a=r.getPropertyValue(i);"font-size"===i&&a.endsWith("px")&&(a=Math.floor(parseFloat(a.substring(0,a.length-2)))-.1+"px"),qE(e,HTMLIFrameElement)&&"display"===i&&"inline"===a&&(a="block"),"d"===i&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(i,a,r.getPropertyPriority(i))}))}(e,t),function(e,t){YE(e,t,":before"),YE(e,t,":after")}(e,t),function(e,t){qE(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),qE(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(qE(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}async function lx(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>ax(e,t))).then((n=>async function(e,t,n){var r,i;let a=[];return a=ox(e)&&e.assignedNodes?zE(e.assignedNodes()):qE(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?zE(e.contentDocument.body.childNodes):zE((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===a.length||qE(e,HTMLVideoElement)||await a.reduce(((e,r)=>e.then((()=>lx(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>sx(e,t))).then((e=>async function(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===n.length)return e;const r={};for(let i=0;i<n.length;i++){const a=n[i].getAttribute("xlink:href");if(a){const n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await lx(i,t,!0))}}const i=Object.values(r);if(i.length){const t="http://www.w3.org/1999/xhtml",n=document.createElementNS(t,"svg");n.setAttribute("xmlns",t),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(t,"defs");n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}(e,t))):null}const cx=/url\((['"]?)([^'"]+?)\1\)/g,ux=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,dx=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;async function hx(e,t,n,r,i){try{const a=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}(t,n):t,o=JE(t);let s;return s=i?tx(await i(a),o):await ix(a,o,r),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}function fx(e){return-1!==e.search(cx)}async function px(e,t,n){if(!fx(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace(dx,(e=>{for(;;){const[n,,r]=ux.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(cx,((e,n,r)=>(t.push(r),e))),t.filter((e=>!ex(e)))}(r).reduce(((e,r)=>e.then((e=>hx(e,r,t,n)))),Promise.resolve(r))}async function mx(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await px(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function gx(e,t){qE(e,Element)&&(await async function(e,t){await mx("background",e,t)||await mx("background-image",e,t),await mx("mask",e,t)||await mx("mask-image",e,t)}(e,t),await async function(e,t){const n=qE(e,HTMLImageElement);if((!n||ex(e.src))&&(!qE(e,SVGImageElement)||ex(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await ix(r,JE(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const a=e;a.decode&&(a.decode=t),"lazy"===a.loading&&(a.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=zE(e.childNodes).map((e=>gx(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const vx={};async function yx(e){let t=vx[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},vx[e]=t),t}async function bx(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let a=i.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),nx(a,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function _x(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=r.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(r,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=i.exec(n);if(null===e){if(e=a.exec(n),null===e)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function wx(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=zE(e.ownerDocument.styleSheets);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>fx(e.style.getPropertyValue("src"))))}(await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{zE(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1;const o=yx(e.href).then((e=>bx(e,t))).then((e=>_x(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?a+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})))).catch((e=>{console.error("Error loading remote css",e.toString())}));r.push(o)}}))}catch(i){const a=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(yx(n.href).then((e=>bx(e,t))).then((e=>_x(e).forEach((e=>{a.insertRule(e,n.cssRules.length)})))).catch((e=>{console.error("Error loading remote stylesheet",e)}))),console.error("Error inlining remote css file",i)}})),Promise.all(r).then((()=>(e.forEach((e=>{if("cssRules"in e)try{zE(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t))}async function Ex(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await wx(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return px(e.cssText,n,t)})))).join("\n")}(e,t);if(n){const t=document.createElement("style"),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function xx(e,t={}){const{width:n,height:r}=VE(e,t),i=await lx(e,t,!0);return await Ex(i,t),await gx(i,t),function(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;null!=r&&Object.keys(r).forEach((e=>{n[e]=r[e]}))}(i,t),await WE(i,n,r)}async function Sx(e,t={}){const{width:n,height:r}=VE(e,t),i=await xx(e,t),a=await GE(i),o=document.createElement("canvas"),s=o.getContext("2d"),l=t.pixelRatio||function(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}(),c=t.canvasWidth||n,u=t.canvasHeight||r;return o.width=c*l,o.height=u*l,t.skipAutoScale||function(e){(e.width>HE||e.height>HE)&&(e.width>HE&&e.height>HE?e.width>e.height?(e.height*=HE/e.width,e.width=HE):(e.width*=HE/e.height,e.height=HE):e.width>HE?(e.height*=HE/e.width,e.width=HE):(e.width*=HE/e.height,e.height=HE))}(o),o.style.width=`${c}`,o.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}class Ox{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}}class Cx extends Ox{constructor(e,t){super(e,t),this.chartID=""}static getHTMLElementSize(e){return{width:e.clientWidth,height:e.clientHeight}}static getSVGElementSize(e,t={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){e.attr||(e=ht(e));const n={width:0,height:0},r=e=>{e&&Object.keys(n).forEach((t=>{if(e[t]){const r=e[t],i=parseFloat(r);r&&i>n[t]&&-1===(""+r).indexOf("%")&&(n[t]=i)}}))},i={width:e.attr("width"),height:e.attr("height")},a=e.node();let o,s,l,c,u;try{"function"==typeof a.getBBox&&(o=a.getBBox(),s={width:o.width,height:o.height})}catch(e){console.error(e)}try{"function"==typeof(null==a?void 0:a.getBoundingClientRect)&&(l=a.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(a instanceof SVGSVGElement&&(u={width:a.clientWidth,height:a.clientHeight}),t){if(t.useAttrs&&(r(i),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(r(u),n.width>0&&n.height>0))return u;if(t.useBBox&&(r(s),n.width>0&&n.height>0))return s;if(t.useBoundingRect&&(r(c),n.width>0&&n.height>0))return c}try{r({width:d_(e.node(),"width","baseVal","value"),height:d_(e.node(),"height","baseVal","value")})}catch{r(u),r(s),r(i)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let n,r,i=t.split("#");return 2===i.length?(n=i[0],i=i[1].split("."),r=i[0]):(i=t.split("."),n=i[0]),e.append(n).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(e){return`chart-${this.chartID}-${e}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const e=this.model.getOptions(),t=d_(e,"style","prefix"),n=ht(this.getHolder()).append("div").classed(`${_b}--${t}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const e=this.getHolder(),{width:t,height:n,theme:r}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),ht(this.getHolder()).classed(`${_b}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=ht(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Sx(e,t)).toDataURL("image/jpeg",t.quality||1)}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let a="myChart";const o=d_(t,"fileDownload","fileName");"function"==typeof o?a=o("jpg"):"string"==typeof o&&(a=o),null==(i=e.services.files)||i.downloadImage(r,`${a}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=ht(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Sx(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let a="myChart";const o=d_(t,"fileDownload","fileName");"function"==typeof o?a=o("png"):"string"==typeof o&&(a=o),null==(i=e.services.files)||i.downloadImage(r,`${a}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}toggleFullscreen(){const e=this.getHolder();ht(e).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const e=ht(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=Cx.getSVGElementSize(ht(this.mainContainer),{useBBox:!0}),t=ht(this.mainContainer).attr("class"),n=ht(this.mainContainer).selectAll(`.${t} > svg`);let r=0;n.nodes().forEach((function(e){r+=Number(Cx.getSVGElementSize(ht(e),{useBBox:!0}).height)})),r<=e?ht(this.mainContainer).attr("height",r):ht(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&ht(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(Fy.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(Fy.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=Hv((()=>{var r;e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,null==(r=this.services.events)||r.dispatchEvent(Fy.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}}class Tx{constructor(e,t,n){if(this.type="",this.renderType=Vy.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=d_(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent(ht(this.services.domUtils.getMainContainer()))}init(){}render(e=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(e){this.model=e}setServices(e){this.services=e}setParent(e){var t;const n=this.parent;if(this.parent=e,(!n||n.node()!==e.node())&&this.type){const e=d_(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${_b}--${e}--${this.type}`,!0),n&&n.classed(`${_b}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={withinChartClip:!1}){if(this.type){const t=d_(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Cx.appendOrSelect(this.parent,`${this.renderType===Vy.SVG?"svg":"div"}${n}.${_b}--${t}--${this.type}`);if(e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=ht(`#${e}`).select("rect");0!==t.size()&&parseFloat(t.attr("height"))>0&&r.attr("clip-path",`url(#${e})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?sy({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const Ax=class e extends Tx{constructor(){super(...arguments),this.type="toolbar",this.renderType=Vy.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(Fy.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(Fy.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(d_(this.getOptions(),"data","loading"))t.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=t.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:e,overflowMenuItemList:n}=this.getControlConfigs();n&&e.push(this.getOverflowButtonConfig());const r=t.selectAll("div.toolbar-control").data(e,(e=>e.id));r.exit().remove();const i=r.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),a=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).attr("aria-label",(e=>e.title)).html((e=>`\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${e.id}`)}" aria-label="${e.title}">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t${e.iconSVG.content}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){ht(this).select("svg").style("will-change","transform").style("width",void 0!==e.iconSVG.width?e.iconSVG.width:"20px").style("height",void 0!==e.iconSVG.height?e.iconSVG.height:"20px"),ht(this).select("button").on("click",(t=>{e.shouldBeDisabled()||a.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),a.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?a.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&a.focusOnNextEnabledToolbarItem(t)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:e}=this.getControlConfigs(),t=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(e=>d_(e,"id")));t.exit().remove();const n=t.enter().append("li").attr("id",(e=>this.services.domUtils.generateElementIDString(`control-${e.id}`))).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(t).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).selectAll("button").text((e=>e.text))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(e){this.overflowMenu&&(this.overflowMenu.classed("is-open",e),this.overflowButton&&(this.overflowButton.attr("aria-expanded",e),ht(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(Fy.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(Fy.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=ht(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnNextEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=ht(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnPreviousEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=ht(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}focusOnNextEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=ht(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}toggleOverflowMenu(e){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const t=this;this.getOverflowMenuItems().forEach(((n,r)=>{const i=ht(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(a=>{a&&"Enter"===a.key?t.triggerFunctionAndEvent(n,e,i.node()):a&&"ArrowUp"===a.key?t.focusOnPreviousEnabledMenuItem(r):a&&"ArrowDown"===a.key?t.focusOnNextEnabledMenuItem(r):a&&"Escape"===a.key&&t.updateOverflowMenu(!1),a.preventDefault()})))})),t.focusOnNextEnabledMenuItem(-1)}e&&e.stopImmediatePropagation()}triggerFunctionAndEvent(e,t,n){"function"==typeof e.shouldBeDisabled&&e.shouldBeDisabled()||("function"==typeof e.clickFunction&&e.clickFunction(t),this.services.events.dispatchEvent(Fy.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=d_(this.getOptions(),"toolbar","numberOfIcons")-1,n=d_(this.getOptions(),"toolbar","controls"),r=[],i=[],a=[];return n.forEach((n=>{let o=null;n.type===fb.CUSTOM?(null===d_(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===d_(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),o=n):o=this.getControlConfigByType(n.type),o&&(o.text=n.text?n.text:n.type,-1!==o.id.indexOf("toolbar-export")?r.push(o):i.length<t?null===d_(o,"iconSVG","content")?a.push(o):i.push(o):a.push(o))})),a.push(...r),a.length?{buttonList:i,overflowMenuItemList:a}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:e,overflowMenuItemList:t}=this.getControlConfigs();return t&&e.push(this.getOverflowButtonConfig()),e||[]}getOverflowMenuItems(){const{overflowMenuItemList:e}=this.getControlConfigs();return e||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:()=>!1,iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:e=>this.toggleOverflowMenu(e)}}getControlConfigByType(e){const t=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData();let r;switch(e){case fb.ZOOM_IN:t&&(r={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case fb.ZOOM_OUT:t&&(r={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case fb.RESET_ZOOM:t&&(r={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case fb.MAKE_FULLSCREEN:r={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case fb.SHOW_AS_DATATABLE:r={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:"Show as table",shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(Fy.Modal.SHOW)};break;case fb.EXPORT_CSV:r={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case fb.EXPORT_PNG:r={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case fb.EXPORT_JPG:r={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return r}getControlIconByType(e){switch(e){case fb.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case fb.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case fb.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case fb.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case fb.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case fb.EXPORT_CSV:case fb.EXPORT_JPG:case fb.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+e)}}};Ax.buttonID=0;let Mx=Ax;const kx=class e extends Tx{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=e.instanceID++,this.init()}init(){this.children.forEach((e=>{e.components.forEach((e=>{e.init()}))}))}getPreferedAndFixedSizeSum(){const e=this.parent;let t=0;return e.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>{const t=d_(e,"growth");return t===nb.PREFERRED||t===nb.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>d_(e,"growth")===nb.STRETCH)).size()}render(e=!0){const t=this.parent,{width:n,height:r}=Cx.getHTMLElementSize(t.node()),i=this.configs.direction===tb.ROW||this.configs.direction===tb.ROW_REVERSE,a=d_(this.model.getOptions(),"style","prefix"),o=t.classed(`${_b}--${a}--layout-row`,this.configs.direction===tb.ROW).classed(`${_b}--${a}--layout-row-reverse`,this.configs.direction===tb.ROW_REVERSE).classed(`${_b}--${a}--layout-column`,this.configs.direction===tb.COLUMN).classed(`${_b}--${a}--layout-column-reverse`,this.configs.direction===tb.COLUMN_REVERSE).classed(`${_b}--${a}--layout-alignitems-center`,this.configs.alignItems===rb.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));o.enter().append("div").merge(t.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(t){t.components.forEach((n=>{const r=ht(this),i=d_(t,"renderType")===Vy.SVG;n.setParent(i?Cx.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r);const a=d_(t,"growth");(a===nb.PREFERRED||a===nb.FIXED)&&n.render(e)}))})),t.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=d_(e,"growth"),a=d_(e,"renderType")===Vy.SVG?Cx.getSVGElementSize(ht(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Cx.getHTMLElementSize(this);if(t===nb.PREFERRED){const t=i?a.width:a.height,o=i?n:r;e.size=t/o*100}})),o.exit().remove(),this.children.filter((e=>d_(e,"growth")===nb.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const s=t.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));i?s.style("width",(e=>e.size/100*n+"px")).style("height","100%"):s.style("height",(e=>e.size/100*r+"px")).style("width","100%"),s.each((function(t){t.components.forEach((n=>{d_(t,"growth")===nb.STRETCH&&n.render(e)}))}))}setModel(e){super.setModel(e),this.children.forEach((t=>{t.components.forEach((t=>t.setModel(e)))}))}setServices(e){super.setServices(e),this.children.forEach((t=>{t.components.forEach((t=>t.setServices(e)))}))}destroy(){this.children.forEach((e=>{e.components.forEach((e=>e.destroy()))}))}};kx.instanceID=Math.floor(99999999999*Math.random());let Lx=kx;class Dx extends Tx{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer().style("width",`${this.configs.size||e_.size}px`).style("height",`${this.configs.size||e_.size}px`).attr("opacity",0)}}var Rx="bx",Nx="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ";function Ix(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Px(e){return function(e){if(Array.isArray(e))return $x(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return $x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $x(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bx(e){return e.reduce((function(e,t){return Array.isArray(t)?e.push.apply(e,Px(Bx(t))):e.push(t),e}),[])}function zx(e){return(zx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ux(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jx(e,t){return(jx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hx(e);if(t){var i=Hx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vx(e)}(this,n)}}function Vx(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hx(e){return(Hx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gx(e){return(Gx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qx(){return qx=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kx(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qx.apply(this,arguments)}function Zx(e,t){return(Zx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Kx(e);if(t){var i=Kx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Gx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Kx(e){return(Kx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function Qx(e){return(Qx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jx(e){return function(e){if(Array.isArray(e))return eS(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eS(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nS(e,t){return(nS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=iS(e);if(t){var i=iS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function iS(e){return(iS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aS(e,t){var n=e.target,r=e.currentTarget;if("function"==typeof n.matches){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var i=n.closest(t);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function oS(e){if(!e||"function"==typeof e)return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function sS(e){return(sS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cS(e,t){return(cS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=dS(e);if(t){var i=dS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===sS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function dS(e){return(dS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hS(e){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pS(e,t){return(pS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=gS(e);if(t){var i=gS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function gS(e){return(gS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vS(e){return(vS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_S(e,t)}function _S(e,t){return(_S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=ES(e);if(t){var i=ES(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function ES(e){return(ES=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const xS=function(e){bS(n,e);var t=wS(n);function n(e,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(i=t.call(this,e,r))._handleFocusinListener=void 0,i._handleKeydownListener=void 0,i._handleFocusin=function(e){var t=i.element.querySelector(i.options.selectorModalContainer)||i.element;i.element.classList.contains(i.options.classVisible)&&!t.contains(e.target)&&i.options.selectorsFloatingMenus.every((function(t){return!aS(e,t)}))&&i.element.querySelector(Nx).focus()},i._hookCloseActions(),i}return function(e,t,n){t&&yS(e.prototype,t),n&&yS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"createdByLauncher",value:function(e){this.show(e)}},{key:"shouldStateBeChanged",value:function(e){return"shown"===e?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(e,t,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===e){var a="onfocusin"in this.element.ownerDocument.defaultView,o=a?"focusin":"focus";this._handleFocusinListener=this.manage(Xx(this.element.ownerDocument,o,this._handleFocusin,!a))}"hidden"===e?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===e&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Xx(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===e&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(Nx)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var e=this;this.manage(Xx(this.element,"click",(function(t){var n=aS(t,e.options.selectorModalClose);n&&(t.delegateTarget=n),(n||t.target===e.element)&&e.hide(t)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Xx(this.element.ownerDocument.body,"keydown",(function(t){27===t.which&&e.shouldStateBeChanged("hidden")&&(t.stopPropagation(),e.hide(t))})))}}],[{key:"options",get:function(){var e=Rx;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(e,"--overflow-menu-options"),".".concat(e,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(e,"--modal-container"),classVisible:"is-visible",classBody:"".concat(e,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bx(t).reduce((function(e,t){return t(e)}),function(e,t,n){return t&&Ix(e.prototype,t),n&&Ix(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)})))}((function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jx(e,t)}(n,e);var t=Fx(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e,i)).children=[],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return r.element=e,r.options=Object.assign(Object.create(r.constructor.options),i),r.constructor.components.set(r.element,Vx(r)),r}return function(e,t,n){t&&Ux(e.prototype,t),n&&Ux(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"release",value:function(){for(var e=this.children.pop();e;e=this.children.pop())e.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(e,t){return this.components.get(e)||new this(e,t)}}]),n}(e);return t}),(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pS(e,t)}(n,e);var t=mS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&fS(e.prototype,t),n&&fS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,null,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Xx(t,i,(function(t){var i=aS(t,"[".concat(r.attribInitTarget,"]"));if(i){t.delegateTarget=i;var a=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(a.length>1)throw new Error("Target widget must be unique.");if(1===a.length){"A"===i.tagName&&t.preventDefault();var o=e.create(a[0],n);"function"==typeof o.createdByLauncher&&o.createdByLauncher(t)}}}))}));return{release:function(){for(var e=i.pop();e;e=i.pop())e.release()}}}return this.create(t,n),""}}]),n.forLazyInit=!0,n}(e);return t}),[function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nS(e,t)}(n,e);var t=rS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&tS(e.prototype,t),n&&tS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,a=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,o="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,a)){var s={group:a&&a.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(""),c=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:a}),u=a&&a.delegatorNode||this.element;if(u.dispatchEvent(c)){var d=[i,a].filter(Boolean);this._changeState.apply(this,Jx(d).concat([function(){u.dispatchEvent(new CustomEvent(e.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:a})),o&&o()}]))}else if(o){var h=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));h.canceled=!0,o(h)}}else o&&o(null,!0)}}]),n}(e);return t},function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cS(e,t)}(n,e);var t=uS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&lS(e.prototype,t),n&&lS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"show",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("shown",oS(e),t)}},{key:"hide",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("hidden",oS(e),t)}}]),n}(e);return t}],(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zx(e,t)}(n,e);var t=Yx(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).handles=new Set,e}return function(e,t,n){t&&Wx(e.prototype,t),n&&Wx(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"manage",value:function(e){return this.handles.add(e),e}},{key:"unmanage",value:function(e){return this.handles.delete(e),e}},{key:"release",value:function(){var e=this;return this.handles.forEach((function(t){t.release(),e.handles.delete(t)})),qx(Kx(n.prototype),"release",this).call(this)}}]),n}(e);return t})));class SS extends Tx{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),xS.create(this.modal.node()).show()},this.init()}addEventListeners(){this.services.events.addEventListener(Fy.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(Fy.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.model.getOptions(),t=d_(e,"style","prefix"),n=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">${e.title}</p>\n\n\t\t\t\t<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t${wp(n,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">${e}</div>\n\t\t\t\t\t\t\t</th>`)).join("")}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>${n.slice(1).map((e=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${e.map((e=>`<td>${e}</td>`)).join("")}\n\t\t\t\t\t\t\t</tr>`)).join("")}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer cds--modal-footer">\n\t\t\t <div class="${_b}--${t}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=ht(this.services.domUtils.getHolder()),n=d_(t,"style","prefix");this.modal=Cx.appendOrSelect(e,`div.${_b}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class OS extends Tx{constructor(){super(...arguments),this.type="title",this.renderType=Vy.HTML}render(e=!1){const t=this.getComponentContainer(),n=d_(this.getOptions(),"title"),r=t.selectAll("p.title").data([n]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html((e=>e)),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}r.exit().remove()}truncateTitle(e,t){if(t<=0)return;const n=e.text();if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");const r=Cx.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),a=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,a-1)).append("tspan").text("...");const o=this;e.on("mouseover",(function(t){o.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){o.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){o.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Cx.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(e,t,n,r){const i=Math.floor((n+t)/2);return e.getSubStringLength(0,i)>r?this.getSubstringIndex(e,t,i,r):e.getSubStringLength(0,i)<r?e.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(e,i,n,r):i}}var CS,TS,AS=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(AS||{});class MS extends Tx{constructor(){super(...arguments),this.type="legend",this.renderType=Vy.HTML}render(e=!1){const t=this.getOptions(),n=d_(t,"legend"),r=d_(n,"alignment"),i=d_(t,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Rb.items.status,s=a.some((e=>e.status===o)),l=d_(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===Qy.CENTER).classed("right-aligned",r===Qy.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",AS.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));const u=c.selectAll("div.legend-item").data(a,(e=>e.name)),d=u.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(e){return e.status===Rb.items.status.ACTIVE}));const h=d_(this.getOptions(),"legend","clickable");c.classed("clickable",h&&a.length>1);const f=Rb.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",AS.CHECKBOX).attr("tabindex",h?0:-1).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${t}-title`))).attr("aria-checked",(({status:e})=>e===Rb.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Rb.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Rb.items.status.ACTIVE}));p.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),d.append("p").merge(u.select("p"));const g=d_(t,"legend","additionalItems");if(g&&a.length){const e=this,t=c.selectAll("div.additional-item").data(g);t.exit().remove();const n=t.enter().append("div").merge(t).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+t}-title`)));n.selectAll("*").remove();let r,i=1;n.append("svg").classed("icon",!0).each((function(t){const n=ht(this);r&&r==t.type?i++:(r=t.type,i=1),e.addAdditionalItem(n,t,i)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),h&&d.size()>1&&this.addEventListeners()}sortDataGroups(e,t){if(e.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))),t.length<e.length){const n=e.length-t.length;return e.slice(n).concat(e.slice(0,n))}return e}addAdditionalItem(e,t,n){const{width:r,height:i}=Rb.area;if(t.type===mb.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===mb.RADIUS){const{iconData:n,fill:r,stroke:i}=Rb.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",AS.IMG).attr("aria-label","radius").attr("cx",(e=>e.cx)).attr("cy",(e=>e.cy)).attr("r",(e=>e.r)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i)}else if(t.type===mb.LINE){const i=Rb.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",AS.IMG).attr("aria-label","line").attr("x1",0).attr("y1",i.yPosition).attr("x2",r).attr("y2",i.yPosition).style("stroke",t.stroke?t.stroke:i.stroke).style("stroke-width",i.strokeWidth)}else if(t.type===mb.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",AS.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Rb.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===mb.SIZE){const{iconData:n,fill:r,stroke:i}=Rb.size;e.attr("fill","none").attr("role",AS.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(e=>e.width)).attr("height",(e=>e.height)).attr("y",(()=>0)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i).style("stroke-width",1)}else if(t.type===mb.QUARTILE){const{iconData:t}=Rb.quartile;e.selectAll("rect").attr("role",AS.IMG).attr("aria-label","quartile").data(t).enter().append("rect").attr("class",((e,t)=>"quartile-"+(0===t?"wrapper":"line"))).attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height))}else if(t.type===mb.ZOOM){const{iconData:n,color:r}=d_(Rb,"zoom"),i=e.attr("role",AS.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();i.append("g").attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height)).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(()=>t.color?t.color:r)),i.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(()=>t.color?t.color:r))}}truncateLegendText(){const e=this.getComponentContainer(),t=d_(this.getOptions(),"legend","truncation"),n=d_(t,"type"),r=d_(t,"threshold"),i=d_(t,"numCharacter"),a=e.selectAll("div.legend-item p");a.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==Zy.NONE?a.html((function(e){return e.name.length>r&&e.name.length!==i?c_(e.name,n,i):e.name})):a.html((e=>e.name))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=d_(n,"legend"),i=d_(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(Fy.Legend.ITEM_HOVER,{hoveredElement:ht(this)});const n=ht(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){ht(this).datum().name.length>i.threshold&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(Fy.Legend.ITEM_CLICK,{clickedElement:ht(this)});const t=ht(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=ht(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.HIDE),e.services.events.dispatchEvent(Fy.Legend.ITEM_MOUSEOUT,{hoveredElement:t})})),t.selectAll("div.legend-item div.checkbox").on("keyup",(function(t){t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(Fy.Legend.ITEM_HOVER,{hoveredElement:ht(this)})})),t.selectAll("div.legend-item div.checkbox").on("keydown",(function(t,n){t.key&&" "===t.key?(t.preventDefault(),e.model.toggleDataLabel(n.name)):t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(Fy.Legend.ITEM_MOUSEOUT,{hoveredElement:ht(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=ht(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class kS extends Tx{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=Vy.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(e=!0){this.createClipPath()}createClipPath(){const e=this.parent,{cartesianScales:t}=this.services;if(!t)throw new Error("Service cartesianScales was undefined");const n=t.getMainXScale(),r=t.getMainYScale(),[i,a]=n.range(),[o,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Cx.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Cx.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-i>0&&l.attr("x",i).attr("y",s).attr("width",a-i).attr("height",o-s),this.chartClipPath.merge(l).lower()}}class LS extends kS{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const e=this.parent,{width:t,height:n}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Cx.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Cx.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(TS||(TS={}));var DS=((CS={})[TS.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},CS[TS.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},CS[TS.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},CS[TS.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},CS),RS=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},NS=function(){function e(e){void 0===e&&(e={}),this.positions=DS,this.positions=Object.assign({},DS,e)}return e.prototype.getRelativeOffset=function(e){for(var t={left:e.offsetLeft,top:e.offsetTop};e.offsetParent&&"static"===getComputedStyle(e.offsetParent).position;)t.left+=e.offsetLeft,t.top+=e.offsetTop,e=e.offsetParent;return t},e.prototype.getAbsoluteOffset=function(e){for(var t=e,n={top:0,left:0};t.offsetParent;){var r=getComputedStyle(t.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),t=t.offsetParent}var i=e.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.left+n.left}},e.prototype.findRelative=function(e,t,n){var r=this.getRelativeOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findAbsolute=function(e,t,n){var r=this.getAbsoluteOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findPosition=function(e,t,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(e),a=e.getBoundingClientRect();return this.calculatePosition(i,a,t,n)},e.prototype.findPositionAt=function(e,t,n){return this.calculatePosition(e,{top:0,left:0,height:0,width:0},t,n)},e.prototype.getPlacementBox=function(e,t){var n=e.offsetHeight+t.top,r=e.offsetWidth+t.left;return{top:t.top,bottom:n,left:t.left,right:r}},e.prototype.addOffset=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Object.assign({},e,{top:e.top+t,left:e.left+n})},e.prototype.setElement=function(e,t){e.style.top=t.top+"px",e.style.left=t.left+"px"},e.prototype.findBestPlacement=function(e,t,n,r,i){var a=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var o=n.map((function(n){var o=i(e,t,n),s=a.getPlacementBox(t,o),l=0,c=0,u=r();s.top<u.top?l=u.top-s.top:s.bottom>u.height&&(l=s.bottom-u.height),s.left<u.left?c=u.left-s.left:s.right>u.width&&(c=s.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var d=t.offsetHeight*t.offsetWidth;return{placement:n,weight:(d-l*c)/d}}));return o.sort((function(e,t){return t.weight-e.weight})),o[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,t,n,r,(function(t,n,r){return i.findPositionAt(e,n,r)}))},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:RS.innerHeight,width:RS.innerWidth}},e.prototype.calculatePosition=function(e,t,n,r){return this.positions[r]?this.positions[r](e,n,t):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new NS;class IS extends Tx{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=Vy.HTML,this.isEventListenerAdded=!1,this.positionService=new NS,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items;let n;const r=this.formatItems(this.getItems(e));n=e.detail.content?`<div class="title-tooltip"><p>${e.detail.content}</p></div>`:this.getTooltipHTML(r);const i=Cx.appendOrSelect(this.tooltip,"div.content-box");if(d_(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${e.detail.content}</p></div>`;i.html(t)}else i.html(this.model.getOptions().tooltip.customHTML(t,n));else i.html(n);i.selectAll(".datapoint-tooltip").each((function(e,t){const n=r[t];r[t]&&r[t].color&&ht(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(e),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(Fy.Tooltip.MOVE,(e=>{!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),this.services.events.addEventListener(Fy.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(Fy.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(Fy.Chart.MOUSEOUT,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(Fy.Tooltip.MOVE,null),this.services.events.removeEventListener(Fy.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(Fy.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(Fy.Chart.MOUSEOUT,this.handleHideTooltip)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=d_(t,"tooltip","truncation","type"),r=d_(t,"tooltip","truncation","threshold"),i=d_(t,"tooltip","truncation","numCharacter");return n!==Zy.NONE?e.map((e=>{const t=e.labelIcon?12:0;return e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e.label&&e.label.length+t>r&&(e.label=c_(e.label,n,i)),e.value&&e.value.length>r&&(e.value=c_(e.value,n,i)),e})):e.map((e=>(e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e)))}getTooltipHTML(e){return'<ul class="multi-tooltip">'+e.map((e=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${e.bold?" bold":""}">\n\t\t\t\t\t\t${e.class||e.color?`<div class="tooltip-color ${e.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${e.label||""}</p>\n\t\t\t\t\t\t${e.labelIcon?`<span class="label-icon"/>${e.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===e.value||null===e.value?"":`<p class="value"/>${e.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}valueFormatter(e,t){const n=this.getOptions(),r=d_(n,"tooltip","valueFormatter");if(r)return r(e,t);if("function"==typeof e.getTime)return zw(e,"MMM d, yyyy");try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return zw(Date.parse(e),"MMM d, yyyy")}catch{}return e.toLocaleString()}render(e=!1){const t=this.getOptions(),n=d_(t,"tooltip","enabled");if(n){const e=ht(this.services.domUtils.getHolder()),n=d_(t,"style","prefix");this.tooltip=Cx.appendOrSelect(e,`div.${_b}--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=this.tooltip.node(),r=this.getOptions(),i=d_(r,"zoomBar","top","enabled");let a=d_(e,"detail","mousePosition");if(a){const e=d_(r,"zoomBar","top","type"),t=r_.height[e];i&&(a[1]+=t+r_.spacerHeight)}else a=ft(d_(e,"detail","event"),t);const o=t.offsetWidth,s=t.offsetHeight;let l;l=a[0]/o>.9?TS.LEFT:a[0]/o<.1?TS.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},n,[TS.RIGHT,TS.LEFT,TS.TOP,TS.BOTTOM],(()=>({top:void 0,left:void 0,width:o,height:s})));let{horizontalOffset:c}=t_;l===TS.LEFT&&(c*=-1);const u=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},n,l);this.positionService.setElement(n,u)}}class PS extends Ox{zoomIn(e,t,n){let r,i,a;const o=n||Cb;e&&(r=e.x,i=e.y,a=2);const{width:s,height:l}=Cx.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${a}) translate(${-r},${-i})`),this.services.events.dispatchEvent(Fy.CanvasZoom.CANVAS_ZOOM_IN,{element:ht(e)})}zoomOut(e,t){const n=t||Cb;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(Fy.CanvasZoom.CANVAS_ZOOM_OUT)}}class $S extends Ox{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(e,t){this.documentFragment.addEventListener(e,t)}removeEventListener(e,t){this.documentFragment.removeEventListener(e,t)}dispatchEvent(e,t){let n;t?n=new CustomEvent(e,{detail:t}):(n=document.createEvent("Event"),n.initEvent(e,!1,!0)),this.documentFragment.dispatchEvent(n)}}class BS extends Ox{constructor(e,t){super(e,t)}downloadCSV(e,t){const n=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([e],{type:r}),t);else if(URL&&"download"in n){const i=URL.createObjectURL(new Blob([e],{type:r}));n.href=i,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}else location.href=`data:application/octet-stream,${encodeURIComponent(e)}`}downloadImage(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class zS extends Ox{static appendOrUpdateLinearGradient(e){let t=e.svg.select(`defs linearGradient#${e.id}`);t.empty()&&(t=e.svg.append("defs").append("linearGradient").attr("id",e.id).attr("x1",e.x1).attr("x2",e.x2).attr("y1",e.y1).attr("y2",e.y2)),t.selectAll("stop").remove(),t.selectAll("stop").data(e.stops).enter().append("stop").attr("offset",(e=>e.offset)).style("stop-color",(e=>e.color)).style("stop-opacity",(e=>e.opacity))}static getOffsetRatio(e){return(100*Math.abs(e[1])/Math.abs(e[0]-e[1])).toFixed(2)+"%"}static getStops(e,t){let n=[{offset:"0%",color:t,opacity:"0.6"},{offset:"80%",color:t,opacity:"0"}];return e[0]<0&&e[1]>0&&(n=[{offset:"0%",color:t,opacity:"0.6"},{offset:zS.getOffsetRatio(e),color:t,opacity:"0"},{offset:"100%",color:t,opacity:"0.6"}]),n}}class US extends Ox{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(Fy.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:e,name:t,animate:n}){return this.pendingTransitions[e._id]=e,e.on("end interrupt cancel",(()=>{delete this.pendingTransitions[e._id]})),!1===this.model.getOptions().animations||!1===n?e.duration(0):e.duration(d_(n_,t,"duration")||n_.default.duration)}getPendingTransitions(){return this.pendingTransitions}}class jS{constructor(e,t){this.components=[],this.services={canvasZoom:PS,domUtils:Cx,events:$S,files:BS,gradientUtils:zS,transitions:US},this.model=new $E(this.services)}init(e,t){this.model.set({holder:e},{skipUpdate:!0}),Object.keys(this.services).forEach((e=>{const t=this.services[e];this.services[e]=new t(this.model,this.services)})),this.services.events.addEventListener(Fy.Model.UPDATE,(e=>{const t=!!d_(e,"detail","animate");this.update(t)})),this.model.setData(t.data),this.services.events.addEventListener(Fy.Chart.RESIZE,(()=>{this.update(!1)})),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(e=!0){if(!this.components)return;Object.keys(this.services).forEach((e=>{this.services[e].update()})),this.components.forEach((t=>t.render(e)));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map((e=>t[e].end().catch((e=>e))));Promise.all(n).then((()=>this.services.events.dispatchEvent(Fy.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((e=>e.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled"),i={id:"legend",components:[new MS(this.model,this.services)],growth:nb.PREFERRED},a=d_(n,"canvasZoom","enabled");a&&!0===a&&e.push(new LS(this.model,this.services));const o=!!this.model.getOptions().title,s={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},l={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},c={id:"header",components:[new Lx(this.model,this.services,[s,...r?[l]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},u={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:d_(t,"graphFrameRenderType")||Vy.SVG},d=!0!==d_(t,"excludeLegend")&&!1!==n.legend.enabled;let h=tb.COLUMN;if(d){const e=d_(n,"legend","position");"left"===e?(h=tb.ROW,n.legend.orientation||(n.legend.orientation=Jy.VERTICAL)):"right"===e?(h=tb.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=Jy.VERTICAL)):"bottom"===e&&(h=tb.COLUMN_REVERSE)}const f={id:"spacer",components:[new Dx(this.model,this.services)],growth:nb.PREFERRED},p={id:"full-frame",components:[new Lx(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:nb.STRETCH},m=[];if(o||r){m.push(c);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};m.push(e)}return m.push(p),[new IS(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,m,{direction:tb.COLUMN})]}}class FS extends $E{constructor(e){super(e),this.axisFlavor=yb.DEFAULT}assignRangeAndDomains(){const{cartesianScales:e}=this.services,t=this.getOptions(),n=e.isDualAxes(),r={primaryDomain:e.domainAxisPosition,primaryRange:e.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=e.secondaryDomainAxisPosition,r.secondaryRange=e.secondaryRangeAxisPosition),Object.keys(r).forEach((n=>{const i=r[n];e.scales[i]?r[n]={position:i,label:e.getScaleLabel(i),identifier:d_(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{cartesianScales:r}=this.services,{primaryDomain:i,primaryRange:a,secondaryDomain:o,secondaryRange:s}=this.assignRangeAndDomains();let l;return r.getDomainAxisScaleType()===Ky.TIME&&(l=e=>zw(e,"MMM d, yyyy")),[["Group",i.label,a.label,...o?[o.label]:[],...s?[s.label]:[]],...e.map((e=>[e[n],null===e[i.identifier]?"–":l?l(e[i.identifier]):e[i.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier].toLocaleString(),...o?[null===e[o.identifier]?"–":e[o.identifier]]:[],...s?[null===e[s.identifier]||isNaN(e[s.identifier])?"–":e[s.identifier]]:[]]))]}setData(e){let t;if(e&&(t=super.setData(e),d_(this.getOptions(),"zoomBar",Wy.TOP,"enabled"))){const e=d_(this.getOptions(),"zoomBar",Wy.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize(qg(e)):this.getDisplayData();let n=t;const{cartesianScales:r}=this.services;if(t&&r.domainAxisPosition&&r.rangeAxisPosition){const e=r.getDomainIdentifier(),i=r.getRangeIdentifier();let a=t.map((t=>t[e].getTime()));a=py(a).sort(),n=a.map((n=>{let r=0;const a={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),a[e]=new Date(n),a[i]=r,a}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(e){const t=this.getOptions();if(!t.axes)return e;const n=[];return Object.keys(Wy).forEach((e=>{const r=Wy[e],i=t.axes[r];if(i&&i.scaleType===Ky.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===d_(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}}class VS extends FS{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData();return e.sort(((e,t)=>e.source.localeCompare(t.source))),[["Source","Target","Value"],...e.map((e=>[e.source,e.target,e.value]))]}}function HS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function GS(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function WS(e){return e.depth}function qS(e,t){return t-1-e.height}function ZS(e,t){return e.sourceLinks.length?e.depth:t-1}function YS(e){return function(){return e}}function KS(e,t){return QS(e.source,t.source)||e.index-t.index}function XS(e,t){return QS(e.target,t.target)||e.index-t.index}function QS(e,t){return e.y0-t.y0}function JS(e){return e.value}function eO(e){return e.index}function tO(e){return e.nodes}function nO(e){return e.links}function rO(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function iO({nodes:e}){for(const t of e){let e=t.y0,n=e;for(const n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(const e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function aO(){let e,t,n,r=0,i=0,a=1,o=1,s=24,l=8,c=eO,u=ZS,d=tO,h=nO,f=6;function p(){const p={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return function({nodes:e,links:t}){for(const[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];const r=new Map(e.map(((t,n)=>[c(t,n,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:i}=n;"object"!=typeof t&&(t=n.source=rO(r,t)),"object"!=typeof i&&(i=n.target=rO(r,i)),t.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}(p),function({nodes:e}){for(const t of e)t.value=void 0===t.fixedValue?Math.max(GS(t.sourceLinks,JS),GS(t.targetLinks,JS)):t.fixedValue}(p),function({nodes:e}){const t=e.length;let n=new Set(e),r=new Set,i=0;for(;n.size;){for(const e of n){e.depth=i;for(const{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw new Error("circular link");n=r,r=new Set}}(p),function({nodes:e}){const t=e.length;let n=new Set(e),r=new Set,i=0;for(;n.size;){for(const e of n){e.height=i;for(const{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw new Error("circular link");n=r,r=new Set}}(p),function(n){const c=function({nodes:e}){const n=HS(e,(e=>e.depth))+1,i=(a-r-s)/(n-1),o=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(u.call(null,t,n))));t.layer=e,t.x0=r+e*i,t.x1=t.x0+s,o[e]?o[e].push(t):o[e]=[t]}if(t)for(const e of o)e.sort(t);return o}(n);e=Math.min(l,(o-i)/(HS(c,(e=>e.length))-1)),function(t){const n=function(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(t,(t=>(o-i-(t.length-1)*e)/GS(t,JS)));for(const r of t){let t=i;for(const i of r){i.y0=t,i.y1=t+i.value*n,t=i.y1+e;for(const e of i.sourceLinks)e.width=e.value*n}t=(o-t+e)/(r.length+1);for(let e=0;e<r.length;++e){const n=r[e];n.y0+=t*(e+1),n.y1+=t*(e+1)}w(r)}}(c);for(let e=0;e<f;++e){const t=Math.pow(.99,e),n=Math.max(1-t,(e+1)/f);g(c,t,n),m(c,t,n)}}(p),iO(p),p}function m(e,n,r){for(let i=1,a=e.length;i<a;++i){const a=e[i];for(const e of a){let t=0,r=0;for(const{source:n,value:i}of e.targetLinks){let a=i*(e.layer-n.layer);t+=E(n,e)*a,r+=a}if(!(r>0))continue;let i=(t/r-e.y0)*n;e.y0+=i,e.y1+=i,_(e)}void 0===t&&a.sort(QS),v(a,r)}}function g(e,n,r){for(let i=e.length-2;i>=0;--i){const a=e[i];for(const e of a){let t=0,r=0;for(const{target:n,value:i}of e.sourceLinks){let a=i*(n.layer-e.layer);t+=x(e,n)*a,r+=a}if(!(r>0))continue;let i=(t/r-e.y0)*n;e.y0+=i,e.y1+=i,_(e)}void 0===t&&a.sort(QS),v(a,r)}}function v(t,n){const r=t.length>>1,a=t[r];b(t,a.y0-e,r-1,n),y(t,a.y1+e,r+1,n),b(t,o,t.length-1,n),y(t,i,0,n)}function y(t,n,r,i){for(;r<t.length;++r){const a=t[r],o=(n-a.y0)*i;o>1e-6&&(a.y0+=o,a.y1+=o),n=a.y1+e}}function b(t,n,r,i){for(;r>=0;--r){const a=t[r],o=(a.y1-n)*i;o>1e-6&&(a.y0-=o,a.y1-=o),n=a.y0-e}}function _({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(XS);for(const{target:{targetLinks:t}}of e)t.sort(KS)}}function w(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:n}of e)t.sort(XS),n.sort(KS)}function E(t,n){let r=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:i,width:a}of t.sourceLinks){if(i===n)break;r+=a+e}for(const{source:e,width:i}of n.targetLinks){if(e===t)break;r-=i}return r}function x(t,n){let r=n.y0-(n.targetLinks.length-1)*e/2;for(const{source:i,width:a}of n.targetLinks){if(i===t)break;r+=a+e}for(const{target:e,width:i}of t.sourceLinks){if(e===n)break;r-=i}return r}return p.update=function(e){return iO(e),e},p.nodeId=function(e){return arguments.length?(c="function"==typeof e?e:YS(e),p):c},p.nodeAlign=function(e){return arguments.length?(u="function"==typeof e?e:YS(e),p):u},p.nodeSort=function(e){return arguments.length?(t=e,p):t},p.nodeWidth=function(e){return arguments.length?(s=+e,p):s},p.nodePadding=function(t){return arguments.length?(l=e=+t,p):l},p.nodes=function(e){return arguments.length?(d="function"==typeof e?e:YS(e),p):d},p.links=function(e){return arguments.length?(h="function"==typeof e?e:YS(e),p):h},p.linkSort=function(e){return arguments.length?(n=e,p):n},p.size=function(e){return arguments.length?(r=i=0,a=+e[0],o=+e[1],p):[a-r,o-i]},p.extent=function(e){return arguments.length?(r=+e[0][0],a=+e[1][0],i=+e[0][1],o=+e[1][1],p):[[r,i],[a,o]]},p.iterations=function(e){return arguments.length?(f=+e,p):f},p}var oO=Math.PI,sO=2*oO,lO=1e-6,cO=sO-lO;function uO(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dO(){return new uO}function hO(e){return function(){return e}}function fO(e){return e[0]}function pO(e){return e[1]}uO.prototype=dO.prototype={constructor:uO,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>lO)if(Math.abs(u*s-l*c)>lO&&i){var h=n-a,f=r-o,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((oO-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,_=y/g;Math.abs(b-1)>lO&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,a){e=+e,t=+t,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>lO||Math.abs(this._y1-c)>lO)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%sO+sO),d>cO?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>lO&&(this._+="A"+n+","+n+",0,"+ +(d>=oO)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var mO=Array.prototype.slice;function gO(e){return e.source}function vO(e){return e.target}function yO(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function bO(){return function(e){var t=gO,n=vO,r=fO,i=pO,a=null;function o(){var o,s=mO.call(arguments),l=t.apply(this,s),c=n.apply(this,s);if(a||(a=o=dO()),e(a,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r="function"==typeof e?e:hO(+e),o):r},o.y=function(e){return arguments.length?(i="function"==typeof e?e:hO(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}(yO)}function _O(e){return[e.source.x1,e.y0]}function wO(e){return[e.target.x0,e.y1]}class EO extends Tx{constructor(){super(...arguments),this.type="alluvial",this.renderType=Vy.SVG,this.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random())}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0});t.html("");const{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.model.getOptions(),a=this.model.getDisplayData(),o=d_(this.getOptions(),"color","gradient","enabled");let s=Xb;i.alluvial.nodePadding>Xb&&(s=i.alluvial.nodePadding);const l=d_(i,"alluvial","nodeAlignment");let c=ZS;l===Qy.LEFT?c=WS:l===Qy.RIGHT&&(c=qS);const u=aO().nodeId((e=>e.name)).nodeWidth(Kb).nodePadding(s).nodeAlign(c).extent([[2,30],[n-2,r]]);this.graph=u({nodes:i.alluvial.nodes.map((e=>Object.assign({},e))),links:a.map((e=>Object.assign({},e)))}),this.graph.nodes=this.graph.nodes.filter((e=>0!==e.value));const d={};this.graph.nodes.forEach((e=>{const t=e.x0;e.category&&(d[t]=null==e?void 0:e.category)})),t.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(d)).join("g").attr("transform",(e=>`translate(${e}, 0)`)).append("text").attr("id",((e,t)=>this.services.domUtils.generateElementIDString(`alluvial-category-${t}`))).style("font-size","14px").text((e=>d[e]?d[e]:"")).attr("y",20).attr("x",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-category-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0});let i=0;return e+i>=r&&(i=4-r),i}));const h=t.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(h.exit().remove(),o){const e=d_(this.getOptions(),"color","scale");e&&h.enter().append("linearGradient").attr("id",(e=>`${this.gradient_id}-link-${e.index}`)).attr("gradientUnits","userSpaceOnUse").call((t=>t.append("stop").attr("offset","0%").attr("stop-color",(t=>e[t.source.name])))).call((t=>t.append("stop").attr("offset","100%").attr("stop-color",(t=>e[t.target.name])))),h.exit().remove()}h.enter().append("path").classed("link",!0).attr("d",bO().source(_O).target(wO)).attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-line-${e.index}`))).attr("class",(e=>i.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e.source.index,originalClassName:"link"}))).style("stroke",(e=>o?`url(#${this.gradient_id}-link-${e.index})`:this.model.getFillColor(e.source.name))).attr("stroke-width",(e=>Math.max(1,e.width))).style("stroke-opacity",Qb.default).attr("aria-label",(e=>`${e.source.name} → ${e.target.name} (${e.value}${i.alluvial.units?" "+i.alluvial.units:""})`));const f=t.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-${e.index}`))).classed("node-group",!0).attr("transform",(e=>`translate(${e.x0}, ${e.y0})`));f.append("rect").classed("node",!0).attr("height",(e=>e.y1-e.y0)).attr("width",(e=>e.x1-e.x0)).attr("fill","black");const p=f.append("g").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${e.index}`)));p.append("text").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${e.index}`))).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((e=>`${e.name} (${e.value})`)).attr("aria-label",(e=>`${e.name} (${e.value})`)),p.append("rect").classed("node-text-bg",!0).attr("width",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-node-text-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0});return r+8})).attr("height",18).attr("stroke-width",2).lower(),p.attr("transform",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-node-text-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0}),i=(e.y1-e.y0)/2-9;let a=e.x1-e.x0;return e.x1>=r?a-=r+16:a+=4,`translate(${a}, ${i})`})),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const e=this.getOptions(),t=this,n=Hv(((e,n="mouseover")=>{const r=t.parent.selectAll("path.link").transition().call((e=>t.services.transitions.setupTransition({transition:e,name:"alluvial-links-mouse-highlight"})));"mouseout"===n?(ht(e).lower(),r.style("stroke-opacity",Qb.default)):r.style("stroke-opacity",(function(){return e===this?(ht(this).raise(),Qb.selected):Qb.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){const a=ht(this);n(this,"mouseover"),a.classed("link-hovered",!0);const o=getComputedStyle(this).getPropertyValue("stroke");t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEOVER,{event:r,element:a,datum:i}),t.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:i.target.name,value:i.value+(e.alluvial.units?` ${e.alluvial.units}`:""),color:o,labelIcon:t.getRightArrowIcon()}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEMOVE,{event:e,element:ht(this),datum:n}),t.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(Fy.Alluvial.LINE_CLICK,{event:e,element:ht(this),datum:n})})).on("mouseout",(function(e,r){const i=ht(this);n(this,"mouseout"),i.classed("link-hovered",!1),t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEOUT,{event:e,element:i,datum:r}),t.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:e,hoveredElement:i})}))}addNodeEventListener(){const e=this,t=Hv(((t=[],n="mouseover")=>{"mouseout"!==n&&0!==t.length?e.parent.selectAll("path.link").transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"alluvial-link-mouse-highlight"}))).style("stroke-opacity",(function(e){return t.some((t=>t===e.index))?(ht(this).classed("link-hovered",!0).raise(),Qb.selected):Qb.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,(e=>e.index)).order().style("stroke-opacity",Qb.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(n,r){const i=ht(this),a=[];if(e.traverse({link:"sourceLinks",node:"target"},r,a),e.traverse({link:"targetLinks",node:"source"},r,a),a.length){const o=s_(i.attr("transform"));if(i.attr("transform",`translate(${o.x-2}, ${o.y})`),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){const t=e.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),n=e.parent.select(`g#${t}`),i=s_(n.attr("transform"));n.attr("transform",`translate(${i.x+4},${i.y})`)}const s=e.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);e.parent.select(`text#${s}`).style("font-weight","bold"),t(a,"mouseover"),e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEOVER,{event:n,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Alluvial.NODE_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(n,r){const i=ht(this),a=s_(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform",`translate(${a.x+2}, ${a.y})`).select("rect.node").attr("width",Kb),r.x0-2==0){const t=e.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),n=e.parent.select(`g#${t}`),i=s_(n.attr("transform"));n.attr("transform",`translate(${i.x-4},${i.y})`)}const o=e.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);e.parent.select(`text#${o}`).style("font-weight","normal"),t([],"mouseout"),e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEOUT,{event:n,element:i,datum:r}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i})}))}traverse(e,t,n=[]){t[e.link].map((t=>(n.push(t.index),t[e.node]))).forEach((t=>this.traverse(e,t,n)))}getRightArrowIcon(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect width="32" height="32"/>\n\t\t</svg>'}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}const xO=class e extends Tx{constructor(){super(...arguments),this.type="grid-brush",this.renderType=Vy.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const i=Cx.appendOrSelect(n,"svg.chart-grid-backdrop"),a=Cx.appendOrSelect(i,`g.${this.type}`),o=Cx.appendOrSelect(a,this.selectionSelector),{width:s,height:l}=Cx.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const f=Cx.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===Ky.TIME){let t=this.model.get("zoomDomain");void 0===t&&(t=this.services.zoom.getDefaultZoomBarDomain(),t&&this.model.set({zoomDomain:t},{animate:!1}));const n=t=>{const n=t[1]-t[0];let r="0,"+n.toString();const i=Math.floor(l/e.DASH_LENGTH),a=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),f.attr("stroke-dasharray",r)},r=e=>{const t=e.selection;null===t||t[0]===t[1]||(f.attr("x",parseFloat(o.attr("x"))+parseFloat(i.attr("x"))).attr("y",o.attr("y")).attr("width",o.attr("width")).attr("height",o.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=yu().range([0,s]).domain(t);let i=[r.invert(e),r.invert(n)];i[0].valueOf()===i[1].valueOf()&&(i=this.services.zoom.getDefaultZoomBarDomain()),(t[0].valueOf()!==i[0].valueOf()||t[1].valueOf()!==i[1].valueOf())&&this.services.zoom.handleDomainChange(i)};let u;const d=e=>{const t=e.selection;null!==t&&(c(t[0],t[1]),a.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=Zr().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),a.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=ft(a.node(),e)[0];let n=t-s*h/2;n<0&&(n=0);let r=t+s*h/2;r>s&&(r=s),c(n,r)}}))}}};xO.DASH_LENGTH=4;let SO=xO;class OO extends Tx{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=Vy.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=Zr(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(Fy.ZoomBar.UPDATE,this.render.bind(this));const e=d_(this.getOptions(),"zoomBar",Wy.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer(),n=this.services.zoom.isZoomBarLoading(Wy.TOP),r=this.services.zoom.isZoomBarLocked(Wy.TOP),i=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),a=d_(this.getOptions(),"axes",Wy.BOTTOM,"highlights"),o=r_.height[i],{width:s}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const u=this.model.get("axesMargins");u&&u.left&&(l=u.left);const d=Cx.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(Cx.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",r_.spacerHeight).attr("opacity",1).attr("fill","none"),i===qy.GRAPH_VIEW?Cx.appendOrSelect(d,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",s-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):i===qy.SLIDER_VIEW&&Cx.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",l).attr("y",o/2-1).attr("width",s-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(d,l,s);const{cartesianScales:h}=this.services,f=h.getMainXScale(),p=h.getMainYScale(),m=h.getMainXScaleType();if(f&&m===Ky.TIME){let e=this.services.zoom.getZoomBarData();if(iy(e)||1===e.length)return;this.xScale=f.copy(),this.yScale=p.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const u=this.model.get("initialZoomDomain"),h=d_(this.getOptions(),"zoomBar",Wy.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||u&&u[0].valueOf()===h[0].valueOf()&&u[1].valueOf()===h[1].valueOf()?null===h&&null!==u&&this.model.set({initialZoomDomain:null,zoomDomain:sy([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:sy([],h),zoomDomain:h?sy([],h):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(c(e,(e=>e.value)));const m=this.model.get("zoomDomain");if(i===qy.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(d,l,s),a)){const e=a.highlightStartMapsTo,t=a.highlightEndMapsTo,n=a.color,r=a.labelMapsTo;a.data.forEach(((i,a)=>{Cx.appendOrSelect(d,`rect.highlight-${a}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(i[e])).attr("width",this.xScale(i[t])-this.xScale(i[e])).style("fill",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(m,l,s);const g=Cx.appendOrSelect(t,this.brushSelector).call(this.brush);if(void 0!==m)if(m[0].valueOf()===m[1].valueOf())g.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const e=m.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(g.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),g.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),i=r_.height[r];this.brush.extent([[t,0],[n,i]]).on("start brush end",null).on("start brush end",(t=>{const n=t.selection;null===n?this.handleBrushedEvent(t,e,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(t,e,this.xScale,n)}))}handleBrushedEvent(e,t,n,r){const i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),null!=e.sourceEvent&&("mousemove"===e.sourceEvent.type||"mouseup"===e.sourceEvent.type||"mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type||"touchmove"===e.sourceEvent.type||"touchend"===e.sourceEvent.type)){let n;(void 0===t||t[0]!==i[0]||t[1]!==i[1])&&this.services.zoom.handleDomainChange(i,{dispatchEvent:!1}),"start"===e.type?n=Fy.ZoomBar.SELECTION_START:"brush"===e.type?n=Fy.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=Fy.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(Fy.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=r_.handleWidth,i=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),a=r_.height[i],o=-r/2,s=r_.handleBarWidth,l=i===qy.GRAPH_VIEW?r_.handleBarHeight:6,c=-s/2,u=(a-l)/2;e.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(e){return"w"===e.type?Math.max(t[0]+o,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+o,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",a).attr("cursor","ew-resize").style("display",null);const d=e.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(e){return"handle-bar handle-bar--"+e.type})),d.attr("x",(function(e){return"w"===e.type?Math.max(t[0]+c,n.maxSelectionRange[0]-o+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+o+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===qy.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],a)}updateSliderSelectedArea(e){const t=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),n=r_.height[t],r=this.getComponentContainer().select("svg.zoom-container");Cx.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",e[0]).attr("y",n/2-1).attr("width",e[1]-e[0]).attr("height",2)}renderZoomBarArea(e,t,n,r){const{cartesianScales:i}=this.services,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,a),d=c(this.yScale,l,o),h=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),f=r_.height[h],p=qu().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Cx.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,a){const o=Cx.appendOrSelect(e,"clipPath").attr("id",t);Cx.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=qg(e),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(t[0])<Number(n[0][r])){const e={};e[r]=t[0],e[i]=0,n.unshift(e)}if(Number(t[1])>Number(n[n.length-1][r])){const e={};e[r]=t[1],e[i]=0,n.push(e)}return n}renderZoomBarBaseline(e,t,n,r=!1){const i=d_(this.model.getOptions(),"zoomBar",Wy.TOP,"type"),a=r_.height[i],o=Wu()([[t,a],[n,a]]);Cx.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(e,t,n){this.renderZoomBarArea(e,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(e,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Cx.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),d_(this.getOptions(),"zoomBar",Wy.TOP,"type")===qy.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(Fy.ZoomBar.UPDATE,this.render.bind(this))}}class CO extends Tx{constructor(e,t){super(e,t),this.type="threshold",this.renderType=Vy.SVG,this.positionService=new NS}render(e=!1){const t=d_(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(Wy).includes(e)){const r=t[e];r.thresholds&&r.thresholds.length>0&&n.push({axisPosition:e,thresholds:r.thresholds,correspondingDatasets:null==r?void 0:r.correspondingDatasets,mapsTo:null==r?void 0:r.mapsTo})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-thresholds ${e.axisPosition}`));const a=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(a).attr("class","threshold-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getScaleByPosition(t),r=s.services.cartesianScales.getScaleTypeByPosition(t);let i=null,a=null;t===Wy.LEFT||t===Wy.RIGHT?(a=n,i=s.services.cartesianScales.getMainXScale()):(i=n,a=s.services.cartesianScales.getMainYScale());const o=r===Ky.LABELS,[l,c]=i.range(),[u,d]=a.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=p_((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=ht(this);t===Wy.TOP||t===Wy.BOTTOM?(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("y1",d).attr("y2",u).attr("x1",(({datum:e})=>p(e)+(o?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(o?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:e})=>-p(e))).attr("width",Math.abs(u-d)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:e})=>m(e)+(o?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(o?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:e})=>m(e))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(Fy.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(Fy.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===Ky.TIME){const e=[Wy.LEFT,Wy.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),o=e?a:i,s=d_(r,"timeScale"),l=RE(o.ticks(),d_(s,"timeInterval"));return LE(t,0,o.ticks(),l,s)}return t.toLocaleString("en")}appendThresholdLabel(){const e=ht(this.services.domUtils.getHolder()),t=d_(this.getOptions(),"style","prefix");this.label=Cx.appendOrSelect(e,`div.${_b}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=ft(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(`${t.label||"Threshold"}: ${i}`).style("background-color",t.fillColor);const a=this.label.node(),o=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},a,[TS.RIGHT,TS.LEFT,TS.TOP,TS.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},a,o);this.positionService.setElement(a,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=d_(e,"correspondingDatasets",0)),n[e.mapsTo]=t.value,n}addEventListeners(){const e=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(t){ht(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(Fy.Threshold.SHOW,{event:t,hoveredElement:ht(this),datum:ht(this).datum()})})).on("mouseout",(function(t){ht(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(Fy.Threshold.HIDE,{event:t,hoveredElement:ht(this),datum:ht(this).datum()})}))}}class TO extends Tx{constructor(e,t){super(e,t),this.type="highlight",this.renderType=Vy.SVG,this.positionService=new NS,this.highlightStrokeWidth=1}render(e=!1){const t=d_(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(Wy).includes(e)){const r=t[e];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:e,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-highlight ${e.axisPosition}`));const a=i.selectAll("g.highlight-group").data((e=>e.highlight.map((t=>(t.axisPosition=e.axisPosition,t.highlightStartMapsTo=e.highlightStartMapsTo,t.labelMapsTo=e.labelMapsTo,t.color=e.color,t.highlightEndMapsTo=e.highlightEndMapsTo,t)))));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(a).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,a]=n.range(),[o,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=p_((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=ht(this);t===Wy.TOP||t===Wy.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("y",Math.max(l+s.highlightStrokeWidth,0)).attr("height",Math.max(o-2*s.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:e,...t})=>d(t[e]))).attr("width",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)):f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("x",i).attr("width",Math.max(a-i,0)).attr("y",(({highlightEndMapsTo:e,...t})=>h(t[e]))).attr("height",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null))}))}}class AO extends IS{getItems(e){if(e.detail.items)return e.detail.items;const{data:t}=e.detail;if(!t||!t.length||!t[0])return[];const n=this.getOptions(),{cartesianScales:r}=this.services,i=r.getDomainIdentifier(),a=r.isDualAxes(),{groupMapsTo:o}=n.data,s=r.getDomainLabel();let l=r.getRangeLabel();const c=t[0][i];let u;if(1===t.length){const i=t[0],d=r.getRangeIdentifier(i);if(a){const e=r.getRangeAxisPosition({datum:i,groups:[i[o]]});l=r.getScaleLabel(e)}const h=i[d];u=[{label:s,value:c},...Array.isArray(h)&&2===h.length?[{label:"Start",value:h[0]},{label:"End",value:h[1]}]:[{label:l,value:i[d]}]],e.detail.additionalItems&&e.detail.additionalItems.forEach((e=>u.push({label:e.label,value:e.value}))),u.push({label:n.tooltip.groupLabel,value:i[o],color:this.model.getFillColor(i[o]),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:i[o]})})}else if(t.length>1&&(u=[{label:s,value:c}],u=u.concat(t.map((e=>{const t=e[r.getRangeIdentifier(e)];return{label:e[o],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[o]),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:e[o]})}})).sort(((e,t)=>t.value-e.value))),!a&&!0===d_(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:wp(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}class MO extends Ox{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:e=null}={}){if(this.dualAxes&&e){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,r=d_(t,"axes",this.secondaryDomainAxisPosition),i=e[n];if(null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(i))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:e=null,groups:t=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=d_(n,"axes",this.secondaryRangeAxisPosition);let a;if(null!==e?a=e[r]:t&&t.length>0&&(a=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return d_(this.model.getOptions(),"axes",e)}getDomainAxisOptions(){const e=this.getDomainAxisPosition();return this.getAxisOptions(e)}getRangeAxisOptions(){const e=this.getRangeAxisPosition();return this.getAxisOptions(e)}getScaleLabel(e){return this.getAxisOptions(e).title||(e===Wy.BOTTOM||e===Wy.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(Wy).map((e=>Wy[e])).forEach((e=>{this.scales[e]=this.createScale(e)}))}findDomainAndRangeAxes(){const e=this.findVerticalAxesPositions(),t=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(e,t);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==Wy.LEFT&&this.rangeAxisPosition!==Wy.RIGHT||this.domainAxisPosition!==Wy.BOTTOM&&this.domainAxisPosition!==Wy.TOP?this.orientation=Yy.HORIZONTAL:this.orientation=Yy.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),a=d_(i,"axes");(null!=(e=a[Wy.LEFT])&&e.correspondingDatasets&&a[Wy.RIGHT]||null!=(t=a[Wy.RIGHT])&&t.correspondingDatasets&&a[Wy.LEFT]||null!=(n=a[Wy.TOP])&&n.correspondingDatasets&&a[Wy.BOTTOM]||null!=(r=a[Wy.BOTTOM])&&r.correspondingDatasets&&a[Wy.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=d_(this.model.getOptions(),"axes",e,"domain");if(t&&!Array.isArray(t))throw new Error(`Domain in ${e} axis is not a valid array`);if(Array.isArray(t)&&(this.scaleTypes[e]===Ky.LINEAR||this.scaleTypes[e]===Ky.TIME)&&2!==t.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[e]}`);return t}getOrientation(){return this.orientation}getScaleByPosition(e){return this.scales[e]}getScaleTypeByPosition(e){return this.scaleTypes[e]}getDomainAxisScaleType(){const e=this.getDomainAxisPosition();return this.getScaleTypeByPosition(e)}getRangeAxisScaleType(){const e=this.getRangeAxisPosition();return this.getScaleTypeByPosition(e)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const e=[Wy.BOTTOM,Wy.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[Wy.LEFT,Wy.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(e,t,n,r){const i=this.model.getOptions(),a=d_(i,"axes")[n],{mapsTo:o}=a,s=null!==d_(r,o)?r[o]:r;let l;switch(t){case Ky.LABELS:l=e(s)+e.step()/2;break;case Ky.TIME:l=e(new Date(s));break;default:l=e(s)}return l}getBoundedScaledValues(e){const{bounds:t}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:e}),r=this.scales[n],i=this.model.getOptions(),a=d_(i,"axes")[n],{mapsTo:o}=a,s=void 0!==e[o]?e[o]:e;return[r(null!==d_(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==d_(e,t.lowerBoundMapsTo)?e[t.lowerBoundMapsTo]:s)]}getValueThroughAxisPosition(e,t){const n=this.scaleTypes[e],r=this.scales[e];return this.getValueFromScale(r,n,e,t)}getDomainValue(e){const t=this.getDomainAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getRangeValue(e){const t=this.getRangeAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(e){const t=this.model.getOptions();return d_(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return d_(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=d_(n,"axes",e);return r.scaleType===Ky.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return K_(r,n)>1?[Gw(n,t),I_(r,t)]:Z_(r,n)>1?[jw(n,t),x_(r,t)]:j_(r,n)>1?[Uw(n,t),E_(r,t)]:function(e,t,n){__(2,arguments);var r=F_(e,t)/B_;return G_(null==n?void 0:n.roundingMethod)(r)}(r,n)>1?[Fw(n,t),C_(r,t)]:W_(r,n)>30?[Vw(n,30*t),R_(r,30*t)]:W_(r,n)>1?[Vw(n,t),R_(r,t)]:Y_(r,n)>15?[Hw(n,15*t),N_(r,15*t)]:Y_(r,n)>1?[Hw(n,t),N_(r,t)]:[n,r]}(t,d_(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,a=t<=0&&t+i>0?0:t+i;let o=e>=0&&e-i<0?0:e-i;if(r===Ky.LOG&&o<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");o=e}return[o,a]}(t,Sb,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=d_(e,"axes"),n=this.isDualAxes();return null===d_(t,Wy.LEFT)&&null!==d_(t,Wy.RIGHT)||!0===d_(t,Wy.RIGHT,"main")||n&&d_(t,Wy.LEFT,"correspondingDatasets")?{primary:Wy.RIGHT,secondary:Wy.LEFT}:{primary:Wy.LEFT,secondary:Wy.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=d_(e,"axes"),n=this.isDualAxes();return null===d_(t,Wy.BOTTOM)&&null!==d_(t,Wy.TOP)||!0===d_(t,Wy.TOP,"main")||n&&d_(t,Wy.BOTTOM,"correspondingDatasets")?{primary:Wy.TOP,secondary:Wy.BOTTOM}:{primary:Wy.BOTTOM,secondary:Wy.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=d_(n,"axes",e.primary),i=d_(n,"axes",t.primary),a=r.scaleType||Ky.LINEAR,o=i.scaleType||Ky.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary,(!(o===Ky.LABELS||o===Ky.TIME)&&a===Ky.LABELS||a===Ky.TIME)&&(s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary),s}getScaleDomain(e){const t=this.model.getOptions(),n=d_(t,"axes",e),r=d_(t,"bounds"),{includeZero:i}=n,a=d_(n,"scaleType")||Ky.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,T(e,(e=>e.length))]}if(n.limitDomainToBins){const{bins:e}=this.model.getBinConfigurations(),t=this.model.getStackKeys({bins:e});return[t[0].split("-")[0],t[t.length-1].split("-")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:u,thresholds:d}=n,{reference:h,compareTo:f}=xb;if(n.domain)return a===Ky.LABELS?n.domain:(a===Ky.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(u)return[0,100];if(n&&a===Ky.LABELS)return py(o.map((e=>e[l])));let p,m;const g=this.model.getDataGroupNames();if(a===Ky.LABELS_RATIO)return o.map((e=>`${e[h]}/${e[f]}`));if(a===Ky.TIME)m=o.map((e=>+new Date(e[l])));else if(r&&t.axes)m=[],o.forEach((e=>{m.push(e[l]),e[r.upperBoundMapsTo]&&m.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&m.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&g&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:g}),r=o.filter((t=>!g.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(t).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),m=[...Cp(i),...r.map((e=>e[l]))]}else m=[],o.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(m.push(t[0]),m.push(t[1])):(s&&m.push(Math.max(e[l],e[s])),m.push(t))}));return a!==Ky.TIME&&a!==Ky.LOG&&i&&m.push(0),d&&d.length>0&&d.forEach((e=>{const t=d_(e,"value");null!==t&&m.push(t)})),p=c(m),p=this.extendsDomain(e,p),p}createScale(e){const t=this.model.getOptions(),n=d_(t,"axes",e);if(!n)return null;const r=d_(n,"scaleType")||Ky.LINEAR;let i;return this.scaleTypes[e]=r,i=r===Ky.TIME?yu():r===Ky.LOG?ll().base(n.base||10):r===Ky.LABELS||r===Ky.LABELS_RATIO?js():Js(),i.domain(this.getScaleDomain(e)),i}getHighestDomainThreshold(){const e=d_(this.model.getOptions(),"axes"),t=this.getDomainAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getDomainScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return this.getScaleTypeByPosition(t)===Ky.TIME&&("string"==typeof i.value||void 0===i.value.getTime)&&(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}}getHighestRangeThreshold(){const e=d_(this.model.getOptions(),"axes"),t=this.getRangeAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getRangeScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return{threshold:i,scaleValue:r(i.value)}}}class kO extends Ox{constructor(){super(...arguments),this.curveTypes={curveLinear:Vu,curveLinearClosed:kd,curveBasis:ld,curveBasisClosed:ud,curveBasisOpen:hd,curveBundle:pd,curveCardinal:vd,curveCardinalClosed:bd,curveCardinalOpen:wd,curveCatmullRom:Sd,curveCatmullRomClosed:Cd,curveCatmullRomOpen:Ad,curveMonotoneX:Bd,curveMonotoneY:zd,curveNatural:Fd,curveStep:Hd,curveStepAfter:Wd,curveStepBefore:Gd}}getD3Curve(){let e="curveLinear";const t=this.model.getOptions().curve;if(t&&(e="string"==typeof t?t:t.name),this.curveTypes[e]){let n=this.curveTypes[e];return t&&Object.keys(t).forEach((e=>{n[e]&&(n=n[e](t[e]))})),n}return console.warn(`The curve type '${e}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class LO extends Ox{isZoomBarEnabled(){if(!this.services.cartesianScales||!d_(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=d_(this.model.getOptions(),"axes",e,"scaleType");return e===Wy.BOTTOM&&t===Ky.TIME}getZoomBarData(){const e=this.model.getZoomBarData();return e&&e.length>1?e:this.model.getDisplayData()}getDefaultZoomBarDomain(e){if(!this.services.zoom)throw new Error("Services zoom not defined");const t=e||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),a=d_(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(a)&&2===a.length)return a;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,c(t,(e=>e[i])))}handleDomainChange(e,t={dispatchEvent:!0}){var n;this.model.set({zoomDomain:e},{animate:!1}),t.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(Fy.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return d_(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),a=d_(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&a&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),a=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(a.length>0)return a}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=r_.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const a=i(n[0]),o=i(n[1]);if(o-a<r+1)return;const s=i.range(),l=o-a,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=a+c,d=o-c;u>=d&&(u=a+l/2-r/2,d=o-l/2+r/2);const h=[i.invert(u),i.invert(d)];(n[0].valueOf()!==h[0].valueOf()||n[1].valueOf()!==h[1].valueOf())&&this.handleDomainChange(h)}zoomOut(e=this.getZoomRatio()){const t=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());const r=n(t[0]),i=n(t[1]),a=n.range(),o=(a[1]-a[0])/2*(e/2),s=Math.max(r-o,a[0]),l=Math.min(i+o,a[1]),c=[n.invert(s),n.invert(l)];(t[0].valueOf()!==c[0].valueOf()||t[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();(e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())&&this.handleDomainChange(t)}isMinZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t)&&(e[1].valueOf()-e[0].valueOf())/(t[1].valueOf()-t[0].valueOf())<d_(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t||e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(e){return d_(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return d_(this.model.getOptions(),"zoomBar",e,"locked")}}class DO extends jS{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:MO,curves:kO,zoom:LO}),this.model=new FS(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"zoomBar",Wy.TOP,"enabled"),i=d_(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),o=d_(n,"axes",a,"scaleType"),s=r&&a===Wy.BOTTOM&&o===Ky.TIME,l=this.services.zoom.isZoomBarLocked(Wy.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},d={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},h={id:"header",components:[new Lx(this.model,this.services,[u,...i?[d]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},f={id:"legend",components:[new MS(this.model,this.services)],growth:nb.PREFERRED};s&&!l&&e.push(new kS(this.model,this.services),new SO(this.model,this.services)),e.push(new CO(this.model,this.services)),e.push(new TO(this.model,this.services));const p={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},m=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=tb.COLUMN;if(m){const e=d_(this.model.getOptions(),"legend","position");e===Xy.LEFT?(g=tb.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Jy.VERTICAL)):e===Xy.RIGHT?(g=tb.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Jy.VERTICAL)):e===Xy.BOTTOM&&(g=tb.COLUMN_REVERSE)}const v={id:"spacer",components:[new Dx(this.model,this.services)],growth:nb.PREFERRED},y={id:"full-frame",components:[new Lx(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:nb.STRETCH},b={id:"zoom-bar",components:[new OO(this.model,this.services)],growth:nb.PREFERRED,renderType:Vy.SVG},_=[];if(c||i){_.push(h);const e={id:"spacer",components:[new Dx(this.model,this.services,i?{size:15}:void 0)],growth:nb.PREFERRED};_.push(e)}return s&&_.push(b),_.push(y),[new AO(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,_,{direction:tb.COLUMN})]}}class RO extends Tx{constructor(){super(...arguments),this.type="grid",this.renderType=Vy.SVG}render(e=!0){const t=d_(this.getOptions(),"grid","x","enabled"),n=d_(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Cx.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Cx.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=q(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(d_(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=d_(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=d_(this.getOptions(),"grid","x","numberOfTicks");r.ticks(e)}const i=t.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}drawYGrid(e){const t=this.parent,n=this.backdrop.attr("width"),r=Z(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(d_(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=d_(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=d_(this.getOptions(),"grid","y","numberOfTicks");r.ticks(e)}const i=t.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}getGridlineThreshold(e){const t=this.parent,n=t.selectAll(".x.grid .tick").nodes().sort(((e,t)=>Number(o_(e).tx)-Number(o_(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+o_(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,a=n[r],o=n[i];let s;if(a)if(o)s=+o_(o).tx-+o_(a).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Cx.getSVGElementSize(e).width-+o_(a).tx}else s=+o_(o).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=d_(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=o_(this),r=Number(n.tx)-t,i=Number(n.tx)+t;return r<=e[0]&&e[0]<=i}))}drawBackdrop(e,t){const n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),[a,o]=r.range(),[s,l]=i.range();this.backdrop=Cx.appendOrSelect(n,"svg.chart-grid-backdrop");const c=Cx.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",a).attr("y",l).attr("width",Math.abs(o-a)).attr("height",Math.abs(s-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(e){e.selectAll("text").remove(),e.select(".domain").remove()}}class NO extends Tx{constructor(){super(...arguments),this.type="area",this.renderType=Vy.SVG,this.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-area"}))).attr("opacity",(e=>e.name!==t.datum().name?wb.unselected:wb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-area"}))).attr("opacity",wb.selected)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions();let r=[0,0];const{cartesianScales:i}=this.services,a=i.getOrientation(),o=qu().curve(this.services.curves.getD3Curve()).defined((e=>null!=e[i.getRangeIdentifier()])),s=this.model.getGroupedData(this.configs.groups),l=d_(n,"bounds"),c=l&&s&&1===s.length;!c&&l&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${s.length}`);let u=0;const d=(e,t)=>{!1===d_(n,"axes",e,"includeZero")&&t[0]>0&&t[1]>0&&(u=t[0])},h=e=>c?i.getBoundedScaledValues(e)[0]:i.getRangeValue(u),f=e=>c?i.getBoundedScaledValues(e)[1]:i.getRangeValue(e);a===Yy.VERTICAL?(r=i.getMainYScale().domain(),d(i.getMainYAxisPosition(),r),o.x((e=>i.getDomainValue(e))).y0((e=>h(e))).y1((e=>f(e)))):(r=i.getMainXScale().domain(),d(i.getMainXAxisPosition(),r),o.x0((e=>h(e))).x1((e=>f(e))).y((e=>i.getDomainValue(e))));const p=d_(n,"color","gradient","enabled"),m=s&&1===s.length&&p;s.length>1&&p&&console.error("Gradients can only be enabled when having 1 single dataset");const g=t.selectAll("path.area").data(s,(e=>e.name)),v=ht(this.services.domUtils.getMainContainer());if(g.exit().attr("opacity",0).remove(),!s.length)return;if(m){const e=v.select(`path.${this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:s[0].name})}`).node();let t;if(e)t=getComputedStyle(e,null).getPropertyValue("stroke");else{const e=d_(this.model.getOptions(),"color","scale");null!==e&&(t=e[Object.keys(e)[0]])}zS.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${s[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:zS.getStops(r,t)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));const y=this,b=g.enter().append("path");m?b.merge(g).style("fill",(e=>`url(#${this.services.domUtils.generateElementIDString(`${e.name.replace(" ","")}_${this.gradient_id}`)})`)).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.name,originalClassName:"area"}))).attr("d",(e=>{const{data:t}=e;return o(t)})):(b.attr("opacity",0).merge(g).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"area"}))).style("fill",(e=>y.model.getFillColor(e.name))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"area-update-enter",animate:e}))).attr("opacity",c?1:wb.selected).attr("d",(e=>{const{data:t}=e;return o(t)})),c&&b.attr("fill-opacity",wb.selected).style("stroke",(e=>y.model.getStrokeColor(e.name))).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class IO extends Tx{constructor(){super(...arguments),this.type="line",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e.name!==t.datum().name?Nb.unselected:Nb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Nb.selected)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,a]=p_((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),o=this.getOptions(),s=Wu().x(i).y(a).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(o.axes).some((e=>o.axes[e].percentage)),{groupMapsTo:t}=o.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:e}).map((e=>{const n=this.services.cartesianScales.getDomainIdentifier(e),r=this.services.cartesianScales.getRangeIdentifier(e);return{name:d_(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!cy(e,(e=>e[0]!==e[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=t.selectAll("path.line").data(l,(e=>e.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(e=>e.name)).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(e=>{const{data:t}=e;return t.map((e=>e[this.services.cartesianScales.getRangeIdentifier(e)])).join(",")})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"line-update-enter",animate:e}))).attr("opacity",(e=>e.hidden?0:1)).attr("d",(e=>{const{data:t}=e;return s(t)}))}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class PO extends Tx{constructor(){super(...arguments),this.type="ruler",this.renderType=Vy.SVG,this.isXGridEnabled=d_(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=d_(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=d_(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(e){return e}showRuler(e,[t,n]){const r=this.parent,i=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[s,l]=o.range(),c=i===Yy.HORIZONTAL?n:t,u=Cx.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Cx.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=a.map((e=>({domainValue:this.services.cartesianScales.getDomainValue(e),originalData:e}))).filter((e=>function(e,t){return e>t-5&&e<t+5}(e.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((e=>e.domainValue)).join()===this.pointsWithinLine.map((e=>e.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(Fy.Tooltip.MOVE,{mousePosition:[t,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((e,t)=>{if(0===e.length)return e.push(t),e;const n=e[0].domainValue,r=Math.abs(c-t.domainValue),i=Math.abs(c-n);return r>i||(r<i?e=[t]:e.push(t)),e}),[]);if(p.length>0){const e=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),r=p.map((e=>e.domainValue)),a=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return r.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ay(this.elementsToHighlight,a)&&this.hideRuler(),a.dispatch("mouseover"),this.elementsToHighlight=a,this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(e)}),u.attr("opacity",1);const o=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",o.domainValue).attr("y2",o.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",o.domainValue).attr("x2",o.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Cx.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(Fy.Tooltip.HIDE),t.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const e=this,t=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let r=function(t){const n=ft(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const a=this;a.mousePosition=ft(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(a,i)}),t)}}((function(t){const{mousePosition:n}=this;e.showRuler(t,n)}),n.length%50*12.5,t)),this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const e=this.parent;this.backdrop=Cx.appendOrSelect(e,"svg.chart-grid-backdrop")}}class $O extends Tx{constructor(){super(...arguments),this.type="scatter",this.renderType=Vy.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-hover-scatter"})})).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:e}=this.services;if(!e)throw new Error("Services events are undefined.");e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(Fy.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(Fy.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(e){const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");const n=t.getDomainIdentifier(e),r=this.model.get("zoomDomain");return void 0!==r?e.filter((e=>e[n].getTime()>=r[0].getTime()&&e[n].getTime()<=r[1].getTime())):e}getScatterData(){const e=this.getOptions(),{stacked:t}=this.configs;let n;if(t){const t=Object.keys(e.axes).some((t=>e.axes[t].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:t})}else{const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((t=>{const n=e.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}))}return this.filterBasedOnZoomDomain(n)}render(e){if(!d_(this.getOptions(),"points","enabled")&&!d_(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const a=i.getDomainIdentifier(),o=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[a]}`));o.exit().attr("opacity",0).remove();const s=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(s,e),this.addEventListeners()}isDatapointThresholdAnomaly(e){const{handleThresholds:t}=this.configs;if(!t)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const r=n.getOrientation(),[i,a]=p_(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[o,s]=p_((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=o(e),c=s(e);return a&&i?c<=a.scaleValue&&l>=i.scaleValue:a?c<=a.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=n.data,[s,l]=p_((e=>a.getDomainValue(e)),(e=>a.getRangeValue(e)),a.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=a.getDomainIdentifier(e),n=this.model.getIsFilled(e[o],e[t],e,r)?[Gy.FILL,Gy.STROKE]:[Gy.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[o],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=a.getDomainIdentifier(e);return this.model.getIsFilled(e[o],e[t],e,r)})).classed("unfilled",(e=>{const t=a.getDomainIdentifier(e);return!this.model.getIsFilled(e[o],e[t],e,r)})).transition().call((e=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:e,name:"scatter-update-enter",animate:t})})).attr("cx",s).attr("cy",l).attr("r",n.points.radius).style("fill",(e=>{const t=a.getDomainIdentifier(e);if(this.model.getIsFilled(e[o],e[t],e,r))return this.model.getFillColor(e[o],e[t],e)})).style("stroke",(e=>{const t=a.getDomainIdentifier(e);return this.model.getStrokeColor(e[o],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[a.getRangeIdentifier(e)])),this.addEventListeners()}getTooltipAdditionalItems(e){return null}addEventListeners(){const e=this,{groupMapsTo:t}=e.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,r){var i,a;const o=ht(this);o.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:n[t],originalClassName:o.attr("class")}))).style("fill",(n=>{var r;const i=null==(r=e.services.cartesianScales)?void 0:r.getDomainIdentifier(n);return e.model.getFillColor(n[t],n[i],n)})).classed("unfilled",!1),null==(i=e.services.events)||i.dispatchEvent(Fy.Tooltip.SHOW,{event:n,hoveredElement:o,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(a=e.services.events)||a.dispatchEvent(Fy.Scatter.SCATTER_MOUSEOVER,{event:n,element:o,datum:r})})).on("mousemove",(function(t,n){var r,i;const a=ht(this);null==(r=e.services.events)||r.dispatchEvent(Fy.Scatter.SCATTER_MOUSEMOVE,{event:t,element:a,datum:n}),null==(i=e.services.events)||i.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(Fy.Scatter.SCATTER_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(n,r){var i,a,o;const s=ht(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,a=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),o=e.model.getIsFilled(r[t],r[a],r,n);s.classed("unfilled",!o).style("fill",(r=>o||n?e.model.getFillColor(r[t],r[a],r):null))}null==(a=e.services.events)||a.dispatchEvent(Fy.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(o=e.services.events)||o.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:s})}))}destroy(){var e;null==(e=this.parent)||e.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:t}=this.services;if(!t)throw new Error("Services events undefined");t.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(Fy.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(Fy.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}class BO extends Tx{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=Vy.SVG,this.truncation={[Wy.LEFT]:!1,[Wy.RIGHT]:!1,[Wy.TOP]:!1,[Wy.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=d_(n,"axes",t,"visible"),i=this.getComponentContainer(),{width:a,height:o}=Cx.getSVGElementSize(i,{useAttrs:!0}),s=Cx.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===Wy.BOTTOM||t===Wy.TOP?(l=this.configs.axes[Wy.LEFT]?this.margins.left:0,c=this.configs.axes[Wy.RIGHT]?a-this.margins.right:a):(l=o-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(t);let d;switch(this.scaleType===Ky.LABELS||this.scaleType===Ky.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case Wy.LEFT:d=Z;break;case Wy.BOTTOM:d=q;break;case Wy.RIGHT:d=W;break;case Wy.TOP:d=G}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Cx.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${AS.GRAPHICS_OBJECT} ${AS.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Cx.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=d_(n,"axes",t),g=this.scaleType===Ky.TIME||m.scaleType===Ky.TIME,v=t===Wy.LEFT||t===Wy.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=d_(m,"scaleType"),_=d_(n,"data","loading"),w=d_(m,"ticks","number"),E=d_(m,"ticks","values"),x=d_(m,"truncation","type"),S=d_(m,"truncation","threshold"),O=d_(m,"truncation","numCharacter"),C=null!==w,T=d_(n,"timeScale"),A=Cx.appendOrSelect(p,"g.tick"),M=Cx.appendOrSelect(A,"text").text("0"),k=Cx.getSVGElementSize(M.node(),{useBBox:!0}).height;A.remove();const L=this.scaleType||m.scaleType||Ky.LINEAR,D=d(u).tickSizeOuter(0);if(u.ticks){let e;if(C?e=w:(e=Eb.number,v&&(e=this.getNumberOfFittingTicks(o,k,Eb.verticalSpaceRatio))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),D.ticks(e),g)if(u.ticks(e).length){const r=d_(n,"timeScale","addSpaceOnEdges"),i=d_(n,"axes",t,"domain"),a=u.copy();r&&!i&&a.nice(e);const o=a.ticks(e);r&&o.length>2&&!i&&(o.splice(o.length-1,1),o.splice(0,1)),D.tickValues(o)}else D.tickValues([])}let R;const N=d_(m,"ticks","formatter");if(g){const e=RE(D.tickValues(),d_(n,"timeScale","timeInterval"));R=null===N?(t,n)=>LE(t,n,D.tickValues(),e,T):(t,n)=>{const r=LE(t,n,D.tickValues(),e,T);return N(t,n,r)}}else null===N?L===Ky.LINEAR&&(R=e=>e.toLocaleString()):R=N;D.tickFormat(R);const[I,P]=this.services.cartesianScales.getScaleByPosition(t).domain();let $;if(E){if(g)E.forEach(((e,t)=>{void 0===e.getTime&&(E[t]=new Date(e))})),$=E.filter((e=>{const t=e.getTime();return t>=new Date(I).getTime()&&t<=new Date(P).getTime()}));else if(b===Ky.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();$=E.filter((t=>e.includes(t)))}else $=E.filter((e=>e>=I&&e<=P));D.tickValues($)}switch(t){case Wy.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case Wy.BOTTOM:f.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case Wy.RIGHT:f.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case Wy.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const B=this.model.isDataEmpty();if(m.title){const e=Cx.appendOrSelect(s,"text.axis-title").html(B||_?"":m.title),n=d_(m,"titleOrientation");let r;switch(t){case Wy.LEFT:n===pb.RIGHT?e.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):e.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case Wy.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case Wy.RIGHT:n===pb.LEFT?e.attr("transform","rotate(-90)").attr("y",a).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-a).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case Wy.TOP:r=Cx.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${r/2})`).style("text-anchor","middle")}}if(g){const t=RE(D.tickValues(),d_(n,"timeScale","timeInterval")),r=T.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(D),i.selectAll(".tick").data(D.tickValues(),u).order().select("text").style("font-weight",((e,n)=>kE(e,n,D.tickValues(),t,r)?"bold":"normal"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(D):f.call(D);if(p.call(D),t===Wy.BOTTOM||t===Wy.TOP){let e=!1;const n=d_(m,"ticks","rotation");if(n===db.ALWAYS)e=!0;else if(n===db.NEVER)e=!1;else if(!n||n===db.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Cx.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Cx.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=ht(this),i=parseFloat(d_(o_(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(C||(D.ticks(this.getNumberOfFittingTicks(a,k,Eb.horizontalSpaceRatio)),p.call(D),f.call(D)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===Wy.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(_?s.attr("opacity",0):s.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(e=>e)),p.selectAll("g.tick").attr("aria-label",(e=>e)),x!==Zy.NONE&&b===Ky.LABELS&&!E){const e=this.services.cartesianScales.getScaleDomain(t);if(e.length>0){const n=i.select(`g.axis.${t} g.ticks g.tick`).html();s.selectAll("g.ticks g.tick").html(n);const r=this;s.selectAll("g.tick text").data(e).text((function(e){return e.length>S?(r.truncation[t]=!0,c_(e,x,O)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>S?c_(e,x,O):e})),s.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),s.selectAll("g.tick text").data(e)}}this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Cx.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=d_(r,"axes",t),a=d_(i,"scaleType"),o=d_(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOVER,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&t.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:ht(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEMOVE,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&t.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOUT,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&s.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} g.ticks.invisible`)}getTitleRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} text.axis-title`)}getNumberOfFittingTicks(e,t,n){return Am(Math.floor(e/(t*n)),2,Eb.number)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Cx.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class zO extends BO{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer(),r=Cx.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=ht(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const a=r.select("text"),{width:o,height:s}=Cx.getSVGElementSize(a,{useBBox:!0}),l=Cx.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case Wy.LEFT:c=-o+Number(a.attr("x")),u=-s/2;break;case Wy.RIGHT:c=Math.abs(Number(a.attr("x"))),u=-s/2;break;case Wy.TOP:c=-o/2,u=-s+Number(a.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case Wy.BOTTOM:c=-o/2,u=s/2-2,i.truncation[t]&&(c=-o,l.attr("transform","rotate(-45)"))}l.attr("x",c-Ob.rectanglePadding).attr("y",u).attr("width",o+2*Ob.rectanglePadding).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Cx.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=d_(r,"axes",t),a=d_(i,"scaleType"),o=d_(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=ht(this).select("text"),n=t.datum();s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),a===Ky.LABELS&&n.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=ht(this).select("text"),n=t.datum();s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_CLICK,{event:e,element:ht(this).select("text"),datum:ht(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOUT,{event:e,element:ht(this).select("text"),datum:ht(this).select("text").datum()}),a===Ky.LABELS&&s.services.events.dispatchEvent(Fy.Tooltip.HIDE)})).on("focus",(function(e){const t={clientX:0,clientY:0};if(e.target){e.target.focus();const n=e.target.getBoundingClientRect();t.clientX=n.x,t.clientY=n.y}s.services.events.dispatchEvent(Fy.Axis.LABEL_FOCUS,{event:{...e,...t},element:ht(this),datum:ht(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_BLUR,{event:e,element:ht(this),datum:ht(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(Fy.Tooltip.HIDE),s.services.events.dispatchEvent(Fy.Axis.LABEL_BLUR,{event:e,element:ht(this),datum:ht(this).select("text").datum()})),t===Wy.LEFT||t===Wy.RIGHT?e.key&&"ArrowUp"===e.key?s.goNext(this,e):e.key&&"ArrowDown"===e.key&&s.goPrevious(this,e):e.key&&"ArrowLeft"===e.key?s.goPrevious(this,e):e.key&&"ArrowRight"===e.key&&s.goNext(this,e)}))}goNext(e,t){e.nextElementSibling&&"path"!==e.nextElementSibling.tagName&&e.nextElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}goPrevious(e,t){e.previousElementSibling&&"path"!==e.previousElementSibling.tagName&&e.previousElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Cx.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class UO extends Tx{constructor(){super(...arguments),this.type="2D-axes",this.renderType=Vy.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys(Wy),r=d_(this.getOptions(),"axes");n.forEach((e=>{r[Wy[e]]&&(t[Wy[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=Wy[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===yb.DEFAULT?new BO(this.model,this.services,e):new zO(this.model,this.services,e);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[t]=n}})),Object.keys(this.children).forEach((t=>{this.children[t].render(e)}));const i={};Object.keys(this.children).forEach((e=>{const t=this.children[e],n=t.configs.position,r=t.getInvisibleAxisRef(),{width:a,height:o}=Cx.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Cx.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===Wy.LEFT||n===Wy.RIGHT)&&(s+=5)),n){case Wy.TOP:i.top=o+s;break;case Wy.BOTTOM:i.bottom=o+s;break;case Wy.LEFT:i.left=a+s;break;case Wy.RIGHT:i.right=a+s}})),this.services.events.dispatchEvent(Fy.Axis.RENDER_COMPLETE),Object.keys(i).some((e=>this.margins[e]!==i[e]))&&(this.margins=Object.assign(this.margins,i),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(Fy.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class jO extends Tx{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=d_(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===ab.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===ab.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===ab.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==ab.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(e)}}renderGridSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawXGrid(e),this.drawYGrid(e),e&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(e){const t=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(e),t===Yy.VERTICAL&&this.drawYGrid(e),t===Yy.HORIZONTAL&&this.drawXGrid(e),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(e){const t=this.computeOuterRadius();this.drawRing(t,0,e),e&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(e){const t=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(t,n,e),e&&this.setShimmerEffect("shimmer-areas")}setScales(){const e=this.services.cartesianScales.getMainXScale().range(),t=this.services.cartesianScales.getMainYScale().range();this.xScale=Js().domain([0,1]).range(e),this.yScale=Js().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Cx.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Cx.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(i).attr("x",a).attr("y",o),i.classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(e){const t=+this.backdrop.attr("width"),n=d_(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Cx.appendOrSelect(this.backdrop,"g.x.skeleton"),a=i.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",(e=>e)).attr("x2",(e=>e)).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(e){const t=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=d_(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),a=Cx.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),a.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(e,t,n=!0){const r=this.parent,{width:i,height:a}=Cx.getSVGElementSize(r,{useAttrs:!0}),o=Cx.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",a),s=0===t?"pie":"donut",l=d_(this.getOptions(),s,"alignment");Cx.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",i).attr("height",a).attr("fill","none");const c=zu().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(jb),d=e+(Math.min(i,a)-2*e)/2,h=Cx.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${d})`).attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=e+Gb;l===Qy.CENTER?f=i/2:l===Qy.RIGHT&&(f=i-e-Gb);const p=e+Wb;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2+jb}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,a=Cx.appendOrSelect(n,"defs").lower(),o=Cx.appendOrSelect(a,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(e)).attr("class",e).attr("x1",0-3*.2*r).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),s=`\n\t\t\t<stop class="${t}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${t}" offset="0.4"></stop>\n\t\t`;o.html(s),function e(){o.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(_r).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class FO extends FS{constructor(e){super(e)}getBoxQuartiles(e){return{q_25:L(e,.25),q_50:L(e,.5),q_75:L(e,.75)}}getBoxplotData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getGroupedData(),i=[];for(const{name:e,data:a}of n){const n=this.services.cartesianScales.getRangeIdentifier(),o=a.map((e=>e[n])).sort(r),s={[t]:e,counts:o,quartiles:this.getBoxQuartiles(o),outliers:null,whiskers:null},l=s.quartiles.q_25,c=s.quartiles.q_75,u=1.5*(c-l),d=l-u,h=c+u,f=[],p=[];for(const e of o)e<d||e>h?f.push(e):p.push(e);s.outliers=f;const m=A(p),g=T(p);s.whiskers={min:m||A([s.quartiles.q_25,s.quartiles.q_50,s.quartiles.q_75]),max:g||T([s.quartiles.q_25,s.quartiles.q_50,s.quartiles.q_75])},i.push(s)}return i}getTabularDataArray(){const e=this.getOptions(),{groupMapsTo:t}=e.data;return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...this.getBoxplotData().map((e=>{let n=d_(e,"outliers");return(null===n||0===n.length)&&(n=["–"]),[e[t],null!==d_(e,"whiskers","min")?d_(e,"whiskers","min").toLocaleString():"–",null!==d_(e,"quartiles","q_25")?d_(e,"quartiles","q_25").toLocaleString():"–",null!==d_(e,"quartiles","q_50")?d_(e,"quartiles","q_50").toLocaleString():"–",null!==d_(e,"quartiles","q_75")?d_(e,"quartiles","q_75").toLocaleString():"–",null!==d_(e,"whiskers","max")?d_(e,"whiskers","max").toLocaleString():"–",null!==d_(e,"quartiles","q_75")&&null!==d_(e,"quartiles","q_25")?(d_(e,"quartiles","q_75")-d_(e,"quartiles","q_25")).toLocaleString():"–",n.map((e=>e.toLocaleString())).join(",")]}))]}setColorClassNames(){const e=d_(this.getOptions(),"color","pairing");let t=d_(e,"option");t=t<=Ab["1-color"]?t:1;const n=this.allDataGroups.map((()=>`1-${t}-1`));this.colorClassNames=Us().range(n).domain(this.allDataGroups)}}class VO extends Tx{constructor(){super(...arguments),this.type="boxplot",this.renderType=Vy.SVG}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[s,l]=a.range(),[c,u]=o.range(),d=l-s,h=c-u;if(0===d)return;const{cartesianScales:f}=this.services,p=f.getOrientation(),m=p===Yy.VERTICAL,[g,v]=p_((e=>this.services.cartesianScales.getDomainValue(e)),(e=>this.services.cartesianScales.getRangeValue(e)),p),y=Math.floor((m?d:h)/i.length),b=Math.min(y/2,16),_=this.model.getBoxplotData(),w=t.selectAll(".box-group").data(_);w.exit().remove();const E=w.enter().append("g").attr("class","box-group"),x=w.merge(E);E.append("path").merge(w.select("path.vertical-line.start")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"vertical-line start"}))).attr("stroke-width",Lb.default).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-verticalstartline",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r]),n=t,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.quartiles.q_25);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.vertical-line.end")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"vertical-line end"}))).attr("stroke-width",Lb.default).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-verticalendline",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r]),n=t,i=f.getRangeValue(e.whiskers.max),a=f.getRangeValue(e.quartiles.q_75);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.box")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],originalClassName:"box"}))).attr("fill-opacity",kb.opacity.default).attr("stroke-width",Lb.default).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",(e=>e[r])).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-quartiles",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(Math[m?"max":"min"](e.quartiles.q_75,e.quartiles.q_25)),a=i+Math.abs(f.getRangeValue(e.quartiles.q_75)-f.getRangeValue(e.quartiles.q_25));return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.whiskers.max);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.whisker.start")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"whisker start"}))).attr("stroke-width",Lb.thicker).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-startingwhisker",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/4,n=t+b/2,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.whiskers.min);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"median"}))).attr("stroke-width",2).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-median",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(e.quartiles.q_50);return f_({x0:t,x1:n,y0:i,y1:i},p)})),E.append("path").merge(w.select("path.whisker.end")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"whisker end"}))).attr("stroke-width",Lb.thicker).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-endingwhisker",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/4,n=t+b/2,i=f.getRangeValue(e.whiskers.max),a=f.getRangeValue(e.whiskers.max);return f_({x0:t,x1:n,y0:i,y1:a},p)}));const S=x.selectAll("circle.outlier").data((e=>e.outliers.map((t=>({min:e.whiskers.min,max:e.whiskers.max,[r]:e[r],value:t})))));S.exit().remove();const O=S.enter().append("circle");S.merge(O).attr("r",Mb.radius).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],originalClassName:"outlier"}))).attr("fill-opacity",Mb.opacity.default).attr("cx",g).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-circles",animate:e}))).attr("cy",v),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){const a=ht(this);ht(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",kb.opacity.hovered),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:t.tooltip.groupLabel,value:i[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEOVER,{event:r,element:a,datum:i})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Boxplot.BOX_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);ht(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",kb.opacity.default),e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}addCircleEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,a){const o=ht(this);o.classed("hovered",!0).attr("fill-opacity",Mb.opacity.hovered).classed("unfilled",!1),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:o,items:[{label:t.tooltip.groupLabel,value:a[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP]})},{label:"Outlier",value:a[r]}]}),e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:o,datum:a})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1).attr("fill-opacity",Mb.opacity.default),e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}}class HO extends Tx{constructor(){super(...arguments),this.type="zero-line",this.renderType=Vy.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),a=r>0&&i<0||r<0&&i>0,o=this.getComponentContainer();if(!a)return void o.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=h_({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Cx.appendOrSelect(o,"line.domain").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"zero-line-update",animate:e}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class GO extends $O{constructor(){super(...arguments),this.type="bubble",this.renderType=Vy.SVG}getRadiusScale(e){const t=this.getOptions(),{radiusMapsTo:n}=t.bubble,r=e.data(),i=r.map((e=>e[n])).filter((e=>e)),a=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=i.length>0,s=o?c(i):[1,1];return Js().domain(s).range(o?t.bubble.radiusRange(a,r):[4,4])}styleCircles(e,t){const n=this.getOptions(),{radiusMapsTo:r}=n.bubble,i=this.getRadiusScale(e),{groupMapsTo:a}=n.data,{cartesianScales:o}=this.services,[s,l]=p_((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation());e.raise().classed("dot",!0).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e[o.getRangeIdentifier(e)])).transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"bubble-update-enter",animate:t}))).attr("cx",s).attr("cy",l).attr("r",(e=>i(e[r]||1))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e[a],originalClassName:"dot"}))).style("fill",(e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",n.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(e){const t=d_(this.getOptions(),"bubble");return[{label:d_(t,"radiusLabel"),value:e[d_(t,"radiusMapsTo")]}]}}class WO extends FS{constructor(e){super(e)}getMatchingRangeIndexForDatapoint(e){let t;for(let n=e.ranges.length-1;n>0;n--){const r=e.ranges[n];if(e.value>=r)return t=n,t}return 0}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier(),i=d_(t,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...e.map((e=>[e.title,e[n],null===e.value?"–":e.value,null===d_(e,"marker")?"–":e.marker,null===d_(e,"marker")?"–":`${Math.floor(e[r]/e.marker*100)}%`,i[this.getMatchingRangeIndexForDatapoint(e)]]))]}}class qO extends Tx{constructor(){super(...arguments),this.type="bullet",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-simple-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-simple-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getComponentContainer({withinChartClip:!0}),i=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[s,l]=a.range(),[,c]=a.domain();(()=>{const t=[];i.forEach((e=>{e.ranges?e.ranges.forEach(((n,r)=>{null!=n&&n<c&&t.push({datum:e,value:n,order:r+1})})):t.push({datum:e,order:1})}));const a=Cx.appendOrSelect(r,"g.range-boxes").selectAll("path.range-box").data(t,(e=>`${e[n]}-${e.order}`));a.exit().attr("opacity",0).remove(),a.enter().append("path").attr("opacity",0).merge(a).attr("class",(e=>`range-box order-${e.order}`)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-range-box-update-enter",animate:e}))).attr("d",(e=>{let t,n,r,i;return 1===e.order?(t=this.services.cartesianScales.getDomainValue(e.datum)-8,n=t+16,r=l-2,i=s+1):(t=this.services.cartesianScales.getDomainValue(e.datum)-8,n=t+16,r=this.services.cartesianScales.getRangeValue(e.value),i=l),f_({x0:t,x1:n,y0:r,y1:i},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),(()=>{const t=Cx.appendOrSelect(r,"g.bars").selectAll("path.bar").data(i,(e=>e[n]));t.exit().attr("opacity",0).remove(),t.enter().append("path").attr("opacity",0).merge(t).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[n],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[n]))).attr("d",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-4,n=t+8,r=this.services.cartesianScales.getRangeValue(0)+1,i=this.services.cartesianScales.getRangeValue(e);return f_({x0:t,x1:n,y0:r,y1:i},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value))})(),(()=>{const t=Cx.appendOrSelect(r,"g.markers").selectAll("path.marker").data(i.filter((e=>null!==d_(e,"marker"))),(e=>e[n]));t.exit().attr("opacity",0).remove(),t.enter().append("path").attr("opacity",0).merge(t).classed("marker",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-marker-update-enter",animate:e}))).attr("d",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-12,n=t+24,r=this.services.cartesianScales.getRangeValue(e.marker);return f_({x0:t,x1:n,y0:r,y1:r},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),(()=>{let t=[];i.filter((e=>null!==d_(e,"marker"))).forEach((e=>{const n=e.marker,r=e[o];t=t.concat([{datum:e,value:.25*n,barValue:r},{datum:e,value:.5*n,barValue:r},{datum:e,value:.75*n,barValue:r}])}));const a=Cx.appendOrSelect(r,"g.quartiles").selectAll("path.quartile").data(t,(e=>e[n]));a.exit().attr("opacity",0).remove(),a.enter().append("path").attr("opacity",0).merge(a).attr("class",(e=>"quartile "+(e.value<=e.barValue?"over-bar":""))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-quartile-update-enter",animate:e}))).attr("d",(({datum:e,value:t})=>{let n=4;e.ranges&&-1!==e.ranges.indexOf(t)&&(n=8);const r=this.services.cartesianScales.getDomainValue(e)-n/2,i=r+n,a=this.services.cartesianScales.getRangeValue(t);return f_({x0:r,x1:i,y0:a,y1:a},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),this.addEventListeners()}addEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,a){const o=ht(this);o.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:i,element:o,datum:a});const s=d_(t,"bullet","performanceAreaTitles"),l=e.model.getMatchingRangeIndexForDatapoint(a);e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:o,items:[{label:t.tooltip.groupLabel||"Group",value:a[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:a[n]})},{label:"Value",value:a[r]},{label:"Target",value:a.marker},{label:"Percentage",value:`${Math.floor(a[r]/a.marker*100)}%`},{label:"Performance",value:s[l]}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function ZO(e){const t=c(e,(e=>e.value)),n=Js().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(0===n[0]&&0===n[1])return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function YO(e,t){const n=d_(t,"gradient","colors"),r=!iy(n);let i=d_(t,"pairing","option");const a=ZO(e),o=a[0]<0&&a[1]>0?"diverge":"mono";(i<1&&i>4&&"mono"===o||i<1&&i>2&&"diverge"===o)&&(i=1);const s=r?n:[];if(!r){const e="diverge"===o?17:11;for(let t=1;t<e+1;t++)s.push(`fill-${o}-${i}-${t}`)}return cl().domain(a).range(s)}class KO extends $E{constructor(e){super(e),this._colorScale=void 0,this._matrix={}}getFillColor(e){return this._colorScale(e)}getCombinedData(){if(iy(this._matrix)){const e=this.getOptions(),t=this.getDisplayData();!iy(t)&&!iy(e.geoData.objects.countries)&&(e.geoData.objects.countries.geometries.forEach((e=>{this._matrix[e.properties.NAME]=e})),t.forEach((e=>{this._matrix[e.name]?this._matrix[e.name].value=e.value||null:console.warn(`Data point ${e} is missing geographical data.`)})))}return this._matrix}getTabularDataArray(){return[["Country ID","Country Name","Value"],...this.getDisplayData().map((e=>[null===e.id?"–":e.id,e.name,e.value]))]}getColorClassName(e){return`${e.originalClassName} ${this._colorScale(e.value)}`}setColorClassNames(){const e=d_(this.getOptions(),"color");this._colorScale=YO(this.getDisplayData(),e)}}function XO(e){return e}function QO(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=JO(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function JO(e,t){var n=function(e){if(null==e)return XO;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;l<c;)u[l]=e[l],++l;return u}}(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function l(e){return e.map(s)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=a(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(a);break;case"LineString":n=o(t.arcs);break;case"MultiLineString":n=t.arcs.map(o);break;case"Polygon":n=l(t.arcs);break;case"MultiPolygon":n=t.arcs.map(l);break;default:return null}return{type:r,coordinates:n}}(t)}function eC(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),s=o[0],l=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,a=r[l]){delete r[a.start];var c=a===n?n:n.concat(a);r[c.start=n.start]=i[c.end=a.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var u=a===n?n:a.concat(n);r[u.start=a.start]=i[u.end=n.end]=u}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a}function tC(e){return JO(e,nC.apply(this,arguments))}function nC(e,t){var n={},r=[],i=[];function a(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),r.push(e)}function o(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n<r;)t=i,i=e[n],a+=t[0]*i[1]-t[1]*i[0];return Math.abs(a)}(JO(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":a(t.arcs);break;case"MultiPolygon":t.arcs.forEach(a)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,i.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var r,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].length<2&&i.push(e)}))}))})),(r=(i=eC(e,i)).length)>1)for(var a,s,l=1,c=o(i[0]);l<r;++l)(a=o(i[l]))>c&&(s=i[0],i[0]=i[l],i[l]=s,c=a);return i})).filter((function(e){return e.length>0}))}}class rC extends PO{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=Vy.SVG}showRuler(e,[t,n]){const r=this.parent,i=this.model.getOptions(),{cartesianScales:a}=this.services,o=a.getOrientation(),s=a.getRangeScale(),[l,c]=s.range(),u=a.getDomainScale(),d=u.invert(o===Yy.VERTICAL?t:n),h=Cx.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),f=Cx.appendOrSelect(h,"line.ruler-line"),p=r.selectAll("[role=graphics-symbol]").filter((e=>{if(parseFloat(wp(e,"data.x0"))<=d&&parseFloat(wp(e,"data.x1"))>=d)return!0}));if(p.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ay(this.elementsToHighlight,p)&&this.hideRuler(),p.dispatch("mouseover"),this.elementsToHighlight=p;const e=ht(p.nodes()[0]).datum(),r=parseFloat(wp(e,"data.x0")),a=parseFloat(wp(e,"data.x1")),s=this.model.getActiveDataGroupNames(),d=s.reverse().map((t=>({label:t,value:wp(e,`data.${t}`),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:t})}))).filter((e=>0!==e.value));if(d.length>0){this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:f,items:[{label:wp(i,"bins.rangeLabel")||"Range",value:`${r} – ${a}`},...d,...!0===d_(i,"tooltip","showTotal")?[{label:wp(i,"tooltip.totalLabel")||"Total",value:s.reduce(((t,n)=>t+parseFloat(wp(e,`data.${n}`))),0)}]:[]]}),h.attr("opacity",1);const p=u((r+a)/2);"horizontal"===o?f.attr("x1",c).attr("x2",l).attr("y1",p).attr("y2",p):f.attr("y1",c).attr("y2",l).attr("x1",p).attr("x2",p)}else this.hideRuler()}else this.hideRuler()}}class iC extends PO{formatTooltipData(e){return e.reverse()}}class aC extends MS{constructor(e,t,n){super(e,t,n),this.type="color-legend",this.renderType=Vy.SVG,this.gradient_id=`gradient-id-${Math.floor(99999999999*Math.random())}`,this.handleAxisCompleteEvent=()=>{const e=this.getComponentContainer(),{width:t}=Cx.getSVGElementSize(e,{useAttrs:!0}),n=d_(this.getOptions(),"data","loading");if(t>Rb.color.barWidth&&!n){const t=d_(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:n}=this.services,r=n.getMainXScale().range();if(r[0]>1&&(e.select("g.legend").attr("transform",`translate(${r[0]}, 0)`),t)){const{width:t}=Cx.getSVGElementSize(e.select("g.legend-title").select("text"),{useBBox:!0}),n=r[0]-t-9;n>1?e.select("g.legend-title").attr("transform",`translate(${n}, 0)`):(e.select("g.legend").attr("transform",`translate(${r[0]}, 16)`),e.select("g.legend-title").attr("transform",`translate(${r[0]}, 0)`))}}else e.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=n.chartType}init(){"heatmap"===this.chartType&&this.services.events.addEventListener(Fy.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(e=!1){const t=this.getOptions(),n=this.getComponentContainer(),{width:r}=Cx.getSVGElementSize(n,{useAttrs:!0}),i=d_(t,"color","gradient","colors"),a=d_(t,this.chartType,"colorLegend","type");let o=d_(t,"color","pairing","option");const s=d_(t,"heatmap","colorLegend","title");if(d_(this.getOptions(),"data","loading"))return void n.html("");const l=!iy(i),c=ZO(this.model.getDisplayData()),u=!(r<=Rb.color.barWidth),d=u?Rb.color.barWidth:r,h=Cx.appendOrSelect(n,"g.legend"),f=Cx.appendOrSelect(h,"g.legend-axis");if(s){const e=Cx.appendOrSelect(n,"g.legend-title");Cx.appendOrSelect(e,"text").text(s).attr("dy","0.7em"),h.attr("transform","translate(0, 16)")}const p=c[0]<0&&c[1]>0?"diverge":"mono";(o<1&&o>4&&"mono"===p||o<1&&o>2&&"diverge"===p)&&(o=1);let m=[];const g="diverge"===p?17:11;if(l)m=i;else for(let e=1;e<g+1;e++)m.push(a===gb.LINEAR?`stop-color-${p}-${o}-${e}`:`fill-${p}-${o}-${e}`);const v=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}(an(c[0],c[1]),3),y=Js().domain(c).range([0,d]),b=q(y).tickSize(0).tickValues(v);let _;switch(a){case gb.LINEAR:this.drawLinear(m,h,d);break;case gb.QUANTIZE:_=this.drawQuantize(m,p,l,h,d),y.range([_,d]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform",`translate(0,${Rb.color.axisYTranslation})`).call(b),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",u?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",u&&"choropleth"!==this.chartType?"middle":"start")}drawLinear(e,t,n){const r=100/(e.length-1);Cx.appendOrSelect(t,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(e).enter().append("stop").attr("offset",((e,t)=>t*r+"%")).attr("class",((t,n)=>e[n])).attr("stop-color",(e=>e)),Cx.appendOrSelect(t,"rect").attr("width",n).attr("height",Rb.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(e,t,n,r,i){!n&&"diverge"===t&&e.splice(e.length/2,1);const a=js().domain(e).range([0,i]);return Cx.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(a.domain()).join("rect").attr("x",(e=>a(e))).attr("y",0).attr("width",Math.max(0,a.bandwidth()-1)).attr("height",Rb.color.barHeight).attr("class",(e=>e)).attr("fill",(e=>e)),"mono"===(!n&&t)?a.bandwidth()-1:0}destroy(){"heatmap"===this.chartType&&this.services.events.removeEventListener(Fy.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class oC extends OS{constructor(){super(...arguments),this.type="meter-title",this.renderType=Vy.SVG}render(e=!1){const t=d_(this.model.getDisplayData(),0),n=this.getOptions(),r=this.getComponentContainer(),{groupMapsTo:i}=n.data;if(d_(n,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const e=r.selectAll("text.meter-title").data([t[i]]);e.enter().append("text").classed("meter-title",!0).merge(e).attr("x",0).attr("y","1em").text((e=>e)),e.exit().remove(),this.appendPercentage()}this.displayStatus();const a=this.getMaxTitleWidth(),o=Cx.appendOrSelect(r,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)}displayBreakdownTitle(){const e=this.getComponentContainer(),t=this.getOptions(),n=this.model.getMaximumDomain(this.model.getDisplayData()),r=d_(t,"meter","proportional","total"),i=d_(t,"meter","proportional","unit")?d_(t,"meter","proportional","unit"):"";let a;if(n===r)a=null;else{const e=null!==r?r-n:n,o=d_(t,"meter","proportional","breakdownFormatter");a=null!==o?o({datasetsTotal:n,total:r}):`${n} ${i} used (${e} ${i} available)`}const o=e.selectAll("text.proportional-meter-title").data([a]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text((e=>e)),o.exit().remove();const s=this.getMaxTitleWidth(),l=Cx.appendOrSelect(e,"text.proportional-meter-title");s>0&&l.node().getComputedTextLength()>s&&this.truncateTitle(l,s)}displayTotal(){const e=this.getComponentContainer(),t=this.getOptions(),n=d_(t,"meter","proportional","total"),r=n?d_(t,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=d_(t,"meter","proportional","unit")?d_(t,"meter","proportional","unit"):"",a=d_(t,"meter","proportional","totalFormatter"),o=null!==a?a(r):`${n} ${i} total`,s=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=s.width?s.width:this.parent.node().getAttribute("width"),c=e.selectAll("text.proportional-meter-total").data([o]);c.enter().append("text").classed("proportional-meter-total",!0).merge(c).attr("x",this.model.getStatus()&&"string"!=typeof l?l-Bb.paddingRight:l).attr("y","1em").attr("text-anchor","end").text((e=>e)),c.exit().remove()}displayStatus(){const e=this.getComponentContainer(),t=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=t.width?t.width:0,r=this.model.getStatus(),i=$b.indicatorSize/2,a=Cx.appendOrSelect(e,"g.status-indicator").attr("class",null!==r?`status-indicator status--${r}`:"").attr("transform",`translate(${n-i}, 0)`),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy",8);const l=a.selectAll("path.innerFill").data(o);l.enter().append("path").merge(l).attr("d",this.getStatusIconPathString(r)).attr("transform",`translate(-${i}, 0)`).attr("class","innerFill"),l.exit().remove(),s.exit().remove()}appendPercentage(){const e=d_(this.model.getDisplayData(),0,"value"),t=this.getComponentContainer(),n=Cx.appendOrSelect(t,"text.meter-title"),r=!0===d_(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[e]:[],i=t.selectAll("text.percent-value").data(r),a=Pb.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((e=>`${e}%`)).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()}truncateTitle(e,t){super.truncateTitle(e,t);const n=Cx.appendOrSelect(this.parent,"tspan"),r=Pb.paddingRight,i=Math.ceil(n.node().getComputedTextLength());Cx.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+i+r)}getMaxTitleWidth(){const e=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),t=d_(this.getOptions(),"meter","proportional"),n=e.width?e.width:this.parent.node().getBoundingClientRect().width;if(null!==t){const e=Cx.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-Cx.getSVGElementSize(e,{useBBox:!0}).width-Bb.paddingLeft}{const e=Cx.appendOrSelect(this.parent,"text.percent-value"),t=Pb.paddingRight,r=e.node().getComputedTextLength(),i=Cx.appendOrSelect(this.parent,"g.status-indicator").node();return n-r-t-(Cx.getSVGElementSize(i,{useBBox:!0}).width+$b.paddingLeft)}}getStatusIconPathString(e){switch(e){case ub.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case ub.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case ub.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class sC extends Tx{getBarWidth(){const e=this.getOptions();if(e.bars.width)return e.bars.width;const t=this.model.getDisplayData().length,n=this.services.cartesianScales.getMainXScale(),r=Cx.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!n.step){const n=d_(e,"bars","spacingFactor");return Math.min(e.bars.maxWidth,r*n/t)}return Math.min(e.bars.maxWidth,n.step()/2)}isOutsideZoomedDomain(e,t){if(this.model.getDisplayData().length<=1)return!1;const n=this.model.get("zoomDomain");if(void 0!==n){const r=this.services.cartesianScales.getDomainScale();return e<r(n[0])||t>r(n[1])}return!1}}class lC extends Tx{constructor(){super(...arguments),this.type="circle-pack",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-circlepack"}))).attr("opacity",(e=>e.data.dataGroupName===t.datum().name?1:Tb.circles.fillOpacity))},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-circlepack"}))).attr("opacity",1)}}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(n<1||r<1)return;let i=this.model.getDisplayData();const a=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),s=this.getOptions(),l=d_(s,"canvasZoom","enabled");a&&d_(i,0,"children")&&(i=d_(i,0,"children"));const c=Qo({children:i}).sum((e=>e.value)).sort(((e,t)=>t.value-e.value)),u=xs().size([n,r]).padding((e=>e.depth>=1?Tb.padding.children+3:Tb.padding.mainGroup+3))(c).descendants().splice(1).filter((e=>e.depth<=o)),d=t.selectAll("circle.node").data(u);d.exit().attr("width",0).attr("height",0).remove();const h=d.enter().append("circle").classed("node",!0);h.merge(d).attr("class",(e=>{const t=l&&3===o?this.getZoomClass(e):"";return this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.data.dataGroupName,originalClassName:e.children?`node ${t}`:`node node-leaf ${t}`})})).style("fill",(e=>this.model.getFillColor(e.data.dataGroupName))).style("stroke",(e=>this.model.getFillColor(e.data.dataGroupName))).attr("cx",(e=>e.x)).attr("cy",(e=>e.y)).transition("circlepack-leaf-update-enter").call((e=>this.services.transitions.setupTransition({transition:e,name:"circlepack-leaf-update-enter"}))).attr("r",(e=>e.r)).attr("opacity",1).attr("fill-opacity",Tb.circles.fillOpacity),!0===l&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,h,Cb),this.setBackgroundListeners()),a||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(e){const t=e.map((e=>e.data));this.parent.selectAll("circle.node").filter((e=>t.some((t=>t===e.data))&&e.depth>1)).style("stroke",(e=>this.model.getFillColor(e.data.dataGroupName)))}highlightChildren(e){const t=e.map((e=>e.data));this.parent.selectAll("circle.node").filter((e=>t.some((t=>t===e.data))&&e.depth>1)).style("stroke",Tb.circles.hover.stroke)}getZoomClass(e){return 3===this.model.getHierarchyLevel()&&this.focal&&(e.data===this.focal.data||this.focal.children.some((t=>t.data===e.data)))?"focal":"non-focal"}addLegendListeners(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){ht(this.services.domUtils.getMainContainer()).on("click",(()=>null))}setBackgroundListeners(){const e=ht(this.services.domUtils.getMainContainer()),t=this,n=this.parent.selectAll("circle.node");e.on("click",(()=>{t.focal=null,t.model.updateHierarchyLevel(2),e.classed("zoomed-in",!1),t.services.canvasZoom.zoomOut(n,Cb)}))}getZoomIcon(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'}addEventListeners(){const e=this;this.parent.selectAll("circle.node").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0);const i=e.model.getHierarchyLevel(),a=i>2&&!r.classed("focal"),o=d_(e.model.getOptions(),"canvasZoom","enabled");let s=!1;if(!a){let a=[],l=[],c=null;n.children?(n.depth>1&&o&&(s=!0,r.classed("clickable",!0)),a=n.children.map((t=>{if(null!==t)return"number"==typeof t.data.value?{label:t.data.name,value:t.data.value}:{label:t.data.name,labelIcon:o&&i<=2?e.getZoomIcon():null,value:t.value}})),l=[{label:wp(e.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],e.highlightChildren(n.children)):c=n.value;const u=getComputedStyle(this,null).getPropertyValue("fill");e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{color:u,label:n.data.name,labelIcon:s&&o&&i<=2?e.getZoomIcon():null,value:c},...a,...l]})}e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEOVER,{event:t,element:r,datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),n.children&&e.unhighlightChildren(n.children),e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(t,n){const r=ht(this),i=r.classed("non-focal"),a=d_(e.model.getOptions(),"canvasZoom","enabled");if(a&&e.model.getHierarchyLevel()>2){const t=e.parent.selectAll("circle.node");ht(e.services.domUtils.getMainContainer()).classed("zoomed-in",!1),e.focal=null,e.model.updateHierarchyLevel(2),e.services.canvasZoom.zoomOut(t,Cb)}else if(2===n.depth&&n.children&&!i&&a){const r=e.parent.selectAll("circle.node");ht(e.services.domUtils.getMainContainer()).classed("zoomed-in",!0),e.focal=n,e.model.updateHierarchyLevel(3),e.services.canvasZoom.zoomIn(n,r,Cb),t.stopPropagation()}e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_CLICK,{event:t,element:r,datum:n})}))}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function cC(e,t){const n=un(this._current,e);return e=>(this._current=n(e),t(this._current))}class uC extends Tx{constructor(){super(...arguments),this.type="pie",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e.data[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Fb}render(e=!0){const t=this,n=this.getComponentContainer(),r=this.getOptions(),{groupMapsTo:i}=r.data,{valueMapsTo:a}=r.pie,o=this.model.getDisplayData().filter((e=>e[a]>0)),s=this.computeRadius();this.arc=zu().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=zu().innerRadius(this.getInnerRadius()).outerRadius(s+Hb.outerRadiusOffset);const l=function(){var e=Yu,t=Zu,n=null,r=bu(0),i=bu(ku),a=bu(0);function o(o){var s,l,c,u,d,h=(o=ju(o)).length,f=0,p=new Array(h),m=new Array(h),g=+r.apply(this,arguments),v=Math.min(ku,Math.max(-ku,i.apply(this,arguments)-g)),y=Math.min(Math.abs(v)/h,a.apply(this,arguments)),b=y*(v<0?-1:1);for(s=0;s<h;++s)(d=m[p[s]=s]=+e(o[s],s,o))>0&&(f+=d);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(o[e],o[t])})),s=0,c=f?(v-h*b)/f:0;s<h;++s,g=u)l=p[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:o[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:y};return m}return o.value=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),o):r},o.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),o):i},o.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:bu(+e),o):a},o}().value((e=>e[a])).sort(d_(r,"pie","sortFunction")).padAngle(Vb)(o),c=Cx.appendOrSelect(n,"g.slices").attr("role",AS.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(e=>e.data[i]));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.data[i],originalClassName:"slice"}))).style("fill",(e=>t.model.getFillColor(e.data[i]))).attr("d",this.arc).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"pie_slice_enter_update",animate:e}))).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(e=>`${e[a]}, ${l_(e.data[a],o,a)+"%"}`)).attrTween("d",(function(e){return cC.bind(this)(e,t.arc)}));const u=r.pie.labels.enabled,d=u?l.filter((e=>e.data[a]>0)):[],h=Cx.appendOrSelect(n,"g.labels").attr("role",AS.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(d,(e=>e.data[i]));h.exit().attr("opacity",0).remove();const f=h.enter().append("text").classed("pie-label",!0),p=[];f.merge(h).style("text-anchor","middle").text((e=>r.pie.labels.formatter?r.pie.labels.formatter({...e,percentageValue:l_(e.data[a],o,a,!0)}):l_(e.data[a],o,a)+"%")).datum((function(e){const t=s+7,n=(e.endAngle-e.startAngle)/2+e.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return e.textOffsetX=i/2,e.textOffsetY=r>90&&r<270?10:0,e.xPosition=(e.textOffsetX+t)*Math.sin(n),e.yPosition=(e.textOffsetY+t)*-Math.cos(n),e})).attr("transform",(function(e,t){const n=d.length,r=(e.endAngle-e.startAngle)*(180/Math.PI);if(t>=n-2&&r<Zb.minSliceDegree){let t,r;return e.index===n-1?(t=e.xPosition+Zb.offsetX+Zb.textMargin+e.textOffsetX,r=e.yPosition-Zb.offsetY,e.direction=ib.RIGHT,p.push(e)):(t=e.xPosition-Zb.offsetX-e.textOffsetX-Zb.textMargin,r=e.yPosition-Zb.offsetY,e.direction=ib.LEFT,p.push(e)),`translate(${t}, ${r})`}return`translate(${e.xPosition}, ${e.yPosition})`})),this.renderCallouts(p);const m=d_(r,"donut")?"donut":"pie",g=d_(r,m,"alignment"),{width:v}=Cx.getSVGElementSize(this.getParent(),{useAttrs:!0}),y=u?Wb:0;let b=s+(u?Gb:0);g===Qy.CENTER?b=v/2:g===Qy.RIGHT&&(b=v-s-Gb);let _=s+y;p.length>0&&(_+=qb),n.attr("x",b+7).attr("y",_),this.addEventListeners()}renderCallouts(e){const t=Cx.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",AS.GROUP).attr("data-name","callouts"),n=t.selectAll("g.callout").data(e);n.exit().remove();const r=n.enter().append("g").classed("callout",!0).attr("role",AS.GROUP).attr("aria-roledescription","label callout");r.merge(n).datum((function(e){const{xPosition:t,yPosition:n,direction:r}=e;return r===ib.RIGHT?(e.startPos={x:t,y:n+e.textOffsetY},e.endPos={x:t+Zb.offsetX,y:n-Zb.offsetY+e.textOffsetY},e.intersectPointX=e.endPos.x-Zb.horizontalLineLength):(e.startPos={x:t,y:n+e.textOffsetY},e.endPos={x:t-Zb.offsetX,y:n-Zb.offsetY+e.textOffsetY},e.intersectPointX=e.endPos.x+Zb.horizontalLineLength),e})),r.append("line").classed("vertical-line",!0).merge(t.selectAll("line.vertical-line")).datum((function(){return ht(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(e=>e.startPos.x)).attr("y1",(e=>e.startPos.y)).attr("x2",(e=>e.intersectPointX)).attr("y2",(e=>e.endPos.y)),r.append("line").classed("horizontal-line",!0).merge(t.selectAll("line.horizontal-line")).datum((function(){return ht(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(e=>e.intersectPointX)).attr("y1",(e=>e.endPos.y)).attr("x2",(e=>e.endPos.x)).attr("y2",(e=>e.endPos.y))}addEventListeners(){const e=this;this.parent.selectAll("path.slice").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call((t=>e.services.transitions.setupTransition({transition:t,name:"pie_slice_mouseover"}))).attr("d",e.hoverArc),e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEOVER,{event:t,element:ht(this),datum:n});const{groupMapsTo:i}=e.getOptions().data,{valueMapsTo:a}=e.getOptions().pie;e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{label:n.data[i],value:n.data[a]}]})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Pie.SLICE_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call((t=>e.services.transitions.setupTransition({transition:t,name:"pie_slice_mouseout"}))).attr("d",e.arc),e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}computeRadius(){const{width:e,height:t}=Cx.getSVGElementSize(this.parent,{useAttrs:!0}),n=this.getOptions(),r=Math.min(e,t)/2;return n.pie.labels.enabled?r+jb:r}}class dC extends uC{constructor(){super(...arguments),this.type="donut",this.renderType=Vy.SVG}render(e=!0){super.render(e);const t=this;if(this.model.isDataEmpty())return void this.getComponentContainer().select("g.center").remove();const n=Cx.appendOrSelect(this.getComponentContainer(),"g.center"),r=this.getOptions(),i=this.computeRadius(),a=d_(r,"donut","center","label");Cx.appendOrSelect(n,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(()=>null===a||""===a?"central":"initial")).style("font-size",(()=>r.donut.center.numberFontSize(i))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e}))).tween("text",(function(){return t.centerNumberTween(ht(this))})),null!==a&&""!==a&&Cx.appendOrSelect(n,"text.donut-title").attr("text-anchor","middle").style("font-size",(()=>r.donut.center.titleFontSize(i))).attr("y",r.donut.center.titleYPosition(i)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(e){const t=this.getOptions();let n=d_(t,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce(((e,n)=>e+n[t.pie.valueMapsTo]),0));const r=parseInt(e.text().replace(/[, ]+/g,""),10)||0;let i;i=r%1==0&&n%1==0?dn:an;const a=i(r,n);return n=>{const{numberFormatter:r}=t.donut.center;e.text(r(a(n)))}}}const hC="4,10 8,6 12,10",fC="12,6 8,10 4,6";class pC extends Tx{constructor(){super(...arguments),this.type="gauge",this.renderType=Vy.SVG}getValue(){var e;return(null==(e=this.model.getData().find((e=>"value"===e.group)))?void 0:e.value)??null}getValueRatio(){return Am(this.getValue(),0,100)/100}getDelta(){var e;return(null==(e=this.model.getData().find((e=>"delta"===e.group)))?void 0:e.value)??null}getArcRatio(){const e=this.getOptions();return d_(e,"gauge","type")===lb.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const e=this.getArcSize();return e===2*Math.PI?0:-e/2}getArrow(e){const t=this.getOptions();switch(d_(t,"gauge","deltaArrow","direction")){case cb.UP:return hC;case cb.DOWN:return fC;default:return e>0?hC:fC}}render(e=!0){const t=this.getComponentContainer().attr("width","100%").attr("height","100%"),n=this.getOptions(),r=this.getValue(),i=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),s=o+i*a,l=o+a,c=this.computeRadius(),u=this.getInnerRadius();this.backgroundArc=zu().innerRadius(u).outerRadius(c).startAngle(s).endAngle(l),this.arc=zu().innerRadius(u).outerRadius(c).startAngle(o).endAngle(s),Cx.appendOrSelect(t,"path.arc-background").attr("d",this.backgroundArc);const d=t.selectAll("path.arc-foreground").data([r]);d.enter().append("path").merge(d).attr("class",this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(()=>d_(this.getOptions(),"color","scale","value"))).attr("d",this.arc).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(e=>e)),this.drawValueNumber(),this.drawDelta(),d.exit().remove();const h=d_(n,"gauge","alignment"),{width:f}=Cx.getSVGElementSize(this.getParent(),{useAttrs:!0});let p=c;h===Qy.CENTER?p=f/2:h===Qy.RIGHT&&(p=f-c),t.attr("x",p).attr("y",c),this.addEventListeners()}drawValueNumber(){const e=this.getComponentContainer(),t=this.getOptions(),n=d_(t,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=d_(t,"gauge","valueFontSize"),s=d_(t,"gauge","deltaFontSize"),l=d_(t,"gauge","numberSpacing"),c=d_(t,"gauge","showPercentageSymbol");let u=0;n!==lb.FULL||i?n===lb.SEMI&&i&&(u=-(s(a)+l)):u=s(a);const d=Cx.appendOrSelect(e,"g.gauge-numbers").attr("transform",`translate(0, ${u})`),h=o(a),f=Cx.appendOrSelect(d,"g.gauge-value-number"),p=d_(t,"gauge","numberFormatter"),m=f.selectAll("text.gauge-value-number").data([r]);m.enter().append("text").attr("class","gauge-value-number").merge(m).style("font-size",`${h}px`).attr("text-anchor","middle").text((e=>p(e)));const{width:g}=Cx.getSVGElementSize(Cx.appendOrSelect(e,"text.gauge-value-number"),{useBBox:!0}),v=h/2,y=c?"%":"",b=Cx.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",`${v}px`).attr("x",g/2).text(y),{width:_,height:w}=Cx.getSVGElementSize(b,{useBBox:!0});b.attr("y",`-${w/2}px`),f.attr("transform",`translate(-${_/2}, 0)`)}drawDelta(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta();if(r){const i=this.computeRadius(),a=r?d_(n,"gauge","deltaFontSize"):()=>0,o=r?d_(n,"gauge","numberFormatter"):()=>null,s=d_(n,"gauge","deltaArrow","size"),l=d_(n,"gauge","numberSpacing"),c=d_(n,"gauge","showPercentageSymbol"),u=Cx.appendOrSelect(t,"g.gauge-numbers"),d=Cx.appendOrSelect(u,"g.gauge-delta").attr("transform",`translate(0, ${a(i)+l})`),h=Cx.appendOrSelect(d,"text.gauge-delta-number"),f=c?"%":"";h.data(null===r?[]:[r]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",`${a(i)}px`).text((e=>`${o(e)}${f}`));const{width:p}=Cx.getSVGElementSize(Cx.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}),m=d_(n,"gauge","deltaArrow","enabled"),g=d.selectAll("svg.gauge-delta-arrow").data(null!==r&&m?[r]:[]);g.enter().append("svg").merge(g).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/2).attr("y",-s(i)/2-.35*a(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){const t=ht(this);Cx.appendOrSelect(t,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const i=d_(n,"gauge","status");Cx.appendOrSelect(t,"polygon.gauge-delta-arrow").attr("class",null!==i?`gauge-delta-arrow status--${i}`:"").attr("points",e.getArrow(r))})),g.exit().remove(),h.exit().remove()}else{const e=t.select("g.gauge-delta");e.empty()||e.remove()}}getInnerRadius(){return this.computeRadius()-d_(this.getOptions(),"gauge","arcWidth")}addEventListeners(){const e=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(t,n){e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEOVER,{event:t,element:ht(this),datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEMOVE,{event:t,element:r,datum:n})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Gauge.ARC_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEOUT,{event:t,element:r,datum:n})}))}computeRadius(){const e=this.getOptions(),t=d_(e,"gauge","type"),{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});return t===lb.SEMI?Math.min(n/2,r):Math.min(n/2,r/2)}}class mC extends sC{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=Vy.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.model.getDisplayData(this.configs.groups),n=this.getOptions(),{groupMapsTo:r}=n.data;this.setGroupScale();const i=this.getComponentContainer({withinChartClip:!0}),a=py(t.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]}))),o=i.selectAll("g.bars").data(a,(e=>e));o.exit().attr("opacity",0).remove();const s=o.enter().append("g").classed("bars",!0).attr("role",AS.GROUP).attr("data-name","bars").merge(o);s.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-group-update-enter",animate:e}))).attr("transform",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Yy.VERTICAL?`translate(${t}, 0)`:`translate(0, ${t})`}));const l=s.selectAll("path.bar").data((e=>this.getDataCorrespondingToLabel(e)),(e=>e[r]));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[r],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[r]))).attr("d",(e=>{const t=this.groupScale(e[r]),n=this.getBarWidth(),i=t,a=t+n,o=this.services.cartesianScales.getRangeAxisPosition({datum:e}),s=this.services.cartesianScales.getValueThroughAxisPosition(o,0),l=this.services.cartesianScales.getRangeValue(e),c=this.services.cartesianScales.getDomainValue(e)-n/2,u=c+n;if(!this.isOutsideZoomedDomain(c,u))return f_({x0:i,x1:a,y0:s,y1:l},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value)),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,data:[n]})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(e){return this.model.getDisplayData(this.configs.groups).filter((t=>t[this.services.cartesianScales.getDomainIdentifier(t)].toString()===e))}getGroupWidth(){const e=this.model.getGroupedData(this.configs.groups),t=this.getTotalGroupPadding();return this.getBarWidth()*e.length+t}getDomainScaleStep(){const e=this.services.cartesianScales.getDomainScale(),t=this.model.getGroupedData(this.configs.groups);let n=this.defaultStepFactor;if("function"==typeof e.step)n=e.step();else if(t.length>0){const r=t.find((e=>{var t;return(null==(t=e.data)?void 0:t.length)>1}));if(r){const t=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(e(r.data[1][t])-e(r.data[0][t]))}}return n}getTotalGroupPadding(){const e=this.model.getGroupedData(this.configs.groups);return 1===e.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(e.length-1)}getBarWidth(){const e=this.getOptions(),t=d_(e,"bars","width"),n=d_(e,"bars","maxWidth");if(null!==t&&(null===n||t<=n))return t;const r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)}setGroupScale(){const e=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=js().domain(e).rangeRound([0,this.getGroupWidth()])}}class gC extends Tx{constructor(){super(...arguments),this.type="heatmap",this.renderType=Vy.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=e=>{const{detail:t}=e,{datum:n}=t,r=this.model.getUniqueRanges(),i=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),s=this.services.cartesianScales.getMainXScale(),l=this.services.cartesianScales.getMainYScale();let c="",u=null,d=null,h=null;void 0!==this.matrix[n]?(c=a,r.forEach((e=>{if("number"==typeof this.matrix[n][e].value){const t=this.matrix[n][e].value;if(null===u)return u=t,d=t,void(h=t);u+=t,d=t<d?t:d,h=t>h?t:h}}))):(c=o,i.forEach((e=>{if("number"==typeof this.matrix[e][n].value){const t=this.matrix[e][n].value;if(null===u)return u=t,d=t,void(h=t);u+=t,d=t<d?t:d,h=t>h?t:h}}))),void 0!==s(n)?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${s(n)}, ${A(l.range())})`):void 0!==l(n)&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${A(s.range())},${l(n)})`),this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t.event,hoveredElement:ht(e.detail.element),items:[{label:c,value:n,bold:!0},{label:"Min",value:null!==d?d:"-"},{label:"Max",value:null!==h?h:"-"},{label:"Average",value:null!==u?u/i.length:"-"}]})},this.handleAxisMouseOut=e=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:e})}}init(){const e=this.services.events;e.addEventListener(Fy.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),e.addEventListener(Fy.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),e.addEventListener(Fy.Axis.LABEL_FOCUS,this.handleAxisOnHover),e.addEventListener(Fy.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0});t.lower();const{cartesianScales:n}=this.services;if(this.matrix=this.model.getMatrix(),t.html(""),d_(this.getOptions(),"data","loading"))return;const r=n.getMainXScale(),i=n.getMainYScale(),a=n.getDomainIdentifier(),o=n.getRangeIdentifier(),s=this.model.getUniqueDomain(),l=this.model.getUniqueRanges(),c=this.model.getMatrixAsArray(),u=r.range(),d=i.range();this.xBandwidth=Math.abs((u[1]-u[0])/s.length),this.yBandwidth=Math.abs((d[1]-d[0])/l.length);const h=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");t.append("defs").append("pattern").attr("id",h).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const f=t.selectAll().data(c).enter().append("g").attr("class",(e=>`heat-${e.index}`)).classed("cell",!0).attr("transform",(e=>`translate(${r(e[a])}, ${i(e[o])})`)).append("rect").attr("class",(e=>this.model.getColorClassName({value:e.value,originalClassName:`heat-${e.index}`}))).classed("heat",!0).classed("null-state",(e=>-1===e.index||null===e.value)).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",(e=>-1===e.index||null===e.value?`url(#${h})`:this.model.getFillColor(Number(e.value)))).attr("aria-label",(e=>e.value));this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(d[1]-d[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(u[1]-u[0]),this.yBandwidth),this.determineDividerStatus()&&(f.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(e,t,n){const r=Cx.appendOrSelect(this.parent,e).classed("shadows",!0).classed("highlighter-hidden",!0);Cx.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",t+1),Cx.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",n+1),Cx.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",t+1).attr("y1",n).attr("y2",n),Cx.appendOrSelect(r,"line.right").attr("x1",t).attr("x2",t).attr("y1",-1).attr("y2",n+1)}determineDividerStatus(){const e=d_(this.getOptions(),"heatmap","divider","state");return e!==vb.OFF&&(e===vb.AUTO&&Jb<=this.xBandwidth&&Jb<=this.yBandwidth||e===vb.ON)}addEventListener(){const e=this,{cartesianScales:t}=this.services,n=wp(this.getOptions(),"tooltip.totalLabel"),r=t.getDomainIdentifier(),i=t.getRangeIdentifier(),a=t.getDomainLabel(),o=t.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",(function(t,s){const l=ht(this),c=l.select("rect.heat");if(!c.classed("null-state")){const u=s_(l.attr("transform"));e.parent.select("g.cell-highlight").attr("transform",`translate(${u.x+e.translationUnits.x}, ${u.y+e.translationUnits.y})`).classed("highlighter-hidden",!1),e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEOVER,{event:t,element:c,datum:s}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,items:[{label:a,value:s[r]},{label:o,value:s[i]},{label:n||"Total",value:s.value,color:c.style("fill")}]})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this).select("rect.heat"),i=r.classed("null-state");e.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),i||(e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:t,hoveredElement:r}))}))}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleAxisOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class vC extends Tx{constructor(){super(...arguments),this.type="histogram",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[r]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer(),n=this.model.getOptions(),{groupIdentifier:r}=n,{groupMapsTo:i}=n.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),s=t.selectAll("g.bars").data(a,(e=>wp(e,`0.${i}`)));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",AS.GROUP);const l=t.selectAll("g.bars").selectAll("path.bar").data((e=>e));l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).attr(r,((e,t)=>t)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"histogram-bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[i],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[i]))).attr("d",(e=>{const t=wp(e,"data");if(!t)return;const r=o(t.x1)-o(t.x0)-1,i=this.services.cartesianScales.getDomainValue(t.x0),a=i+r,s=this.services.cartesianScales.getRangeValue(e[0]);let l=this.services.cartesianScales.getRangeValue(e[1]);return Math.abs(l-s)>0&&Math.abs(l-s)>n.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=1:l-=1),f_({x0:i,x1:a,y0:s,y1:l},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>d_(e,"data",e[i]))),this.addEventListeners()}addEventListeners(){const e=this.model.getOptions(),{groupMapsTo:t}=e.data,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){const a=ht(this);a.classed("hovered",!0);const o=parseFloat(wp(i,"data.x0")),s=parseFloat(wp(i,"data.x1")),l=n.services.cartesianScales.getRangeAxisPosition(),c=n.services.cartesianScales.getScaleLabel(l);n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:wp(e,"bins.rangeLabel")||"Range",value:`${o} – ${s}`},{label:e.tooltip.groupLabel||"Group",value:i[t],class:n.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:i[t]})},{label:c,value:wp(i,`data.${i[t]}`)}]})})).on("mousemove",(function(e){n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){ht(this).classed("hovered",!1),n.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class yC extends $O{constructor(){super(...arguments),this.type="lollipop",this.renderType=Vy.SVG,this.handleScatterOnHover=e=>{const t=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("line.line").attr("stroke-width",(e=>e[r]!==t.datum[r]?Ib.unselected:Ib.selected))},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",Ib.unselected)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("line.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e[r]!==t.datum().name?Nb.unselected:Nb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Nb.selected)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.model.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services,a=i.getMainXScale(),o=i.getMainYScale(),s=i.getDomainIdentifier(),l=i.getOrientation(),[c,u]=p_((e=>i.getDomainValue(e)),(e=>i.getRangeValue(e)),l),d=t.selectAll("line.line").data(this.getScatterData(),(e=>`${e[r]}-${e[s]}`));d.exit().attr("opacity",0).remove();const h=d.enter().append("line").attr("opacity",0).merge(d).classed("line",!0).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e[r],originalClassName:"line"}))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"lollipop-line-update-enter",animate:e}))).style("stroke",(e=>this.model.getFillColor(e[r],e[s],e))).attr("opacity",1);l===Yy.HORIZONTAL?h.attr("y1",u).attr("y2",u).attr("x1",a.range()[0]).attr("x2",(e=>c(e)-n.points.radius)):h.attr("x1",c).attr("x2",c).attr("y1",o.range()[0]).attr("y2",(e=>u(e)+n.points.radius)),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(Fy.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(Fy.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),e.removeEventListener(Fy.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),e.removeEventListener(Fy.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class bC extends Tx{constructor(){super(...arguments),this.type="meter",this.renderType=Vy.SVG}getStackedBounds(e,t){let n=0;return e.map(((e,r)=>0!==r?(n+=t(e.value),{...e,width:Math.abs(t(e.value)-Ub),x:n-t(e.value)}):(n=t(e.value),{...e,width:Math.abs(t(e.value)-Ub),x:0})))}render(e=!0){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=d_(r,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:s}=Cx.getSVGElementSize(n,{useAttrs:!0}),{groupMapsTo:l}=r.data;let c;if(null===d_(r,"meter","proportional"))c=100;else{const e=d_(r,"meter","proportional","total");c=e||this.model.getMaximumDomain(this.model.getDisplayData())}const u=Js().domain([0,c]).range([0,s]),d=this.getStackedBounds(a,u),h=d_(r,"meter","height");Cx.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",h||(i?zb.proportional:zb.default)),Cx.appendOrSelect(n,"line.rangeIndicator").attr("x1",s).attr("x2",s).attr("y1",0).attr("y2",h||(i?zb.proportional:zb.default));const f=n.selectAll("rect.value").data(d),p=null==o||t.model.isUserProvidedColorScaleValid()||i?"value":`value status--${o}`;f.enter().append("rect").classed("value",!0).merge(f).attr("x",(e=>e.x)).attr("y",0).attr("height",(()=>h||(i?zb.proportional:zb.default))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[l],originalClassName:p}))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"meter-bar-update",animate:e}))).attr("width",(e=>e.value>c?u(c):e.width)).style("fill",(e=>t.model.getFillColor(e[l]))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(e=>e.value)),f.exit().remove();const m=d_(r,"meter","peak");let g=m;null!==m&&(m>c?g=c:m<a[0].value&&(g=a[0].value>c?c:a[0].value));const v=n.selectAll("line.peak").data(null==g?[]:[g]);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",(()=>h||(i?zb.proportional:zb.default))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"peak-line-update",animate:e}))).attr("x1",(e=>u(e))).attr("x2",(e=>u(e))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(e=>e)),v.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this,r=d_(e,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(e,i){const a=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEOVER,{event:e,element:a,datum:i}),r&&(a.classed("hovered",!0),n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:a,items:[{label:i[t],value:i.value}]}))})).on("mousemove",(function(e,t){const i=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEMOVE,{event:e,element:i,datum:t}),r&&n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.Meter.METER_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const i=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEOUT,{event:e,element:i,datum:t}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i}))}))}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function _C(e){const t=function(e,t){return(e%t+t)%t}(EC(e),360);return wC(t,[0,10])||wC(t,[350,0])?{textAnchor:ob.START,dominantBaseline:sb.MIDDLE}:wC(t,[10,80])?{textAnchor:ob.START,dominantBaseline:sb.HANGING}:wC(t,[80,100])?{textAnchor:ob.MIDDLE,dominantBaseline:sb.HANGING}:wC(t,[100,170])?{textAnchor:ob.END,dominantBaseline:sb.HANGING}:wC(t,[170,190])?{textAnchor:ob.END,dominantBaseline:sb.MIDDLE}:wC(t,[190,260])?{textAnchor:ob.END,dominantBaseline:sb.BASELINE}:wC(t,[260,280])?{textAnchor:ob.MIDDLE,dominantBaseline:sb.BASELINE}:{textAnchor:ob.START,dominantBaseline:sb.BASELINE}}function wC(e,[t,n]){return e>=t&&e<=n}function EC(e){return e*(180/Math.PI)}function xC(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}class SC extends Tx{constructor(){super(...arguments),this.type="radar",this.renderType=Vy.SVG,this.getLabelDimensions=e=>{const t=Cx.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),n=Cx.appendOrSelect(t,"text").text(e),{width:r,height:i}=Cx.getSVGElementSize(n.node(),{useBBox:!0});return t.remove(),{width:r,height:i}},this.normalizeFlatData=e=>{const t=this.getOptions(),{angle:n,value:r}=d_(t,"radar","axes"),i=d_(t,"data","groupMapsTo"),a=function(e,t){return Op(Qv(e,t),1/0)}(this.uniqueKeys.map((e=>this.uniqueGroups.map((t=>({[n]:e,[i]:t,[r]:null}))))));return sy(a,e)},this.normalizeGroupedData=e=>{const t=this.getOptions(),{angle:n,value:r}=d_(t,"radar","axes"),i=d_(t,"data","groupMapsTo");return e.map((({name:e,data:t})=>{const a=this.uniqueKeys.map((t=>({[i]:e,[n]:t,[r]:null})));return{name:e,data:sy(a,t)}}))},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-blob"}))).style("fill-opacity",(e=>e.name!==t.datum().name?Yb.opacity.unselected:Yb.opacity.selected)).style("stroke-opacity",(e=>e.name!==t.datum().name?Yb.opacity.unselected:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-blob"}))).style("fill-opacity",Yb.opacity.selected).style("stroke-opacity",1)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer(),{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0}),i=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),s=d_(o,"data","groupMapsTo"),l=d_(o,"radar","axes","value"),{angle:u,value:d}=d_(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:m,xAxisRectHeight:g}=Yb;this.uniqueKeys=Array.from(new Set(i.map((e=>e[u])))),this.uniqueGroups=Array.from(new Set(i.map((e=>e[s])))),this.fullDataNormalized=this.normalizeFlatData(i),this.groupedDataNormalized=this.normalizeGroupedData(a);const v=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),y=(Math.min(n,r)-v)/2;if(y<=0)return;const b=js().domain(this.fullDataNormalized.map((e=>e[u]))).range([0,2*Math.PI].map((e=>e-Math.PI/2))),_=A(this.fullDataNormalized.map((e=>e[d]))),w=Js().domain([_>=0?0:_,T(this.fullDataNormalized.map((e=>e[d])))]).range([m,y]).nice(p),E=w.ticks(p),x=e=>this.model.getFillColor(e),S=Ju().angle((e=>b(e[u])+Math.PI/2)).radius((e=>w(e[d]))).curve(kd),O={x:T(this.uniqueKeys.map((e=>this.getLabelDimensions(e).width+function(e,t){return t*Math.sin(e-Math.PI/2)}(b(e),y))))+h,y:r/2},C=Cx.appendOrSelect(t,"g.y-axes").attr("role",AS.GROUP).selectAll("path").data(E,(e=>e)),M=e=>this.uniqueKeys.map((t=>({[u]:t,[d]:e})));C.join((t=>t.append("path").attr("opacity",0).attr("transform",`translate(${O.x}, ${O.y})`).attr("fill","none").call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_enter",animate:e}))).attr("opacity",1).attr("d",(e=>S(M(e))))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_update",animate:e}))).attr("opacity",1).attr("transform",`translate(${O.x}, ${O.y})`).attr("d",(e=>S(M(e))))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_exit",animate:e}))).attr("d",(e=>S(M(e)))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.x-axes").attr("role",AS.GROUP).selectAll("line").data(this.uniqueKeys,(e=>e)).join((t=>t.append("line").attr("opacity",0).attr("class",(e=>`x-axis-${oy(e)}`)).attr("stroke-dasharray","0").attr("x1",(e=>xC(b(e),0,O).x)).attr("y1",(e=>xC(b(e),0,O).y)).attr("x2",(e=>xC(b(e),0,O).x)).attr("y2",(e=>xC(b(e),0,O).y)).call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_enter",animate:e}))).attr("opacity",1).attr("x1",(e=>xC(b(e),w.range()[0],O).x)).attr("y1",(e=>xC(b(e),w.range()[0],O).y)).attr("x2",(e=>xC(b(e),w.range()[1],O).x)).attr("y2",(e=>xC(b(e),w.range()[1],O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_update",animate:e}))).attr("opacity",1).attr("x1",(e=>xC(b(e),w.range()[0],O).x)).attr("y1",(e=>xC(b(e),w.range()[0],O).y)).attr("x2",(e=>xC(b(e),w.range()[1],O).x)).attr("y2",(e=>xC(b(e),w.range()[1],O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_exit",animate:e}))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.x-labels").attr("role",AS.GROUP).selectAll("text").data(this.uniqueKeys).join((t=>t.append("text").text((e=>e)).attr("opacity",0).attr("x",(e=>xC(b(e),w.range()[1]+h,O).x)).attr("y",(e=>xC(b(e),w.range()[1]+h,O).y)).style("text-anchor",(e=>_C(b(e)).textAnchor)).style("dominant-baseline",(e=>_C(b(e)).dominantBaseline)).call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_enter",animate:e}))).attr("opacity",1)))),(n=>n.call((n=>n.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_update",animate:e}))).attr("opacity",1).attr("x",(e=>xC(b(e),w.range()[1]+h,O).x)).attr("y",(e=>xC(b(e),w.range()[1]+h,O).y)).end().finally((()=>{const e=d_(o,"radar","alignment"),n=this.getAlignmentXOffset(e,t,this.getParent());t.attr("x",n)}))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_exit",animate:e}))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.blobs").attr("role",AS.GROUP).selectAll("path").data(this.groupedDataNormalized,(e=>e.name)).join((t=>t.append("path").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"blob"}))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e.name)).attr("opacity",0).attr("transform",e?()=>`translate(${O.x}, ${O.y}) scale(${1+.35*Math.random()})`:`translate(${O.x}, ${O.y})`).style("fill",(e=>x(e.name))).style("fill-opacity",Yb.opacity.selected).style("stroke",(e=>x(e.name))).call((t=>{const n=t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_enter",animate:e})));e&&n.delay((()=>30*Math.random())).attr("transform",`translate(${O.x}, ${O.y})`),n.attr("opacity",1).attr("d",(e=>S(e.data)))}))),(t=>(t.attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"blob"}))).style("fill",(e=>x(e.name))).style("stroke",(e=>x(e.name))),t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_update",animate:e}))).attr("opacity",1).attr("transform",`translate(${O.x}, ${O.y})`).attr("d",(e=>S(e.data))))),t)),(t=>t.call((t=>{const n=t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_exit",animate:e})));e&&n.delay((()=>30*Math.random())).attr("transform",(()=>`translate(${O.x}, ${O.y}) scale(${1+.35*Math.random()})`)),n.attr("opacity",0).remove()})))),Cx.appendOrSelect(t,"g.dots").attr("role",AS.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((e=>null!==d_(e,d)))).join((e=>e.append("circle").attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e[l]))),(e=>e),(e=>e.remove())).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[s],originalClassName:oy(e[u])}))).attr("cx",(e=>xC(b(e[u]),w(e[d]),O).x)).attr("cy",(e=>xC(b(e[u]),w(e[d]),O).y)).attr("r",0).attr("opacity",0).style("fill",(e=>x(e[s]))),Cx.appendOrSelect(t,"g.x-axes-rect").attr("role",AS.GROUP).selectAll("rect").data(this.uniqueKeys).join((e=>e.append("rect")),(e=>e),(e=>e.remove())).attr("x",O.x).attr("y",O.y-g/2).attr("width",w.range()[1]).attr("height",g).style("fill","red").style("fill-opacity",0).attr("transform",(e=>`rotate(${EC(b(e))}, ${O.x}, ${O.y})`)),Cx.appendOrSelect(t,"g.y-labels").attr("role",AS.GROUP).selectAll("text").data(c(E)).join((t=>t.append("text").attr("opacity",0).text((e=>e)).attr("x",(e=>xC(-Math.PI/2,w(e),O).x+f)).attr("y",(e=>xC(-Math.PI/2,w(e),O).y)).style("text-anchor","start").style("dominant-baseline","middle").call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_enter",animate:e}))).attr("opacity",1)))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_update",animate:e}))).text((e=>e)).attr("opacity",1).attr("x",(e=>xC(-Math.PI/2,w(e),O).x+f)).attr("y",(e=>xC(-Math.PI/2,w(e),O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_exit",animate:e}))).attr("opacity",0).remove())))),this.addEventListeners()}getAlignmentXOffset(e,t,n){const r=Cx.getSVGElementSize(t,{useBBox:!0}),{width:i}=Cx.getSVGElementSize(n,{useAttrs:!0});let a=0;return e===Qy.CENTER?a=Math.floor((i-r.width)/2):e===Qy.RIGHT&&(a=i-r.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const e=this,{axes:{angle:t}}=d_(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});const a=e.parent.select(`.x-axes .x-axis-${oy(r)}`),o=e.parent.selectAll(`.dots circle.${oy(r)}`),s=e.model.getActiveDataGroupNames(),l=e.getOptions(),{groupMapsTo:c}=l.data,u=d_(l,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",(e=>-1!==s.indexOf(e[c])?1:0)).attr("r",Yb.dotsRadius);const d=e.fullDataNormalized.filter((e=>e[t]===r&&-1!==s.indexOf(e[c])));e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:n,hoveredElement:i,items:d.filter((e=>"number"==typeof e[u])).map((t=>({label:t[c],value:t[u],color:e.model.getFillColor(t[c]),class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:t[c]})})))})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Radar.X_AXIS_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this),i=e.parent.select(`.x-axes .x-axis-${oy(n)}`),a=e.parent.selectAll(`.dots circle.${oy(n)}`);i.classed("hovered",!1).attr("stroke-dasharray","0"),a.classed("hovered",!1).attr("opacity",0).attr("r",0),e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}}class OC extends sC{constructor(){super(...arguments),this.type="simple-bar",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-simple-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-simple-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getComponentContainer({withinChartClip:!0}),i=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=r.selectAll("path.bar").data(i,(e=>e[n]));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[n],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[n]))).attr("d",(e=>{const t=this.services.cartesianScales.getRangeIdentifier(),n=this.getBarWidth(),r=e[t],i=this.services.cartesianScales.getDomainValue(e)-n/2,o=i+n;let s,l;if(Array.isArray(r)&&2===r.length)s=this.services.cartesianScales.getRangeValue(r[0]),l=this.services.cartesianScales.getRangeValue(r[1]);else{const t=this.services.cartesianScales.getRangeScale().domain()[0];s=this.services.cartesianScales.getRangeValue(Math.max(0,t)),l=this.services.cartesianScales.getRangeValue(e)}const c=Math.abs(l-s);if(0!==c&&c<2&&(l=r>0&&a===Yy.VERTICAL||r<0&&a===Yy.HORIZONTAL?s-2:s+2),!this.isOutsideZoomedDomain(i,o))return f_({x0:i,x1:o,y0:s,y1:l},a)})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value)),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,data:[n]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class CC extends jO{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=d_(this.getOptions(),"data","loading"),n=!(d_(this.getOptions(),"grid","x","enabled")||d_(this.getOptions(),"grid","y","enabled")||d_(this.getOptions(),"axes","bottom","visible")||d_(this.getOptions(),"axes","left","visible"));t&&!n?super.renderGridSkeleton(t):t&&n?this.renderSparklineSkeleton(t):this.removeSkeleton()}renderSparklineSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawSparkline(e),this.updateBackdropStyle(),e&&this.setShimmerEffect("shimmer-lines")}drawSparkline(e){const t=this.backdrop.attr("width"),n=Cx.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",t).attr("y1",(e=>e)).attr("y2",(e=>e)),n.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const e=this.parent;this.backdrop=Cx.appendOrSelect(e,"svg.chart-skeleton.DAII"),Cx.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class TC extends Tx{constructor(){super(...arguments),this.type="area-stacked",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.area").transition("legend-hover-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-area"}))).attr("opacity",(e=>d_(e,0,r)!==t.datum().name?wb.unselected:wb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-area"}))).attr("opacity",wb.selected)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),n=this,r=this.getOptions(),{groupMapsTo:i}=r.data,a=Object.keys(r.axes).some((e=>r.axes[e].percentage)),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),s=d_(o,0,0),l=this.services.cartesianScales.getDomainAxisPosition({datum:s}),c=this.services.cartesianScales.getRangeAxisPosition({datum:s}),u=this.services.cartesianScales.getScaleByPosition(c),d=t.selectAll("path.area").data(o,(e=>d_(e,0,i)));this.areaGenerator=qu().x((e=>this.services.cartesianScales.getValueThroughAxisPosition(l,e.data.sharedStackKey))).y0((e=>u(e[0]))).y1((e=>u(e[1]))).curve(this.services.curves.getD3Curve()),d.exit().attr("opacity",0).remove(),d.enter().append("path").attr("opacity",0).merge(d).data(o,(e=>d_(e,0,i))).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:d_(e,0,i),originalClassName:"area"}))).style("fill",(e=>n.model.getFillColor(d_(e,0,i)))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",(e=>d_(e,0,i))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"area-update-enter",animate:e}))).attr("opacity",wb.selected).attr("d",this.areaGenerator)}}class AC extends sC{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=t.selectAll("g.bars").data(i,(e=>d_(e,0,r)));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",AS.GROUP).attr("data-name","bars");const s=t.selectAll("g.bars").selectAll("path.bar").data((e=>e),(e=>e.data.sharedStackKey));s.exit().remove(),s.enter().append("path").merge(s).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[r],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[r]))).attr("d",(e=>{const t=e.data.sharedStackKey,r=this.getBarWidth(),i=this.services.cartesianScales.getDomainValue(t)-r/2,o=i+r,s=this.services.cartesianScales.getRangeValue(e[0]);let l=this.services.cartesianScales.getRangeValue(e[1]);if(!this.isOutsideZoomedDomain(i,o)){if(Math.abs(l-s)>0&&Math.abs(l-s)>n.bars.dividerSize){const t=e[0]<0&&e[1]<=0;t&&a.length>1?this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=0===e[1]?2:1:l-=1:t||(this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=1:l-=1)}return f_({x0:i,x1:o,y0:s,y1:l},this.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e[1]-e[0])),this.addEventListeners()}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,r){const i=ht(this);i.classed("hovered",!0),n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:e,element:i,datum:r});let a=n.model.getDisplayData(n.configs.groups).find((e=>{const i=n.services.cartesianScales.getDomainIdentifier(e);return e[n.services.cartesianScales.getRangeIdentifier(e)]===r.data[r[t]]&&e[i].toString()===r.data.sharedStackKey&&e[t]===r[t]}));if(void 0===a){const e=n.services.cartesianScales.getDomainIdentifier(),i=n.services.cartesianScales.getRangeIdentifier();a={[e]:r.data.sharedStackKey,[i]:r.data[r[t]],[t]:r[t]}}n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:i,data:[a]})})).on("mousemove",(function(e,t){const r=ht(this);n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const r=ht(this);r.classed("hovered",!1),n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}getBarWidth(){const e=this.getOptions();if(d_(e,"bars","width"))return e.bars.width;const t=this.services.cartesianScales.getMainXScale(),n=Cx.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,i=d_(e,"bars","spacingFactor");return t.step?Math.min(e.bars.maxWidth,t.step()/2):Math.min(e.bars.maxWidth,n*i/r)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class MC extends $O{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=Vy.SVG}render(e){if(!d_(this.getOptions(),"points","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=Object.keys(n.axes).some((e=>n.axes[e].percentage)),a=this.model.getStackedData({groups:this.configs.groups,percentage:i}),o=t.selectAll("g.dots").data(a,(e=>d_(e,0,r)));o.exit().attr("opacity",0).remove();const s=o.enter().append("g").classed("dots",!0).attr("role",AS.GROUP).merge(o).selectAll("circle.dot").data((e=>e));s.exit().attr("opacity",0).remove();const l=s.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(s).datum((e=>{const t=e[r],n=this.services.cartesianScales.getDomainIdentifier(e),i=this.services.cartesianScales.getRangeIdentifier(e);return{[r]:t,[n]:e.data.sharedStackKey,[i]:e[1]}}));this.styleCircles(l,e),this.addEventListeners()}getTooltipData(e,t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=Object.keys(n.axes).some((e=>n.axes[e].percentage)),a=this.model.getStackedData({groups:this.configs.groups,percentage:i}),o=[];return a.forEach(((n,a)=>{n.forEach(((n,s)=>{const l=n[r],c=n.data.sharedStackKey;let u=n.data[l];const d=n[1],h=this.services.cartesianScales.getDomainIdentifier(n),f=this.services.cartesianScales.getRangeIdentifier(n);null!=u&&e===this.services.cartesianScales.getDomainValue(c)&&t===this.services.cartesianScales.getRangeValue(d)&&(i&&(u=this.model.getStackedData({groups:this.configs.groups})[a][s].data[l]),null!==u&&o.push({[r]:l,[h]:c,[f]:u}))}))})),this.model.getDisplayData(this.configs.groups).filter((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e),n=this.services.cartesianScales.getRangeIdentifier(e);return void 0!==o.find((i=>i[r]==e[r]&&i[t]==e[t]&&i[n]==e[n]))}))}}class kC extends Tx{constructor(){super(...arguments),this.type="tree",this.renderType=Vy.SVG}getLongestLabel(e){let t="";return e.forEach((e=>{const n=e.children?this.getLongestLabel(e.children):"";(n.length>t.length||e.name.length>t.length)&&(t=n.length>e.name.length?n:e.name)})),t}getMockLabelWidth(e,t){const n=e.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(t),{width:r}=Cx.getSVGElementSize(n.node(),{useBBox:!0});return n.remove(),r}render(e=!0){const t=this.getComponentContainer();t.html("");const{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(n<1||r<1)return;const i=this.model.getOptions(),a=this.model.getDisplayData(),o=d_(i,"tree","rootTitle")||"Tree",s=this.getMockLabelWidth(t,o),l=this.getLongestLabel(a),c=this.getMockLabelWidth(t,l),u=0,d=s>0?s+6:24,h=Qo({name:o,children:a}),f=n/6,p=e=>{const r=h.descendants().reverse(),i=h.links();let a=h,o=h;h.eachBefore((e=>{e.x<a.x&&(a=e),e.x>o.x&&(o=e)}));const s=o.x-a.x,l=t.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"tree-update-viewbox",animate:!0}))).attr("viewBox",[-d,a.x,n,s].join(" ")),c=_.selectAll("g").data(r,(e=>e.id)),u=this,f=c.enter().append("g").attr("transform",(()=>`translate(${e.y0},${e.x0})`)).attr("class",(e=>0!==e.depth&&e.children&&e.children.length>0?"clickable":null)).on("mouseover",(function(e,t){u.services.events.dispatchEvent(Fy.Tree.NODE_MOUSEOVER,{event:e,element:ht(this),datum:t})})).on("click",(function(e,t){0!==t.depth&&(t.children=t.children?null:t._children,p(t)),u.services.events.dispatchEvent(Fy.Tree.NODE_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){u.services.events.dispatchEvent(Fy.Tree.NODE_MOUSEOUT,{event:e,element:ht(this),datum:t})}));f.append("circle").attr("r",2.5).attr("class",(e=>e._children?"parent":"child")).attr("stroke-width",10),f.append("text").attr("dy","0.31em").attr("x",(e=>e._children?-6:6)).attr("text-anchor",(e=>e._children?"end":"start")).text((e=>e.data.name)).clone(!0).attr("class","text-stroke").lower(),c.merge(f).transition(l).attr("transform",(e=>`translate(${e.y},${e.x})`)).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(l).remove().attr("transform",(()=>`translate(${e.y},${e.x})`)).attr("fill-opacity",0).attr("stroke-opacity",0);const m=b.selectAll("path").data(i,(e=>e.target.id)),g=m.enter().append("path").attr("d",(()=>{const t={x:e.x0,y:e.y0};return y({source:t,target:t})}));m.merge(g).transition(l).attr("d",y),m.exit().transition(l).remove().attr("d",(()=>{const t={x:e.x,y:e.y};return y({source:t,target:t})})),h.eachBefore((e=>{e.x0=e.x,e.y0=e.y}))},m=h.descendants(),g=m[m.length-1].depth,v=d_(i,"tree","type")===eb.DENDROGRAM?Ko().size([r,n-c-6*g-s]):Is().nodeSize([10,f]).size([r,n-c-6*g-s]),y=id().x((e=>e.y)).y((e=>e.x));h.x0=f/2,h.y0=0,h.descendants().forEach(((e,t)=>{e.id=t,e._children=e.children})),v(h),t.attr("viewBox",[-d,-u,n,10]).style("user-select","none");const b=t.append("g").attr("class","links"),_=t.append("g").attr("class","nodes");p(h)}}var LC={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}};const DC=function(){const e=ht(this.parentNode).select("rect.leaf"),t=Nt(getComputedStyle(e.node(),null).getPropertyValue("fill"));let n;if(t&&(n=(e=>{if(!e)return null;for(const t of Object.keys(LC)){const n=LC[t];for(const t of Object.keys(n))if(n[+t]===e)return t}return null})(t?t.hex():null)),null==n){const e=Wt(t).l;n=Math.abs(100*e-100)}return n>50?"white":"black"};let RC=0;class NC extends Tx{constructor(){super(...arguments),this.type="treemap",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-treemap"}))).attr("opacity",(e=>e.parent.data.name===t.datum().name?1:.3))},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-treemap"}))).attr("opacity",1)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer();this.model.getData();const n=this.model.getDisplayData(),r=this.model.getOptions(),i=d_(window,"location"),{width:a,height:o}=Cx.getSVGElementSize(t,{useAttrs:!0}),s=Qo({name:r.title||"Treemap",children:n}).sum((e=>e.value)).sort(((e,t)=>t.value-e.value)),l=function(){var e=$s,t=!1,n=1,r=1,i=[0],a=as,o=as,s=as,l=as,c=as;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(Ts),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,h=t.y1-n;d<r&&(r=d=(r+d)/2),h<u&&(u=h=(u+h)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=h,t.children&&(n=i[t.depth+1]=a(t)/2,r+=c(t)-n,u+=o(t)-n,(d-=s(t)-n)<r&&(r=d=(r+d)/2),(h-=l(t)-n)<u&&(u=h=(u+h)/2),e(t,r,u,d,h))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=is(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a="function"==typeof e?e:os(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o="function"==typeof e?e:os(+e),u):o},u.paddingRight=function(e){return arguments.length?(s="function"==typeof e?e:os(+e),u):s},u.paddingBottom=function(e){return arguments.length?(l="function"==typeof e?e:os(+e),u):l},u.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:os(+e),u):c},u}().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(s),c=t.selectAll("g[data-name='leaf']").data(l.leaves(),(e=>e.data.name));c.exit().attr("opacity",0).remove();const u=c.enter().append("g").attr("data-name","leaf").attr("data-uid",(()=>RC++)).merge(c);u.attr("data-name","leaf").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"treemap-group-update",animate:e}))).attr("transform",(e=>`translate(${e.x0},${e.y0})`));const d=u.selectAll("rect.leaf").data((e=>[e]));d.exit().attr("width",0).attr("height",0).remove(),d.enter().append("rect").classed("leaf",!0).merge(d).attr("width",0).attr("height",0).attr("id",(function(){const e=ht(this.parentNode).attr("data-uid");return`${r.style.prefix}-leaf-${e}`})).attr("class",(e=>{for(;e.depth>1;)e=e.parent;return this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.data.name,originalClassName:"leaf"})})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"treemap-leaf-update-enter",animate:e}))).attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).style("fill",(e=>{for(;e.depth>1;)e=e.parent;return this.model.getFillColor(e.data.name)})),u.selectAll("clipPath").data((e=>!0!==e.data.showLabel?[]:[1]),(e=>e)).join((e=>e.append("clipPath").attr("id",(function(){const e=ht(this.parentNode).attr("data-uid");return`${r.style.prefix}-clip-${e}`})).append("use").attr("xlink:href",(function(){const e=ht(this.parentNode.parentNode).attr("data-uid"),t=`${r.style.prefix}-leaf-${e}`;return new URL(`#${t}`,i)+""}))),(e=>null),(e=>e.remove())),u.selectAll("text").data((e=>{if(!0!==e.data.showLabel)return[];let t=e;for(;t.depth>1;)t=t.parent;const n=Wt(this.model.getFillColor(t.data.name));return[{text:e.data.name,color:n.l<.5?"white":"black"}]}),(e=>e)).join((e=>{const t=e.append("text").text((e=>e.text)).style("fill",DC).attr("x",7).attr("y",18);return i&&t.attr("clip-path",(function(){const e=ht(this.parentNode).attr("data-uid"),t=`${r.style.prefix}-clip-${e}`;return`url(${new URL(`#${t}`,i)+""})`})),t}),(e=>e.text((e=>e.text)).style("fill",DC)),(e=>e.remove())),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(t,n){const r=ht(this);let i=getComputedStyle(this,null).getPropertyValue("fill"),a=n;for(;a.depth>1;)a=a.parent;r.transition("graph_element_mouseover_fill_update").call((t=>e.services.transitions.setupTransition({transition:t,name:"graph_element_mouseover_fill_update"}))).style("fill",(t=>{const n=e.model.getFillColor(t.parent.data.name);return n&&(i=n),Nt(i).darker(.7).toString()})),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{color:i,label:a.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEOVER,{event:t,element:r,datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Treemap.LEAF_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1);let i=n;for(;i.depth>1;)i=i.parent;r.transition().call((t=>e.services.transitions.setupTransition({transition:t,name:"graph_element_mouseout_fill_update"}))).style("fill",(t=>e.model.getFillColor(t.parent.data.name))),e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}}var IC={value:function(){}};function PC(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new $C(r)}function $C(e){this._=e}function BC(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function zC(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=IC,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}$C.prototype=PC.prototype={constructor:$C,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=zC(r[n],e.name,t);else if(null==t)for(n in r)r[n]=zC(r[n],e.name,null);return this}for(;++a<o;)if((n=(e=i[a]).type)&&(n=BC(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new $C(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};const UC=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(Object.freeze(Object.defineProperty({__proto__:null,dispatch:PC},Symbol.toStringTag,{value:"Module"}))).dispatch,jC=Math.PI/180,FC={archimedean:eT,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}},VC=2048;function HC(e){return e.text}function GC(){return"serif"}function WC(){return"normal"}function qC(e){return Math.sqrt(e.value)}function ZC(){return 30*(~~(6*random())-3)}function YC(){return 1}function KC(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,2048/a,VC/a);var o=0,s=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;const e=i.measureText(t.text),c=-Math.floor(e.width/2);let g=(e.width+1)*a,v=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*jC),d=Math.cos(t.rotate*jC),h=g*d,f=g*u,p=v*d,m=v*u;g=Math.max(Math.abs(h+m),Math.abs(h-m))+31>>5<<5,v=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else g=g+31>>5<<5;if(v>l&&(l=v),o+g>=2048&&(o=0,s+=l,l=0),s+v>=VC)break;i.translate((o+(g>>1))/a,(s+(v>>1))/a),t.rotate&&i.rotate(t.rotate*jC),i.fillText(t.text,c,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,c,0)),i.restore(),t.width=g,t.height=v,t.xoff=o,t.yoff=s,t.x1=g>>1,t.y1=v>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=g}for(var g=i.getImageData(0,0,2048/a,VC/a).data,v=[];--r>=0;)if((t=n[r]).hasText){for(var y=t.width,b=y>>5,_=t.y1-t.y0,w=0;w<_*b;w++)v[w]=0;if(null==(o=t.xoff))return;s=t.yoff;for(var E=0,x=-1,S=0;S<_;S++){for(w=0;w<y;w++){var O=b*S+(w>>5),C=g[2048*(s+S)+(o+w)<<2]?1<<31-w%32:0;v[O]|=C,E|=C}E?x=S:(t.y0++,_--,S--,s++)}t.y1=t.y0+x,t.sprite=v.slice(0,(t.y1-t.y0)*b)}}}function XC(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(o>>5),d=0;d<c;d++){r=0;for(var h=0;h<=a;h++)if((r<<l|(h<a?(r=i[d*a+h])>>>s:0))&t[u+h])return!0;u+=n}return!1}function QC(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function JC(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function eT(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function tT(){return document.createElement("canvas")}function nT(e){return"function"==typeof e?e:function(){return e}}const rT=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(){var e=[256,256],t=HC,n=GC,r=qC,i=WC,a=WC,o=ZC,s=YC,l=eT,c=[],u=1/0,d=UC("word","end"),h=null,f=Math.random,p={},m=tT;function g(t,n,r){e[0],e[1];for(var i,a,o,s=n.x,c=n.y,u=Math.sqrt(e[0]*e[0]+e[1]*e[1]),d=l(e),h=f()<.5?1:-1,p=-h;(i=d(p+=h))&&(a=~~i[0],o=~~i[1],!(Math.min(Math.abs(a),Math.abs(o))>=u));)if(n.x=s+a,n.y=c+o,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1])&&(!r||JC(n,r))&&!XC(n,t,e[0])){for(var m,g=n.sprite,v=n.width>>5,y=e[0]>>5,b=n.x-(v<<4),_=127&b,w=32-_,E=n.y1-n.y0,x=(n.y+n.y0)*y+(b>>5),S=0;S<E;S++){m=0;for(var O=0;O<=v;O++)t[x+O]|=m<<w|(O<v?(m=g[S*v+O])>>>_:0);x+=y}return!0}return!1}return p.canvas=function(e){return arguments.length?(m=nT(e),p):m},p.start=function(){var l=function(e){const t=e.getContext("2d",{willReadFrequently:!0});e.width=e.height=1;const n=Math.sqrt(t.getImageData(0,0,1,1).data.length>>2);return e.width=2048/n,e.height=VC/n,t.fillStyle=t.strokeStyle="red",{context:t,ratio:n}}(m()),v=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((e[0]>>5)*e[1]),y=null,b=c.length,_=-1,w=[],E=c.map((function(e,l){return e.text=t.call(this,e,l),e.font=n.call(this,e,l),e.style=i.call(this,e,l),e.weight=a.call(this,e,l),e.rotate=o.call(this,e,l),e.size=~~r.call(this,e,l),e.padding=s.call(this,e,l),e})).sort((function(e,t){return t.size-e.size}));return h&&clearInterval(h),h=setInterval(x,0),x(),p;function x(){for(var t=Date.now();Date.now()-t<u&&++_<b&&h;){var n=E[_];n.x=e[0]*(f()+.5)>>1,n.y=e[1]*(f()+.5)>>1,KC(l,n,E,_),n.hasText&&g(v,n,y)&&(w.push(n),d.call("word",p,n),y?QC(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=e[0]>>1,n.y-=e[1]>>1)}_>=b&&(p.stop(),d.call("end",p,w,y))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const e of c)delete e.sprite;return p},p.timeInterval=function(e){return arguments.length?(u=e??1/0,p):u},p.words=function(e){return arguments.length?(c=e,p):c},p.size=function(t){return arguments.length?(e=[+t[0],+t[1]],p):e},p.font=function(e){return arguments.length?(n=nT(e),p):n},p.fontStyle=function(e){return arguments.length?(i=nT(e),p):i},p.fontWeight=function(e){return arguments.length?(a=nT(e),p):a},p.rotate=function(e){return arguments.length?(o=nT(e),p):o},p.text=function(e){return arguments.length?(t=nT(e),p):t},p.spiral=function(e){return arguments.length?(l=FC[e]||e,p):l},p.fontSize=function(e){return arguments.length?(r=nT(e),p):r},p.padding=function(e){return arguments.length?(s=nT(e),p):s},p.random=function(e){return arguments.length?(f=e,p):f},p.on=function(){var e=d.on.apply(d,arguments);return e===d?p:e},p}));class iT extends Tx{constructor(){super(...arguments),this.type="wordcloud",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-wordcloud"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-wordcloud"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:s}=a.wordCloud,{groupMapsTo:l}=a.data,{width:c,height:u}=Cx.getSVGElementSize(n,{useAttrs:!0});if(0===c||0===u)return;const d=rT().size([c,u]).words(r.map((function(e){const t=e[o];if("number"!=typeof e[o])throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[l]:e[l],text:e[s],size:t,value:t}}))).padding(5).rotate(0).fontSize((e=>i(e.size))).on("end",(function(r){const i=Cx.appendOrSelect(n,"g.words");i.attr("transform",`translate(${d.size()[0]/2}, ${d.size()[1]/2})`);const a=i.selectAll("text").data(r,(e=>`${e[l]}-${e.text}`));a.exit().attr("opacity",0).remove(),a.enter().append("text").attr("opacity",0).merge(a).style("font-size",(e=>`${e.size}px`)).text((function(e){return e.text})).attr("class",(e=>t.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[l],originalClassName:"word "+(e.size>32?"light":"")}))).style("fill",(e=>t.model.getFillColor(e[l],e.text,e))).attr("text-anchor","middle").transition().call((n=>t.services.transitions.setupTransition({transition:n,name:"wordcloud-text-update-enter",animate:e}))).attr("transform",(e=>`translate(${e.x}, ${e.y})`)).attr("opacity",1)}));d.start(),this.addEventListeners()}getFontSizeScale(e){const t=this.getOptions(),{fontSizeMapsTo:n}=t.wordCloud,r=e.map((e=>e[n])).filter((e=>e)),i=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=r.length>0,o=a?c(r):[1,1];return Js().domain(o).range(a?t.wordCloud.fontSizeRange(i,e):[4,4])}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this,r=Hv((e=>{const t=n.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call((e=>n.services.transitions.setupTransition({transition:e,name:"wordcloud-word-mouse-highlight"})));null===e?t.attr("opacity",1):t.attr("opacity",(function(){return e===this?1:.3}))}),6);this.parent.selectAll("text.word").on("mouseover",(function(i,a){r(this),n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEOVER,{event:i,element:ht(this),datum:a}),n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:e.tooltip.wordLabel,value:a.text},{label:e.tooltip.valueLabel,value:a.value},{label:e.tooltip.groupLabel,value:a[t],class:n.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:a[t]})}]})})).on("mousemove",(function(e,t){const r=ht(this);n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEMOVE,{element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.WordCloud.WORD_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const i=ht(this);r(null),n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEOUT,{event:e,element:i,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i})}))}}class aT extends Tx{constructor(){super(...arguments),this.type="geo",this.renderType=Vy.SVG}render(){const e=this.getComponentContainer({withinChartClip:!0}),{width:t,height:n}=Cx.getSVGElementSize(e,{useAttrs:!0});if(t<1||n<1)return;const r=this.getProjection(),i=d_(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},s={};Object.keys(a).forEach((e=>{"number"==typeof a[e].value?o[e]=a[e]:s[e]=a[e]}));const l=tC(i,Object.values(s)),c=function(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return QO(e,t)}))}:QO(e,t)}(i,{type:"GeometryCollection",geometries:Object.values(o)}),u=r.fitSize([t,n],c),d=function(e,t){let n,r,i=3,a=4.5;function o(e){return e&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),ji(e,n(r))),r.result()}return o.area=function(e){return ji(e,n(Aa)),Aa.result()},o.measure=function(e){return ji(e,n(mo)),mo.result()},o.bounds=function(e){return ji(e,n(Ra)),Ra.result()},o.centroid=function(e){return ji(e,n(ro)),ro.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,ga):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new _o(i)):new io(t=e),"function"!=typeof a&&r.pointRadius(a),o):t},o.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(r.pointRadius(+e),+e),o):a},o.digits=function(e){if(!arguments.length)return i;if(null==e)i=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);i=t}return null===t&&(r=new _o(i)),o},o.projection(e).digits(i).context(t)}().projection(u);Cx.appendOrSelect(e,"g.geo").selectAll("path").data(c.features).join("path").attr("d",d);const h=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),f=Cx.appendOrSelect(e,"defs");Cx.appendOrSelect(f,"pattern").attr("id",h).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Wu()([[0,0],[0,10]]));const p=Cx.appendOrSelect(e,"g.missing-data");Cx.appendOrSelect(p,"path").datum(l).attr("d",d).style("fill",`url(#${h})`)}getProjection(){let e=null;switch(d_(this.getOptions(),"thematic","projection")){case bb.geoEqualEarth:e=Lo(Go).scale(177.158);break;case bb.geoAlbers:e=Io().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7]);break;case bb.geoConicEqualArea:e=Io();break;case bb.geoConicEquidistant:e=Ro(zo).scale(131.154).center([0,13.9389]);break;case bb.geoEquirectangular:e=Lo(Bo).scale(152.63);break;case bb.geoMercator:e=$o();break;case bb.geoNaturalEarth1:e=Lo(Wo).scale(175.295);break;default:throw new Error("Projection is not supported.")}return e}}class oT extends aT{constructor(){super(...arguments),this.type="choropleth"}render(e=!0){super.render();const t=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",(e=>this.model.getColorClassName({value:t[e.properties.NAME].value,originalClassName:"border"}))),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const e=this,t=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEOVER,{event:n,element:i,datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.SHOW,{event:n,hoveredElement:i,items:[{label:r.properties.NAME,value:t[r.properties.NAME].value}]})})).on("mousemove",(function(n,r){e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEMOVE,{event:n,element:ht(this),datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.MOVE,{event:n})})).on("click",(function(n,r){e.services.events.dispatchEvent(jy.CHOROPLETH_CLICK,{event:n,element:ht(this),datum:t[r.properties.NAME]})})).on("mouseout",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEOUT,{event:n,element:i,datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.HIDE,{event:n,hoveredElement:i})}))}}class sT extends $E{constructor(e){super(e),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(e){super.setData(e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()}setOptions(e){const t=this.getOptions(),n=sy({},e,this.getZoomOptions(e));u_(t,n);const r=this.getHierarchyLevel(),i=d_(t,"circlePack","hierarchyLevel");this.set({options:sy(t,n),depth:i&&i<4?i:r})}getZoomOptions(e){if(!this.getDisplayData())return{};const t=this.getDisplayData(),n=e||this.getOptions(),r=1===t.length&&d_(t,0,"children")?d_(t,0,"children"):t;let i=this.getHierarchyLevel();return r.some((e=>{if(e.children&&e.children.some((e=>e.children)))return i=3,!1})),!0===d_(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:mb.ZOOM,name:"Click to zoom"}]}}:null}setZoom(e){this.setOptions(this.getZoomOptions(e))}updateHierarchyLevel(e){this.set({depth:e})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const e=this.getData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=e.map((e=>{const t=e[n];return this.setChildrenDataGroup(e,t)}));this.set({data:r},{skipUpdate:!0})}setChildrenDataGroup(e,t){return e.children?{...e,dataGroupName:t,children:e.children.map((e=>this.setChildrenDataGroup(e,t)))}:{...e,dataGroupName:t}}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Parent","Value"]];return e.forEach((e=>{let n=e.value?e.value:0;e.children&&(n+=this.getChildrenDatums(e.children,e.name,t,0)),t.push(["–",e.name,n])})),t}getChildrenDatums(e,t,n=[],r=0){const i=t;return e.forEach((e=>{const t=e.name;let a=0;if(e.children)e.children.length>0&&("number"==typeof e.value&&(r+=e.value),a+=this.getChildrenDatums(e.children,t,n,a),n.push([t,i,a]),r+=a);else{let t=0;"number"==typeof e.value&&(t=e.value,r+=e.value),n.push([e.name,i,t])}})),r}}const lT={[hb.LINE]:[IO,$O],[hb.SCATTER]:[$O],[hb.AREA]:[NO,IO,$O],[hb.STACKED_AREA]:[TC,IO,MC,iC],[hb.SIMPLE_BAR]:[OC],[hb.GROUPED_BAR]:[mC,HO],[hb.STACKED_BAR]:[AC,iC]};class cT extends $E{constructor(e){super(e)}getTabularData(e){const t=super.getTabularData(e);return e!==t&&t.forEach((e=>{e.key&&e.key!==e.group&&(e.group=e.key)})),t}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data;return[["Group","Value"],...e.map((e=>[e[n],null===e.value?"–":e.value.toLocaleString()]))]}sanitize(e){return this.getTabularData(e).sort(((e,t)=>t.value-e.value))}}class uT extends jS{constructor(e,t,n=!1){super(e,t),this.model=new cT(this.services),!n&&(this.model.setOptions(a_(TE.pieChart,t.options)),this.init(e,t))}getComponents(){const e=[new uC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.PIE})];return this.getChartComponents(e)}}class dT extends $E{constructor(e){super(e)}getDataGroups(){return super.getDataGroups().filter((e=>"delta"!==e.name))}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data;return[["Group","Value"],...e.map((e=>[e[n],null===e.value?"–":e.value.toLocaleString()]))]}}class hT extends FS{constructor(e){super(e),this.axisFlavor=yb.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const t=d_(this.getOptions(),"axes");if(d_(t,"left","scaleType")&&d_(t,"left","scaleType")!==Ky.LABELS||d_(t,"right","scaleType")&&d_(t,"right","scaleType")!==Ky.LABELS||d_(t,"top","scaleType")&&d_(t,"top","scaleType")!==Ky.LABELS||d_(t,"bottom","scaleType")&&d_(t,"bottom","scaleType")!==Ky.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const e=c(this.getDisplayData(),(e=>e.value)),t=Js().domain(e).nice().domain();if(t[0]>0)t[0]=0;else if(0===t[0]&&0===t[1])return[0,1];return t[0]<0&&t[1]>0&&(Math.abs(t[0])>t[1]?t[1]=Math.abs(t[0]):t[0]=-t[1]),t}getFillColor(e){return this._colorScale(e)}getUniqueDomain(){if(iy(this._domains)){const e=this.getDisplayData(),{cartesianScales:t}=this.services,n=t.getDomainIdentifier(),r=t.getMainXAxisPosition(),i=t.getCustomDomainValuesByposition(r);if(i)return i;this._domains=Array.from(new Set(e.map((e=>e[n]))))}return this._domains}getUniqueRanges(){if(iy(this._ranges)){const e=this.getDisplayData(),{cartesianScales:t}=this.services,n=t.getRangeIdentifier(),r=t.getMainYAxisPosition(),i=t.getCustomDomainValuesByposition(r);if(i)return i;this._ranges=Array.from(new Set(e.map((e=>e[n]))))}return this._ranges}getMatrix(){if(iy(this._matrix)){const e=this.getUniqueDomain(),t=this.getUniqueRanges(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i={};t.forEach((e=>{i[e]={value:null,index:-1}})),e.forEach((e=>{this._matrix[e]=qg(i)})),this.getDisplayData().forEach(((e,t)=>{this._matrix[e[n]][e[r]]={value:e.value,index:t}}))}return this._matrix}setData(e){const t=this.sanitize(qg(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),this._domains=[],this._ranges=[],this._matrix={},t}getMatrixAsArray(){iy(this._matrix)&&this.getMatrix();const e=this.getUniqueDomain(),t=this.getUniqueRanges(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=[];return e.forEach((e=>{t.forEach((t=>{const a={value:this._matrix[e][t].value,index:this._matrix[e][t].index};a[n]=e,a[r]=t,i.push(a)}))})),i}getTabularDataArray(){const e=this.getDisplayData(),{primaryDomain:t,primaryRange:n}=this.assignRangeAndDomains();return[[t.label,n.label,"Value"],...e.map((e=>[null===e[t.identifier]?"–":e[t.identifier],null===e[n.identifier]?"–":e[n.identifier].toLocaleString(),e.value]))]}getColorClassName(e){return`${e.originalClassName} ${this._colorScale(e.value)}`}setColorClassNames(){const e=this.getOptions(),t=d_(e,"color","gradient","colors"),n=!iy(t);let r=d_(e,"color","pairing","option");const i=this.getValueDomain(),a=i[0]<0&&i[1]>0?"diverge":"mono";(r<1&&r>4&&"mono"===a||r<1&&r>2&&"diverge"===a)&&(r=1);const o=n?t:[];if(!n){const e="diverge"===a?17:11;for(let t=1;t<e+1;t++)o.push(`fill-${a}-${r}-${t}`)}this._colorScale=cl().domain(i).range(o);const s=d_(this.getOptions(),"color");this._colorScale=YO(this.getDisplayData(),s)}}class fT extends FS{getTabularDataArray(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getBinnedStackedData();return[[wp(e,"bins.rangeLabel")||"Range",...n.map((e=>wp(e,`0.${t}`)))],...wp(n,0).map(((e,r)=>[`${wp(e,"data.x0")} – ${wp(e,"data.x1")}`,...n.map((e=>wp(e[r],`data.${wp(e[r],t)}`)))]))]}}class pT extends $E{constructor(e){super(e)}getMaximumDomain(e){return e.reduce(((e,t)=>e+t.value),0)}getFillColor(e){const t=this.getOptions(),n=d_(t,"color","scale"),r=this.getStatus();return n||!r?super.getFillColor(e):null}getStatus(){const e=this.getOptions(),t=d_(this.getDisplayData()),n=(null==t?void 0:t.reduce(((e,t)=>e+t.value),0))??0,r=d_(e,"meter","proportional")?n:n>100?100:n,i=d_(e,"meter","status","ranges");if(i){const e=i.filter((e=>e.range[0]<=r&&r<=e.range[1]));if(e.length>0)return e[0].status}return null}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getStatus(),i=d_(t,"meter","proportional");let a,o=[];if(null===i){a=100;const t=e[0];o=[["Group","Value",...r?["Status"]:[]],[t[n],t.value,...r?[r]:[]]]}else{const t=d_(i,"total");a=t||this.getMaximumDomain(e),o=[["Group","Value","Percentage of total"],...e.map((e=>[e[n],e.value,(e.value/a*100).toFixed(2)+" %"]))]}return o}}class mT extends FS{constructor(e){super(e)}getTabularDataArray(){const e=this.getOptions(),t=this.getGroupedData(),{angle:n,value:r}=d_(e,"radar","axes"),i=d_(t,"0","data").map((e=>e[n]));return[["Group",...i],...t.map((e=>[e.name,...i.map(((t,n)=>null!==d_(e,"data",n,r)?d_(e,"data",n,r).toLocaleString():"–"))]))]}}class gT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Parent"]];return e.forEach((e=>{this.getChildrenDatums(e,t),t.push([e.name,"–"])})),t}getChildrenDatums(e,t=[]){e.children&&e.children.length>0&&e.children.forEach((n=>{this.getChildrenDatums(n,t),t.push([n.name,e.name])}))}}class vT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Group","Value"]];return e.forEach((e=>{Array.isArray(e.children)?e.children.forEach((n=>{t.push([n.name,e.name,n.value])})):null!==d_(e.name)&&d_(e.value)&&t.push(["–",e.name,e.value])})),t}}class yT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{fontSizeMapsTo:n,wordMapsTo:r}=t.wordCloud,{groupMapsTo:i}=t.data;return[[t.tooltip.wordLabel,"Group",t.tooltip.valueLabel],...e.map((e=>[e[r],e[i],e[n]]))]}}t.Alignments=Qy,t.AlluvialChart=class extends jS{constructor(e,t){super(e,t),this.model=new VS(this.services),this.model.setOptions(a_(TE.alluvialChart,t.options)),this.init(e,t)}getComponents(){const e=[new EO(this.model,this.services)];return this.getChartComponents(e,{excludeLegend:!0})}},t.AreaChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(qg(TE.areaChart),t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new IO(this.model,this.services),new NO(this.model,this.services),new $O(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.AreaEvent=xy,t.ArrowDirections=cb,t.AxisEvent=Ey,t.AxisFlavor=yb,t.AxisPositions=Wy,t.AxisTitleOrientations=pb,t.BarEvent=Ty,t.BoxplotChart=class extends DO{constructor(e,t){super(e,t),this.model=new FO(this.services),this.model.setOptions(a_(TE.boxplotChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new VO(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e,{legend:{enabled:!1}})}},t.BoxplotEvent=Ay,t.BubbleChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.bubbleChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new GO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.BulletChart=class extends DO{constructor(e,t){super(e,t),this.model=new WO(this.services),this.model.setOptions(a_(TE.bulletChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new qO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.CalloutDirections=ib,t.CanvasZoomEvent=wy,t.CartesianOrientations=Yy,t.ChartEvent=my,t.ChartTheme=Hy,t.ChartTypes=hb,t.CirclePackChart=class extends jS{constructor(e,t){super(e,t),this.model=new sT(this.services),this.model.setOptions(a_(TE.circlePackChart,t.options)),this.init(e,t)}getComponents(){const e=[new lC(this.model,this.services)];return this.getChartComponents(e)}},t.ColorClassNameTypes=Gy,t.ColorLegendType=gb,t.ComboChart=class extends DO{constructor(e,t){super(e,t);const n=a_(TE.comboChart,t.options);t.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),n.comboChartTypes=[{type:hb.LINE,correspondingDatasets:[]}]),this.model.setOptions(n),this.init(e,t)}getGraphComponents(){const{comboChartTypes:e}=this.model.getOptions();let t=0;return Cp(e.map((e=>{const n=e.type;let r;if("string"==typeof e.type){if(!Object.keys(lT).includes(e.type))return console.error(`Invalid chart type "${e.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let n=!1;const i=`${Tm(e.type)}Chart`;return r=sy({},TE[i],this.model.getOptions(),e.options),e.type===hb.STACKED_AREA&&(n=!0),lT[e.type].map((i=>new i(this.model,this.services,{groups:e.correspondingDatasets,id:t++,options:r,stacked:n})))}return r=sy({},this.model.getOptions(),e.options),new n(this.model,this.services,{groups:e.correspondingDatasets,id:t++,options:r})})).filter((e=>null!==e)))}getComponents(){const{comboChartTypes:e}=this.model.getOptions(),t=e.some((e=>e.type===hb.STACKED_BAR||e.type===hb.STACKED_AREA)),n=[new UO(this.model,this.services),new RO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID}),...t?[]:[new PO(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(n)}},t.DividerStatus=vb,t.DominantBaseline=sb,t.DonutChart=class extends uT{constructor(e,t){super(e,t,!0),this.model.setOptions(a_(TE.donutChart,t.options)),this.init(e,t)}getComponents(){const e=[new dC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.DONUT})];return this.getChartComponents(e)}},t.ExperimentalChoroplethChart=class extends jS{constructor(e,t){super(e,t),this.model=new KO(this.services),this.model.setOptions(a_(TE.choroplethChart,t.options)),this.init(e,t)}getChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled"),i=!!this.model.getOptions().title,a={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},o={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},s={id:"header",components:[new Lx(this.model,this.services,[a,...r?[o]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},l={id:"legend",components:[new aC(this.model,this.services,{chartType:"choropleth"})],growth:nb.PREFERRED,renderType:Vy.SVG},c={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},u=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,d=tb.COLUMN_REVERSE,h={id:"spacer",components:[new Dx(this.model,this.services,{size:15})],growth:nb.PREFERRED},f={id:"full-frame",components:[new Lx(this.model,this.services,[...u?[l]:[],...u?[h]:[],c],{direction:d})],growth:nb.STRETCH},p=[];if(i||r){p.push(s);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};p.push(e)}return p.push(f),[new IS(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,p,{direction:tb.COLUMN})]}getComponents(){const e=[new oT(this.model,this.services)];return this.getChartComponents(e)}},t.GaugeChart=class extends jS{constructor(e,t){super(e,t),this.model=new dT(this.services),this.model.setOptions(a_(TE.gaugeChart,t.options)),this.init(e,t)}getComponents(){const e=[new pC(this.model,this.services)];return this.getChartComponents(e)}},t.GaugeEvent=Cy,t.GaugeTypes=lb,t.GroupedBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.groupedBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new mC(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e)}},t.HeatmapChart=class extends DO{constructor(e,t){super(e,t),this.model=new hT(this.services),this.model.setOptions(a_(TE.heatmapChart,t.options)),this.init(e,t)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const i=!!this.model.getOptions().title,a={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},o={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},s={id:"header",components:[new Lx(this.model,this.services,[a,...r?[o]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},l={id:"legend",components:[new aC(this.model,this.services,{chartType:"heatmap"})],growth:nb.PREFERRED,renderType:Vy.SVG},c={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},u=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,d=tb.COLUMN_REVERSE,h={id:"spacer",components:[new Dx(this.model,this.services,{size:15})],growth:nb.PREFERRED},f={id:"full-frame",components:[new Lx(this.model,this.services,[...u?[l]:[],...u?[h]:[],c],{direction:d})],growth:nb.STRETCH},p=[];if(i||r){p.push(s);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};p.push(e)}return p.push(f),[new AO(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,p,{direction:tb.COLUMN})]}getComponents(){const e=[new UO(this.model,this.services),new gC(this.model,this.services)];return this.getAxisChartComponents(e)}},t.HistogramChart=class extends DO{constructor(e,t){super(e,t),this.model=new fT(this.services),this.model.setOptions(a_(TE.histogramChart,t.options)),this.init(e,t),this.update()}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new rC(this.model,this.services),new vC(this.model,this.services)];return this.getAxisChartComponents(e)}},t.LayoutAlignItems=rb,t.LayoutDirection=tb,t.LayoutGrowth=nb,t.LegendItemType=mb,t.LegendOrientations=Jy,t.LegendPositions=Xy,t.LineChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new IO(this.model,this.services),new $O(this.model,this.services,{handleThresholds:!0}),new CC(this.model,this.services),new HO(this.model,this.services)];return this.getAxisChartComponents(e)}},t.LineEvent=ky,t.LollipopChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.lollipopChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new yC(this.model,this.services),new $O(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.MeterChart=class extends jS{constructor(e,t){var n;super(e,t),this.model=new pT(this.services);const r=null!=(n=t.options.meter)&&n.proportional?sy(qg(TE.proportionalMeterChart),t.options):sy(qg(TE.meterChart),t.options);this.model.setOptions(r),this.init(e,t)}getComponents(){const e=[...d_(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new oC(this.model,this.services)],growth:nb.STRETCH,renderType:Vy.SVG},{id:"spacer",components:[new Dx(this.model,this.services,{size:8})],growth:nb.STRETCH}]:[],{id:"meter-graph",components:[new bC(this.model,this.services)],growth:nb.STRETCH,renderType:Vy.SVG}],t=[new Lx(this.model,this.services,e,{direction:tb.COLUMN})];return this.getChartComponents(t,{graphFrameRenderType:Vy.HTML})}},t.ModalEvent=gy,t.ModelEvent=vy,t.PieChart=uT,t.PieEvent=Oy,t.Projection=bb,t.RadarChart=class extends jS{constructor(e,t){super(e,t),this.model=new mT(this.services),this.model.setOptions(a_(TE.radarChart,t.options)),this.init(e,t)}getComponents(){const e=[new SC(this.model,this.services)];return this.getChartComponents(e)}},t.RadarEvent=Ly,t.RenderTypes=Vy,t.ScaleTypes=Ky,t.ScatterChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.scatterChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new $O(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.ScatterEvent=My,t.SimpleBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.simpleBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new OC(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e)}},t.Skeletons=ab,t.StackedAreaChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.stackedAreaChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new iC(this.model,this.services),new TC(this.model,this.services),new IO(this.model,this.services,{stacked:!0}),new MC(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.StackedBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.stackedBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new iC(this.model,this.services),new AC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ}),new HO(this.model,this.services)];return this.getAxisChartComponents(e)}},t.Statuses=ub,t.TextAnchor=ob,t.ThresholdEvent=Iy,t.TickRotations=db,t.ToolbarControlTypes=fb,t.TooltipEvent=Ny,t.TreeChart=class extends jS{constructor(e,t){super(e,t),this.model=new gT(this.services),this.model.setOptions(a_(TE.treeChart,t.options)),this.init(e,t)}getComponents(){const e=[new kC(this.model,this.services)];return this.getChartComponents(e,{excludeLegend:!0})}},t.TreeEvent=Dy,t.TreeTypes=eb,t.TreemapChart=class extends jS{constructor(e,t){super(e,t),this.model=new vT(this.services),this.model.setOptions(a_(TE.treemapChart,t.options)),this.init(e,t)}getComponents(){const e=[new NC(this.model,this.services)];return this.getChartComponents(e)}},t.TreemapEvent=Ry,t.TruncationTypes=Zy,t.WordCloudChart=class extends jS{constructor(e,t){super(e,t),this.model=new yT(this.services),this.model.setOptions(a_(TE.wordCloudChart,t.options)),this.init(e,t)}getComponents(){const e=[new iT(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.PIE})];return this.getChartComponents(e)}},t.WordCloudEvent=Sy,t.ZoomBarTypes=qy,t.ZoomDomainEvent=_y,t.ZoombarEvent=by,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(t)},5508:(e,t,n)=>{"use strict";n.d(t,{iA:()=>s});var r,i=n(7900),a=n.n(i),o=n(9703);const s=a().forwardRef((function(e,t){let{children:n,size:i=16,...s}=e;return a().createElement(o.I,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...s},r||(r=a().createElement("path",{d:"M29,5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2ZM27,5V9H5V5Zm0,22H5V23H27Zm0-6H5V17H27Zm0-6H5V11H27Z"})),n)}))},2074:(e,t,n)=>{"use strict";n.d(t,{BV:()=>M,XZ:()=>A,_M:()=>L,_Q:()=>R,eA:()=>T,kF:()=>k,s$:()=>D});var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,_,w,E,x,S=n(7900),O=n.n(S),C=n(9703);const T=O().forwardRef((function(e,t){let{children:n,size:i=16,...a}=e;return O().createElement(C.I,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},r||(r=O().createElement("path",{d:"M13,15c1.4854,0,2.5544,1.4966,3.6863,3.0811C17.9983,19.918,19.4854,22,22,22c5.6709,0,7.78-10.79,8-12l-1.9678-.3584C27.55,12.2827,25.3938,20,22,20c-1.4854,0-2.5544-1.4966-3.6863-3.0811C17.0017,15.082,15.5146,13,13,13c-4.186,0-7.4448,7.4043-9,11.7617V2H2V28a2.0025,2.0025,0,0,0,2,2H30V28H5.0439C6.5544,22.8574,9.9634,15,13,15Z"})),n)})),A=O().forwardRef((function(e,t){let{children:n,size:r=16,...a}=e;return O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},i||(i=O().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),n)})),M=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},a||(a=O().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),o||(o=O().createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)})),k=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},s||(s=O().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),l||(l=O().createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=O().createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),u||(u=O().createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},d||(d=O().createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),h||(h=O().createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=O().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),p||(p=O().createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)})),L=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...i},m||(m=O().createElement("path",{d:"M5 6L0 1 0.7 0.3 5 4.6 9.3 0.3 10 1z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},g||(g=O().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},v||(v=O().createElement("path",{d:"M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),n)})),D=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},y||(y=O().createElement("path",{d:"M0 5L5 0 5.7 0.7 1.4 5 5.7 9.3 5 10z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},b||(b=O().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},_||(_=O().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),R=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},w||(w=O().createElement("path",{d:"M6 5L1 10 0.3 9.3 4.6 5 0.3 0.7 1 0z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},E||(E=O().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},x||(x=O().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)}))},9703:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{I:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(3980),d=n.n(u),h=n(7900),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:a,...u}=e;const{tabindex:d,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=o(e,s),d=u.tabindex,h=o(u,l),f=i(i(i({},c),h),{},{width:t,height:n,viewBox:a});return f["aria-label"]||f["aria-labelledby"]||f.title?(f.role="img",null!=d&&(f.focusable="true",f.tabindex=d)):f["aria-hidden"]=!0,f}({...u,tabindex:a});return n&&(h.className=n),null!=d&&(h.tabIndex=d),t&&(h.ref=t),f().createElement("svg",h,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().string,"aria-label":d().string,"aria-labelledby":d().string,children:d().node,className:d().string,height:d().oneOfType([d().number,d().string]),preserveAspectRatio:d().string,tabIndex:d().string,viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string},p.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"},d().oneOfType([d().number,d().string])},9449:(e,t,n)=>{"use strict";n.d(t,{UQy:()=>O,Qdk:()=>X,zxk:()=>de,wQF:()=>Er,gqd:()=>pe,hU:()=>ce,lSo:()=>Ot,mh4:()=>xt,rUS:()=>me,tlE:()=>Kr,OK9:()=>$e,tdY:()=>Ie,iA_:()=>Ut,RMI:()=>Zt,pj1:()=>Yt,xJi:()=>Kt,ssF:()=>tn,xDH:()=>on,SCH:()=>cn,mQc:()=>Ne,n9L:()=>pt});var r={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?r.enableCssCustomProperties=!0:r.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?r.enableUseControlledStateWithValue=!0:r.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?r.enableCssGrid=!0:r.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?r.enableV11Release=!0:r.enableV11Release=!1:r.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?r.enableExperimentalTileContrast=!0:r.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?r.enableV12TileDefaultIcons=!0:r.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1}catch(e){r.enableCssCustomProperties=!1,r.enableUseControlledStateWithValue=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12Overflowmenu=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:r.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:r.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:r.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:r.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:r.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu}];function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i)),r)}var i}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=o(t.value,2),i=r[0],a=r[1];this.flags.has(i)||this.flags.set(i,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=new c(void 0),d=0;d<i.length;d++){var h=i[d];u.add(h.name,h.enabled)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}!function(){u.merge.apply(u,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});var m=n(2779),g=n.n(m),v=n(7900),y=n.n(v);const b=y().createContext("cds");function _(){return y().useContext(b)}var w=n(3980),E=n.n(w);const x=(0,v.createContext)({disabled:!1}),S=e=>{let{disabled:t,children:n}=e;return y().createElement(x.Provider,{value:{disabled:t}},n)};function O(e){let{align:t="end",children:n,className:r,disabled:i=!1,isFlush:a=!1,size:o,...s}=e;const l=_(),c=g()(`${l}--accordion`,r,{[`${l}--accordion--${t}`]:t,[`${l}--accordion--${o}`]:o,[`${l}--layout--size-${o}`]:o,[`${l}--accordion--flush`]:a&&"start"!==t});return y().createElement(S,{disabled:i},y().createElement("ul",p({className:c},s),n))}O.propTypes={align:E().oneOf(["start","end"]),children:E().node,className:E().string,disabled:E().bool,isFlush:E().bool,size:E().oneOf(["sm","md","lg"])};var C=n(2074);function T(){let e=0;return function(){return++e}}const A=!("undefined"==typeof window||!window.document||!window.document.createElement),M=y().createContext(null),k=T(),L=A?v.useLayoutEffect:v.useEffect;let D=!1;function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=y().useContext(M),[n,r]=(0,v.useState)((()=>D?`${t?`${t}-`:""}${e}-${k()}`:null));if(L((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${k()}`)}),[k]),(0,v.useEffect)((()=>{!1===D&&(D=!0)}),[]),"function"==typeof y().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${y().useId()}`}(t,e);return n}return n}const N={};function I(e,t){return function(t,n,r){if(void 0!==t[n]){N[r]&&N[r][n]||(N[r]={...N[r],[n]:!0});for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return e(t,n,r,...a)}}}const P=(0,v.createContext)(null);function $(e){let{as:t,children:n,dir:r,...i}=e;const a=(0,v.useContext)(P),o={},s=t??"span",l={...a};if(a){const{direction:e,getTextDirection:t}=a;if(t&&t.current){const r=function(e){if("string"==typeof e)return e;const t=y().Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t}(n),i=t.current(r);e!==i?(o.dir=i,l.direction=i):"auto"===e&&(o.dir=i)}else e!==r?(o.dir=r,l.direction=r):"auto"===e&&(o.dir=r)}else o.dir=r,l.direction=r;return y().createElement(P.Provider,{value:l},y().createElement(s,p({},i,o),n))}function B(e,t){for(let n=0;n<t.length;n++)if(z(e,t[n]))return!0;return!1}function z(e){let{key:t,which:n,keyCode:r,code:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i}$.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node.isRequired,dir:E().oneOf(["ltr","rtl","auto"])};const U={key:"Enter",which:13,keyCode:13,code:"Enter"},j={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},F={key:" ",which:32,keyCode:32,code:"Space"},V={key:"End",which:35,keyCode:35,code:"Numpad1"},H={key:"Home",which:36,keyCode:36,code:"Numpad7"},G={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},W={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},q={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},Z={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},Y={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},K=e=>y().createElement("button",p({type:"button"},e));function X(e){let{children:t,className:n="",open:r=!1,onHeadingClick:i,renderExpando:a=K,renderToggle:o,title:s="title",disabled:l,handleAnimationEnd:c,...u}=e;const[d,h]=(0,v.useState)(r),[f,m]=(0,v.useState)(r),[b,w]=(0,v.useState)(""),E=(0,v.useContext)(x),S="boolean"==typeof l?l:E.disabled,O=R("accordion-item"),T=_(),A=g()({[`${T}--accordion__item`]:!0,[`${T}--accordion__item--active`]:d,[`${T}--accordion__item--${b}`]:b,[`${T}--accordion__item--disabled`]:S,[n]:!!n}),M=o||a;return r!==f&&(w(d?"collapsing":"expanding"),h(r),m(r)),y().createElement("li",p({className:A},u,{onAnimationEnd:function(e){c&&c(e),w("")}}),y().createElement(M,{disabled:S,"aria-controls":O,"aria-expanded":d,className:`${T}--accordion__heading`,onClick:function(e){const t=!d;w(d?"collapsing":"expanding"),h(t),i&&i({isOpen:t,event:e})},onKeyDown:function(e){d&&z(e,j)&&h(!1)},type:"button"},y().createElement(C._Q,{className:`${T}--accordion__arrow`}),y().createElement($,{as:"div",className:`${T}--accordion__title`},s)),y().createElement("div",{id:O,className:`${T}--accordion__content`},t))}X.propTypes={children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onHeadingClick:E().func,open:E().bool,renderExpando:I(E().func),renderToggle:E().func,title:E().node};var Q="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;const J=e=>(0,v.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function ee(e,t,n){const r=(0,v.useRef)(null);(0,v.useEffect)((()=>{r.current=n}),[n]),(0,v.useEffect)((()=>{const n=e=>{r.current&&r.current(e)},i="current"in e?e.current:e;return i?.addEventListener?.(t,n),()=>{i?.removeEventListener?.(t,n)}}),[e,t])}function te(e,t){const n=(0,v.useRef)(null);(0,v.useEffect)((()=>{n.current=t}),[t]),(0,v.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const ne=y().createContext({floating:{current:null}}),re=y().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-left":"bottom"),as:i="span",autoAlign:a=!1,caret:o=!n,className:s,children:l,dropShadow:c=!0,highContrast:u=!1,onRequestClose:d,open:h,...f}=e;const m=_(),b=(0,v.useRef)(null),w=(0,v.useRef)(null);te("blur",(()=>{h&&d?.()})),te("click",(e=>{h&&!w?.current?.contains(e.target)&&d?.()}));const E=(0,v.useMemo)((()=>({floating:b})),[]);n&&(["bottom-left","bottom-right"].includes(r)||(r="bottom-left"));const x=J([t,w]),[S,O]=(0,v.useState)(!1),[C,T]=(0,v.useState)(r),A=g()({[`${m}--popover-container`]:!0,[`${m}--popover--caret`]:o,[`${m}--popover--drop-shadow`]:c,[`${m}--popover--high-contrast`]:u,[`${m}--popover--open`]:h,[`${m}--popover--${C}`]:S&&!n,[`${m}--popover--${r}`]:!S,[`${m}--popover--tab-tip`]:n},s);Q((()=>{if(!h)return;if(!a||n)return void O(!1);if(!b.current)return;if(!0===S)return;const e=b.current.getBoundingClientRect(),t=e.x<-16,i=e.y<-16,o=e.x+(e.width-16)>document.documentElement.clientWidth,s=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||i||o||s))return void O(!1);const l=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[r];let u=l[(l.indexOf(r)+1)%l.length];for(;u&&!c.includes(u);)c.push(u),u=l[(l.indexOf(u)+1)%l.length];function d(e){if(!w.current||!b.current)return!1;w.current.classList.add(`${m}--popover--${e}`);const t=b.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(w.current.classList.remove(`${m}--popover--${e}`),!1):(w.current.classList.remove(`${m}--popover--${e}`),!0)}let f=null;for(let e=0;e<c.length;e++){const t=c[e];if(d(t)){f=t;break}}f&&(O(!0),T(f))}),[S,r,a,m,h,n]);const M=y().Children.map(l,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=g()(`${m}--popover--tab-tip__button`,e);return y().cloneElement(t,{className:n})}return t})),k=i;return y().createElement(ne.Provider,{value:E},y().createElement(k,p({},f,{className:A,ref:x}),n?M:l))}));function ie(e,t){let{className:n,children:r,...i}=e;const a=_(),{floating:o}=y().useContext(ne),s=J([o,t]);return y().createElement("span",p({},i,{className:`${a}--popover`}),y().createElement("span",{className:g()(`${a}--popover-content`,n),ref:s},r),y().createElement("span",{className:`${a}--popover-caret`}))}re.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:E().oneOfType([E().string,E().elementType]),autoAlign:E().bool,caret:E().bool,children:E().node,className:E().string,dropShadow:E().bool,highContrast:E().bool,isTabTip:E().bool,onRequestClose:E().func,open:E().bool.isRequired};const ae=y().forwardRef(ie);function oe(e){if(!e||!e.childNodes)return null;if(function(e){if(e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}(e))return e;for(const t of e.childNodes){const e=oe(t);if(e)return e}return null}function se(e){if(!e||!e.childNodes)return null;if(e?.getAttribute?.("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes){const e=se(t);if(e)return e}return null}function le(e){let{align:t="top",className:n,children:r,label:i,description:a,enterDelayMs:o=100,leaveDelayMs:s=300,defaultOpen:l=!1,closeOnActivation:c=!1,...u}=e;const d=(0,v.useRef)(null),h=(0,v.useRef)(null),[f,m]=function(e){const[t,n]=(0,v.useState)(e),r=(0,v.useRef)(null),i=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout((()=>{n(e),r.current=null}),t):n(e)}),[]);return(0,v.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(l),b=R("tooltip"),w=_(),E=y().Children.only(r),x={onFocus:()=>m(!0),onBlur:()=>m(!1),onClick:()=>c&&m(!1),onMouseEnter:function(){m(!0,o)}};return i?x["aria-labelledby"]=b:x["aria-describedby"]=b,(0,v.useEffect)((()=>{null!==d&&d.current&&(oe(d.current)||m(!1))})),y().createElement(re,p({},u,{align:t,className:g()(`${w}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){f&&z(e,j)&&(e.stopPropagation(),m(!1)),f&&c&&(z(e,U)||z(e,F))&&m(!1)},onMouseLeave:function(){m(!1,s)},open:f,ref:d}),y().createElement("div",{className:`${w}--tooltip-trigger__wrapper`},void 0!==E?y().cloneElement(E,{...x,...function(e){const t={};return["onFocus","onBlur","onClick","onMouseEnter"].forEach((n=>{t[n]=t=>{x[n](),e?.[n]&&e?.[n](t)}})),t}(E.props)}):null),y().createElement(ae,{"aria-hidden":f?"false":"true",className:`${w}--tooltip-content`,id:b,ref:h,role:"tooltip"},i||a))}ae.propTypes={children:E().node,className:E().string},le.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,description:E().node,enterDelayMs:E().number,label:E().node,leaveDelayMs:E().number};const ce=y().forwardRef((function(e,t){const{align:n,children:r,className:i,closeOnActivation:a=!0,defaultOpen:o=!1,disabled:s,enterDelayMs:l=100,kind:c,label:u,leaveDelayMs:d=100,wrapperClasses:h,size:f,isSelected:m,...v}=e,b=_(),w=g()(h,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:s});return y().createElement(le,{align:n,closeOnActivation:a,className:w,defaultOpen:o,enterDelayMs:l,label:u,leaveDelayMs:d},y().createElement(de,p({},v,{disabled:s,kind:c,ref:t,size:f,className:g()(`${b}--btn--icon-only`,{[`${b}--btn--selected`]:m},i)}),r))}));ce.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,disabled:E().bool,enterDelayMs:E().number,isSelected:E().bool,kind:E().oneOf(["primary","secondary","ghost","tertiary"]),label:E().node.isRequired,leaveDelayMs:E().number,size:E().oneOf(["sm","md","lg"]),wrapperClasses:E().string};const ue=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<e.length&&!t.defaultPrevented;n++){const i=e[n];"function"==typeof i&&i(t,...r)}},de=y().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:a="danger",disabled:o=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:m,onFocus:b,onMouseEnter:w,onMouseLeave:E,renderIcon:x,size:S,tabIndex:O,tooltipAlignment:C="center",tooltipPosition:T="top",type:A="button",...M}=e;const k=(0,v.useRef)(null),L=_(),D=e=>{e.target!==k.current||e.preventDefault()},N={tabIndex:O,className:g()(i,{[`${L}--btn`]:!0,[`${L}--btn--sm`]:"sm"===S&&!u,[`${L}--btn--md`]:"md"===S&&!u,[`${L}--btn--xl`]:"xl"===S,[`${L}--btn--2xl`]:"2xl"===S,[`${L}--layout--size-${S}`]:S,[`${L}--btn--${h}`]:h,[`${L}--btn--disabled`]:o,[`${L}--btn--expressive`]:u,[`${L}--btn--icon-only`]:s,[`${L}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},I=x?y().createElement(x,{"aria-label":c,className:`${L}--btn__icon`,"aria-hidden":"true"}):null,P=x?y().createElement(x,null):null,$=["danger","danger--tertiary","danger--ghost"];let B="button";const z=R("danger-description"),{"aria-pressed":U}=M;let j={disabled:o,type:A,"aria-describedby":$.includes(h)?z:void 0,"aria-pressed":U??(s&&"ghost"===h?d:void 0)};const F={href:l};let V=null;if($.includes(h)&&(V=y().createElement("span",{id:z,className:`${L}--visually-hidden`},a)),n?(B=n,j={...j,...F}):l&&!o&&(B="a",j=F),s){let e;return"top"!==T&&"bottom"!==T||("center"===C&&(e=T),"end"===C&&(e=`${T}-right`),"start"===C&&(e=`${T}-left`)),"right"!==T&&"left"!==T||(e=T),y().createElement(ce,p({as:n,align:e,label:c,kind:h,size:S,onMouseEnter:w,onMouseLeave:E,onFocus:b,onBlur:f,onClick:ue([m,D])},M,N,j),P||r)}return y().createElement(B,{onMouseEnter:w,onMouseLeave:E,onFocus:b,onBlur:f,onClick:m,...M,...N,...j},V,r,I)}));var he,fe;de.displayName="Button",de.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,dangerDescription:E().string,disabled:E().bool,hasIconOnly:E().bool,href:E().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:E().bool,isSelected:E().bool,kind:E().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:E().func,onClick:E().func,onFocus:E().func,onMouseEnter:E().func,onMouseLeave:E().func,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:E().number,tooltipAlignment:E().oneOf(["start","center","end"]),tooltipPosition:E().oneOf(["top","right","bottom","left"]),type:E().oneOf(["button","reset","submit"])};const pe=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:a=!1,className:o,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=_(),d=g()(o,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:a}),h=n,f=Array(h),m=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=y().createElement("tr",{key:e},m.map((e=>y().createElement("td",{key:e},he||(he=y().createElement("span",null))))));return y().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?y().createElement("div",{className:`${u}--data-table-header`},y().createElement("div",{className:`${u}--data-table-header__title`}),y().createElement("div",{className:`${u}--data-table-header__description`})):null,l?y().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},y().createElement("div",{className:`${u}--toolbar-content`},y().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,y().createElement("table",p({className:d},c),y().createElement("thead",null,y().createElement("tr",null,m.map((e=>y().createElement("th",{key:e},t?y().createElement("div",{className:"bx--table-header-label"},t[e]?.header):fe||(fe=y().createElement("span",null))))))),y().createElement("tbody",null,f)))};pe.propTypes={className:E().string,columnCount:E().number,compact:E().bool,headers:E().arrayOf(E().shape({header:E().node.isRequired}).isRequired),rowCount:E().number,showHeader:E().bool,showToolbar:E().bool,zebra:E().bool};const me=y().forwardRef((function(e,t){let{children:n,className:r,href:i,disabled:a=!1,inline:o=!1,visited:s=!1,renderIcon:l,size:c,target:u,...d}=e;const h=_(),f={className:g()(`${h}--link`,r,{[`${h}--link--disabled`]:a,[`${h}--link--inline`]:o,[`${h}--link--visited`]:s,[`${h}--link--${c}`]:c}),rel:"_blank"===u?"noopener":void 0,target:u};return a?(f.role="link",f["aria-disabled"]=!0):f.href=i,y().createElement("a",p({ref:t},f,d),n,!o&&l&&y().createElement("div",{className:`${h}--link__icon`},y().createElement(l,null)))}));me.displayName="Link",me.propTypes={children:E().node,className:E().string,disabled:E().bool,href:E().string,inline:E().bool,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),visited:E().bool};var ge,ve=n(9703);const ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},ge||(ge=y().createElement("path",{d:"M17.4141 16L24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),n)}));var be=16;function _e(e){return"".concat(e/be,"rem")}_e(320),_e(672),_e(16);var we={width:_e(1056),columns:16,margin:_e(16)};_e(1312),_e(16),_e(1584),_e(24);function Ee(e){return _e(8*e)}Ee(.25),Ee(.5),Ee(1),Ee(1.5),Ee(2),Ee(3),Ee(4),Ee(5),Ee(6),Ee(8),Ee(10),Ee(12),Ee(20),Ee(2),Ee(3),Ee(4),Ee(6),Ee(8),Ee(12),Ee(20),Ee(3),Ee(4),Ee(5),Ee(6),Ee(8),_e(24),_e(32),_e(40),_e(48),_e(64),_e(80);var xe,Se,Oe=n(594),Ce=n.n(Oe),Te=n(9074);function Ae(e){const t=(0,v.useRef)(e),n=(0,v.useRef)(!1);(0,v.useEffect)((()=>{t.current=e})),(0,v.useEffect)((()=>{!0!==n.current&&(n.current=!0,t.current())}),[])}function Me(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:a=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=(0,v.useRef)(t),s=(0,v.useRef)(n),l=(0,v.useRef)(r),c=(0,v.useRef)(i),[u,d]=(0,v.useState)(!1),[h,f]=(0,v.useState)(!1),p=(0,v.useRef)({longPress:!1});(0,v.useEffect)((()=>{o.current=t}),[t]),(0,v.useEffect)((()=>{s.current=n}),[n]),(0,v.useEffect)((()=>{l.current=r}),[r]),(0,v.useEffect)((()=>{c.current=i}),[i]),(0,v.useEffect)((()=>{const{current:t}=e;function n(e){d(!0),s.current?.(),e.preventDefault()}function r(){d(!1),f(!1),l.current?.(p.current)}function i(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function a(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),o.current?.(p.current),p.current.longPress=!1}function u(e){e.preventDefault()}return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",a),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",a),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,v.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),a);return()=>{clearTimeout(e)}}}),[u,a]),(0,v.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const ke=y().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Le=y().createContext({index:0,hasSecondaryLabel:!1}),De=`(min-width: ${we.width})`,Re=y().createContext(0);function Ne(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:a,onTabCloseRequest:o}=e;const s=R("ccs"),[l,c]=(0,v.useState)(n),[u,d]=function(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[a,o]=(0,v.useState)(i??t),s=(0,v.useRef)(null);function l(e){const t="function"==typeof e?e(a):e;!1===s.current&&o(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,v.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[a,l]}({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:a,onTabCloseRequest:o,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return y().createElement(ke.Provider,{value:h},t)}function Ie(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:a=!1,fullWidth:o=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:m,selectedIndex:b,setSelectedIndex:w,setActiveIndex:E,dismissable:x}=y().useContext(ke),S=_(),O=(0,v.useRef)(null),T=(0,v.useRef)(null),M=(0,v.useRef)(null),[k,L]=(0,v.useState)(!1),[D,R]=(0,v.useState)(0);let N=!1;a&&(N=y().Children.toArray(r).some((e=>(0,Te.isElement)(e)&&!!e.props.secondaryLabel)));const I=function(e){const[t,n]=(0,v.useState)((()=>!!A&&window.matchMedia(e).matches));return(0,v.useEffect)((()=>{function t(e){n(e.matches)}const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",t):r.addListener(t),n(r.matches),()=>{r.addEventListener?r.removeEventListener("change",t):r.removeListener(t)}}),[e]),t}(De),P=o&&a&&I&&y().Children.toArray(r).length<9,$=g()(`${S}--tabs`,{[`${S}--tabs--contained`]:a,[`${S}--tabs--light`]:c,[`${S}--tabs__icon--default`]:"default"===s,[`${S}--tabs__icon--lg`]:"lg"===s,[`${S}--layout--size-lg`]:"lg"===s,[`${S}--tabs--tall`]:N,[`${S}--tabs--full-width`]:P},i),U=44,[j,F]=(0,v.useState)(!!O.current&&D+U+O.current.clientWidth<O.current.scrollWidth),W=!!O.current&&k&&D>0,Z=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--previous`,{[`${S}--tab--overflow-nav-button--hidden`]:!W}),Y=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--next`,{[`${S}--tab--overflow-nav-button--hidden`]:!j}),K=(0,v.useRef)([]),X=(0,v.useCallback)((()=>Ce()((e=>{R(e.target.scrollLeft)}),d)),[d]);return Ae((()=>{const e=K.current[b];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})})),(0,v.useEffect)((()=>{F(!!O.current&&D+U+O.current.clientWidth<O.current.scrollWidth),x&&O.current&&L(O.current.scrollWidth>O.current.clientWidth)}),[D,r,x]),Ae((()=>{if(K.current[b].disabled){const e=K.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];w(K.current.indexOf(t))}}})),Q((()=>{O.current&&L(O.current.scrollWidth>O.current.clientWidth);const e=Ce()((function(){O.current&&L(O.current.scrollWidth>O.current.clientWidth)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),Q((()=>{null!==D&&O.current&&(O.current.scrollLeft=D)}),[D]),Q((()=>{if(!k||!O.current)return;const e="manual"===t?K.current[m]:K.current[b];if(e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=O.current.scrollLeft+U,a=O.current.scrollLeft+O.current.clientWidth-U;n<i&&R(n-U),r>a&&R(r+U-O.current.clientWidth)}}),[t,m,b,k,r]),Me(T,{onPress(e){let{longPress:t}=e;!t&&O.current&&R(Math.max(D-O.current.scrollWidth/K.current.length*1.5,0))},onLongPress:()=>Pe(O,"backward",R)}),Me(M,{onPress(e){let{longPress:t}=e;!t&&O.current&&R(Math.min(D+O.current.scrollWidth/K.current.length*1.5,O.current.scrollWidth-O.current.clientWidth))},onLongPress:()=>Pe(O,"forward",R)}),y().createElement("div",{className:$},y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:T,className:Z,type:"button"},l),xe||(xe=y().createElement(C.s$,null))),y().createElement("div",p({},f,{"aria-label":n,ref:O,role:"tablist",className:`${S}--tab--list`,onScroll:X,onKeyDown:function(e){if(B(e,[q,G,H,V])){e.preventDefault();const n=K.current.filter((e=>!e.disabled)),r=n.indexOf(K.current["automatic"===t?b:m]),i=K.current.indexOf(n[function(e,t,n){switch(!0){case z(e,q):return(n+1)%t;case z(e,G):return(t+n-1)%t;case z(e,H):return 0;case z(e,V):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?w(i):"manual"===t&&E(i),K.current[i]?.focus()}}}),y().Children.map(r,((e,t)=>(0,Te.isElement)(e)?y().createElement(Le.Provider,{value:{index:t,hasSecondaryLabel:N,contained:a}},y().cloneElement(e,{ref:e=>{K.current[t]=e}})):null))),y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:M,className:Y,type:"button"},u),Se||(Se=y().createElement(C._Q,null))))}function Pe(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const a="forward"===t?5:-5;let o=null;return o=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+a,o=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),o&&cancelAnimationFrame(o)}}Ne.propTypes={children:E().node,defaultSelectedIndex:E().number,dismissable:E().bool,onChange:E().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:E().number},Ie.propTypes={activation:E().oneOf(["automatic","manual"]),"aria-label":E().string.isRequired,children:E().node,className:E().string,contained:E().bool,fullWidth:E().bool,iconSize:E().oneOf(["default","lg"]),leftOverflowButtonProps:E().object,light:I(E().bool),rightOverflowButtonProps:E().object,scrollDebounceWait:E().number,scrollIntoView:E().bool};const $e=(0,v.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:a,onClick:o,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=_(),{selectedIndex:h,setSelectedIndex:f,baseId:m,dismissable:b,onTabCloseRequest:w}=y().useContext(ke),{index:E,hasSecondaryLabel:x,contained:S}=y().useContext(Le),O=(0,v.useRef)(null),C=(0,v.useRef)(null),T=J([t,C]),[A,M]=(0,v.useState)(!1),k=`${m}-tab-${E}`,L=`${m}-tabpanel-${E}`,D=g()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===E,[`${d}--tabs__nav-item--disabled`]:a,[`${d}--tabs__nav-item--hover-off`]:A},i),R=n;ee(O,"mouseover",(e=>{S&&C.current&&(e.stopPropagation(),M(!0),C.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),ee(O,"mouseleave",(()=>{S&&C.current&&(C.current.classList.remove(`${d}--tabs__nav-item--hover-off`),M(!1))}));const N=e=>{e.stopPropagation(),w?.(E)},I=y().createElement("div",{tabIndex:-1,"aria-hidden":!0,className:g()(`${d}--tabs__nav-item--close-icon`,{[`${d}--visually-hidden`]:!b}),onClick:N,title:"Close tab",ref:O},y().createElement(ye,{"aria-hidden":b?"false":"true","aria-label":"Press delete to close tab"})),P=c??b;return y().createElement(R,p({},u,{"aria-controls":L,"aria-disabled":a,"aria-selected":h===E,ref:T,id:k,role:"tab",className:D,disabled:a,onClick:e=>{a||(f(E),o?.(e))},onKeyDown:e=>{b&&z(e,Y)&&N(e),s?.(e)},tabIndex:h===E?"0":"-1",type:"button"}),y().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},b&&c&&y().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},y().createElement(c,{size:16})),y().createElement("span",{className:`${d}--tabs__nav-item-label`,title:r},r),y().createElement("div",{className:g()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!P})},I,!b&&c&&y().createElement(c,{size:16}))),x&&y().createElement("div",{className:`${d}--tabs__nav-item-secondary-label`,title:l},l))}));var Be,ze,Ue,je,Fe,Ve,He,Ge,We;$e.propTypes={as:E().oneOfType([E().string,E().elementType]),children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onKeyDown:E().func,renderButton:E().func,renderIcon:E().oneOfType([E().func,E().object]),secondaryLabel:E().string},y().forwardRef((function(e,t){let{children:n,className:r,defaultOpen:i=!1,enterDelayMs:a,leaveDelayMs:o,label:s,...l}=e;const c=_(),u=g()(`${c}--tabs__nav-item--icon-only`,r);return y().createElement(le,{align:"bottom",defaultOpen:i,className:`${c}--icon-tooltip`,enterDelayMs:a,label:s,leaveDelayMs:o},y().createElement($e,p({className:u,ref:t},l),n))})).propTypes={children:E().node,className:E().string,defaultOpen:E().bool,enterDelayMs:E().number,label:E().node.isRequired,leaveDelayMs:E().number},y().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const a=_(),o=(0,v.useRef)(null),s=J([t,o]),[l,c]=(0,v.useState)(0),[u,d]=(0,v.useState)(!1),{selectedIndex:h,baseId:f}=y().useContext(ke),m=y().useContext(Re),b=`${f}-tabpanel-${m}`,w=`${f}-tab-${m}`,E=g()(`${a}--tab-content`,r,{[`${a}--tab-content--interactive`]:u});return Ae((()=>{o.current&&oe(o.current)&&(d(!0),c(-1))})),(0,v.useEffect)((()=>{const e=o.current;if(!e)return;const t=new MutationObserver((function(){oe(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),y().createElement("div",p({},i,{"aria-labelledby":w,id:b,className:E,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==m}),n)})).propTypes={children:E().node,className:E().string},E().node;const qe=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Be||(Be=y().createElement("path",{d:"M16,2A14.1725,14.1725,0,0,0,2,16,14.1725,14.1725,0,0,0,16,30,14.1725,14.1725,0,0,0,30,16,14.1725,14.1725,0,0,0,16,2Zm8,15H17v7H15V17H8V15h7V8h2v7h7Z"})),ze||(ze=y().createElement("path",{fill:"none",d:"M24 17L17 17 17 24 15 24 15 17 8 17 8 15 15 15 15 8 17 8 17 15 24 15 24 17z","data-icon-path":"inner-path"})),n)})),Ze=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Ue||(Ue=y().createElement("path",{d:"M9.3 3.7L13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},je||(je=y().createElement("path",{d:"M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Fe||(Fe=y().createElement("path",{d:"M14 4L12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ve||(Ve=y().createElement("path",{d:"M18 6L16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),n)})),Ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},He||(He=y().createElement("path",{d:"M3.7 6.7L7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ge||(Ge=y().createElement("path",{d:"M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"})),n)})),Ke=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},We||(We=y().createElement("path",{d:"M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"})),n)}));var Xe,Qe,Je,et,tt,nt,rt,it,at;const ot=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Xe||(Xe=y().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),n)})),st=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Qe||(Qe=y().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),Je||(Je=y().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},et||(et=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),tt||(tt=y().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},nt||(nt=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),rt||(rt=y().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},it||(it=y().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),at||(at=y().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),n)})),lt=(0,v.createContext)(u);function ct(e){return(0,v.useContext)(lt).enabled(e)}var ut,dt,ht,ft;E().node,E().objectOf(E().bool);const pt=y().forwardRef((function(e,t){let{children:n,className:r,light:i=!1,...a}=e;const o=_(),s=g()(`${o}--tile`,i&&`${o}--tile--light`,r);return y().createElement("div",p({className:s,ref:t},a),n)}));pt.displayName="Tile",pt.propTypes={children:E().node,className:E().string,light:I(E().bool)};const mt=y().forwardRef((function(e,t){let{children:n,className:r,clicked:i=!1,disabled:a,href:o,light:s,onClick:l=(()=>{}),onKeyDown:c=(()=>{}),renderIcon:u,...d}=e;const h=_(),f=g()(`${h}--tile`,`${h}--tile--clickable`,i&&`${h}--tile--is-clicked`,s&&`${h}--tile--light`,r),[m,b]=(0,v.useState)(i),w=ct("enable-v12-tile-default-icons");w&&(u||(u=Ze),a&&(u=ot));const E=g()({[`${h}--tile--icon`]:!w||w&&!a,[`${h}--tile--disabled-icon`]:w&&a});return y().createElement(me,p({className:f,href:o,onClick:a?void 0:function(e){e?.persist?.(),b(!m),l(e)},onKeyDown:function(e){e?.persist?.(),B(e,[U,F])&&(e.preventDefault(),b(!m),c(e)),c(e)},ref:t,disabled:a},d),n,u&&y().createElement(u,{className:E,"aria-hidden":"true"}))}));mt.displayName="ClickableTile",mt.propTypes={children:E().node,className:E().string,clicked:E().bool,disabled:E().bool,href:E().string,light:I(E().bool),onClick:E().func,onKeyDown:E().func,rel:E().string,renderIcon:E().oneOfType([E().func,E().object])};const gt=y().forwardRef((function(e,t){let{children:n,className:r,disabled:i,id:a,light:o,onClick:s=(()=>{}),onChange:l=(()=>{}),onKeyDown:c=(()=>{}),selected:u=!1,tabIndex:d=0,title:h="title",...f}=e;const m=_(),b=s,w=c,[E,x]=(0,v.useState)(u),[S,O]=(0,v.useState)(u),T=g()(`${m}--tile`,`${m}--tile--selectable`,E&&`${m}--tile--is-selected`,o&&`${m}--tile--light`,i&&`${m}--tile--disabled`,r);return u!==S&&(x(u),O(u)),y().createElement("div",p({className:T,onClick:i?void 0:function(e){e.preventDefault(),e?.persist?.(),x(!E),b(e),l(e)},role:"checkbox","aria-checked":E,onKeyDown:i?void 0:function(e){e?.persist?.(),B(e,[U,F])&&(e.preventDefault(),x(!E),l(e)),w(e)},tabIndex:i?void 0:d,ref:t,id:a,onChange:i?void 0:function(e){x(e.target.checked),l(e)},title:h},f),y().createElement("span",{className:`${m}--tile__checkmark ${m}--tile__checkmark--persistent`},E?ut||(ut=y().createElement(C.BV,null)):dt||(dt=y().createElement(C.XZ,null))),y().createElement("label",{htmlFor:a,className:`${m}--tile-content`},n))}));gt.displayName="SelectableTile",gt.propTypes={children:E().node,className:E().string,disabled:E().bool,id:E().string,light:I(E().bool),name:E().string,onChange:E().func,onClick:E().func,onKeyDown:E().func,selected:E().bool,tabIndex:E().number,title:E().string,value:E().oneOfType([E().string,E().number]).isRequired};const vt=y().forwardRef((function(e,t){let{tabIndex:n=0,className:r,children:i,expanded:a=!1,tileMaxHeight:o=0,tilePadding:s=0,onClick:l,onKeyUp:c,tileCollapsedIconText:u="Interact to expand Tile",tileExpandedIconText:d="Interact to collapse Tile",tileCollapsedLabel:h,tileExpandedLabel:f,light:m,...b}=e;const[w,E]=(0,v.useState)(o),[x,S]=(0,v.useState)(s),[O,T]=(0,v.useState)(a),[A,M]=(0,v.useState)(o),[k,L]=(0,v.useState)(s),[D,N]=(0,v.useState)(a),[I,P]=(0,v.useState)(!0),$=(0,v.useRef)(null),z=(0,v.useRef)(null),j=(0,v.useRef)(null),V=(0,v.useRef)(null),H=J([t,V]),G=_();function W(){D&&j.current&&E(j.current.getBoundingClientRect()?.height),$.current&&E($.current.getBoundingClientRect().height)}function q(e){e?.persist?.(),N(!D),W()}function Z(e){e.target!==V.current&&B(e,[U,F])&&e.preventDefault()}a!==O&&(N(a),T(a),W()),o!==A&&(E(o),M(o)),s!==k&&(S(s),L(s));const Y=g()(`${G}--tile`,`${G}--tile--expandable`,{[`${G}--tile--is-expanded`]:D,[`${G}--tile--light`]:m},r),K=g()(`${G}--tile`,`${G}--tile--expandable`,`${G}--tile--expandable--interactive`,D&&`${G}--tile--is-expanded`,m&&`${G}--tile--light`,r),X=g()(`${G}--tile__chevron`,`${G}--tile__chevron--interactive`),ee=y().Children.toArray(i);Q((()=>{if(!V.current||!$.current)return;const e=window.getComputedStyle(V.current,null),{current:t}=$,{height:n}=t.getBoundingClientRect(),r=parseInt(e.getPropertyValue("padding-top"),10),i=parseInt(e.getPropertyValue("padding-bottom"),10);E(n),S(r+i)}),[w]),Q((()=>{$.current&&z.current&&(oe(z.current)||se(z.current)||oe($.current)||se($.current)||P(!1))}),[]),Q((()=>{V.current&&(V.current.style.maxHeight=D?"":w+x+"px")}),[D,w,x]),(0,v.useEffect)((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{const[t]=e;E(t.contentRect.height)}));return e.observe($.current),()=>e.disconnect()}),[]);const te=R("expandable-tile-interactive");return I?y().createElement("div",p({ref:H,className:K},b),y().createElement("div",{ref:j},y().createElement("div",{ref:$,className:`${G}--tile-content`},ee[0]),y().createElement("button",{type:"button","aria-expanded":D,"aria-controls":te,onKeyUp:ue([c,Z]),onClick:ue([l,q]),"aria-label":D?d:u,className:X},ht||(ht=y().createElement(C._M,null))),y().createElement("div",{ref:z,className:`${G}--tile-content`,id:te},ee[1]))):y().createElement("button",p({type:"button",ref:H,className:Y,"aria-expanded":D,title:D?d:u},b,{onKeyUp:ue([c,Z]),onClick:ue([l,q]),tabIndex:n}),y().createElement("div",{ref:j},y().createElement("div",{ref:$,className:`${G}--tile-content`},ee[0]),y().createElement("div",{className:`${G}--tile__chevron`},y().createElement("span",null,D?f:h),ft||(ft=y().createElement(C._M,null))),y().createElement("div",{ref:z,className:`${G}--tile-content`},ee[1])))}));vt.propTypes={children:E().node,className:E().string,expanded:E().bool,id:E().string,light:I(E().bool),onClick:E().func,onKeyUp:E().func,tabIndex:E().number,tileCollapsedIconText:E().string,tileCollapsedLabel:E().string,tileExpandedIconText:E().string,tileExpandedLabel:E().string},vt.displayName="ExpandableTile";const yt=y().forwardRef((function(e,t){let{children:n}=e;const r=_();return y().createElement("span",{ref:t,className:`${r}--tile-content__above-the-fold`},n)}));yt.propTypes={children:E().node},yt.displayName="TileAboveTheFoldContent";const bt=y().forwardRef((function(e,t){let{children:n}=e;const r=_();return y().createElement("span",{ref:t,className:`${r}--tile-content__below-the-fold`},n)}));bt.propTypes={children:E().node},bt.displayName="TileBelowTheFoldContent";const _t=y().createContext(1),wt=["one","two","three"],Et=wt.length-1,xt=y().forwardRef((function(e,t){let{as:n="div",className:r,children:i,level:a,...o}=e;const s=y().useContext(_t),l=a??s,c=_(),u=g()(`${c}--layer-${wt[l]}`,r),d=Math.max(0,Math.min(l+1,Et));return y().createElement(_t.Provider,{value:d},y().createElement(n,p({ref:t},o,{className:u}),i))}));function St(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:a="loading",...o}=e;const s=_(),l=g()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=g()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=y().createElement("div",p({},o,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),y().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},y().createElement("title",null,a),i?y().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"44"}):null,y().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:"44"})));return r?y().createElement("div",{className:c},u):u}function Ot(e){let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:a,successDelay:o=1500,...s}=e;const l=_(),c=g()(`${l}--inline-loading`,t),u=y().createElement("div",{className:`${l}--inline-loading__text`},i),d=(()=>{let e=r||n;return"error"===n?y().createElement(st,{className:`${l}--inline-loading--error`},y().createElement("title",null,e)):"finished"===n?(setTimeout((()=>{a&&a()}),o),y().createElement(C.kF,{className:`${l}--inline-loading__checkmark-container`},y().createElement("title",null,e))):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),y().createElement(St,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),h=d&&y().createElement("div",{className:`${l}--inline-loading__animation`},d);return y().createElement("div",p({className:c},s,{"aria-live":"assertive"}),h,i&&u)}xt.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,level:E().oneOf([0,1,2])},St.propTypes={active:E().bool,className:E().string,description:E().string,id:I(E().string),small:E().bool,withOverlay:E().bool},Ot.propTypes={className:E().string,description:E().node,iconDescription:E().string,onSuccess:E().func,status:E().oneOf(["inactive","active","finished","error"]),successDelay:E().number};var Ct=n(3958),Tt=n.n(Ct);const At={NONE:"NONE",DESC:"DESC",ASC:"ASC"},Mt=(e,t)=>`${e}:${t}`,kt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return null===e&&(e=""),null===t&&(t=""),"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?Lt(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props.children&&"string"==typeof t.props.children?Lt(e.props.children,t.props.children,n):Lt(""+e,""+t,n)},Lt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return isNaN(e)||isNaN(parseFloat(e))||isNaN(t)||isNaN(parseFloat(t))?e.localeCompare(t,n):e.localeCompare(t,n,{numeric:!0})},Dt=At.NONE,Rt=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:a}=t,o=(s=i,r===a?"NONE"===s?At.ASC:"ASC"===s?At.DESC:At.NONE:At.ASC);var s;return Nt(e,t,r,o)},Nt=(e,t,n,r)=>{const{rowIds:i,cellsById:a,initialRowOrder:o}=t,{locale:s,sortRow:l}=e,c=r!==At.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:a,sortRow:o}=e;return t.slice().sort(((e,t)=>{const s=n[Mt(e,i)],l=n[Mt(t,i)];return o(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:a,sortStates:At,compare:kt,rowIds:[e,t]})}))})({rowIds:i,cellsById:a,sortDirection:r,key:n,locale:s,sortRow:l}):o;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var It=(e,t)=>{const{rowIds:n,rowsById:r,cellsById:i}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{rowsById:r}=n,i=new Array(e.length),a={},o={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;a[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(a[e.id].isSelected=r[e.id].isSelected,a[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r}=t;const i=Mt(e.id,r);o[i]={id:i,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,info:{header:r}},a[e.id].cells[n]=i}))})),{rowIds:i,rowsById:a,cellsById:o}}(e.rows,e.headers,t),a={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||Dt,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Nt(e,a,t.sortHeaderKey,t.sortDirection);a.rowIds=n}return a.isExpandedAll=a.rowIds.every((e=>!0===a.rowsById[e].isExpanded)),a},Pt=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))}))),$t=()=>{let e=0;return function(){return++e}};const Bt=(0,v.createContext)({titleId:void 0,descriptionId:void 0}),zt=(e,t)=>{if(e.children.length>0)return!1;const n=window.getComputedStyle(e);t.font=n.font?n.font:`${n.fontSize}" "${n.fontFamily}`;const r=t?.measureText(e.textContent??"");let i=r.width??0;const a=n.letterSpacing?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0])*(e.textContent?.length??0));const o=n.paddingLeft?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},Ut=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:a=!1,useStaticWidth:o,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,...u}=e;const{titleId:d,descriptionId:h}=(0,v.useContext)(Bt),f=_(),[m,b]=(0,v.useState)(!1),w=(0,v.useRef)(null),E=g()(`${f}--data-table`,t,{[`${f}--data-table--${i}`]:i,[`${f}--data-table--sort`]:a,[`${f}--data-table--zebra`]:r,[`${f}--data-table--static`]:o,[`${f}--data-table--sticky-header`]:s,[`${f}--data-table--visible-overflow-menu`]:!l}),x=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?w.current?.classList.add(`${f}--data-table--top-aligned-body`):w.current?.classList.remove(`${f}--data-table--top-aligned-body`)}),[f]),S=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?w.current?.classList.add(`${f}--data-table--top-aligned-header`):w.current?.classList.remove(`${f}--data-table--top-aligned-header`)}),[f]),O=(0,v.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(w.current&&e){const t=Array.from(w.current.querySelectorAll("td")).some((t=>zt(t,e))),n=Array.from(w.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${f}--table-header-label`);return n&&zt(n,e)}));x(t),S(n)}}else x(!1),S(!1)}),[c,x,S,f]);te("resize",Ce()(O,100));const C=(0,v.useCallback)((()=>{const e=w?.current?.parentNode,t=w?.current?.firstChild;b(t?.scrollWidth>e?.clientWidth)}),[]);te("resize",Ce()(C,100)),(0,v.useLayoutEffect)((()=>{C()}),[C]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{O()})),(0,v.useLayoutEffect)((()=>{O()}),[O,i]);const T=y().createElement("div",{className:`${f}--data-table-content`,tabIndex:m?0:void 0},y().createElement("table",p({"aria-labelledby":d,"aria-describedby":h},u,{className:E,ref:w}),n));return s?y().createElement("section",{className:`${f}--data-table_inner-container`},T):T};Ut.propTypes={children:E().node,className:E().string,experimentalAutoAlign:E().bool,isSortable:E().bool,overflowMenuOnHover:E().bool,size:E().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:E().bool,useStaticWidth:E().bool,useZebraStyles:E().bool},Ut.defaultProps={isSortable:!1,overflowMenuOnHover:!0};var jt=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const a=_(),o=g()("function"==typeof n?n(a):n,t);return y().createElement(r,{...i,className:o||void 0})}return i.displayName=t,i.propTypes={className:E().string},i},Ft=jt({name:"TableActionList",type:"div",className:e=>`${e}--action-list`});const Vt=e=>y().createElement(de,e);Vt.propTypes={hasIconOnly:E().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:E().oneOfType([E().func,E().object])},Vt.defaultProps={renderIcon:qe,iconDescription:"Add"};var Ht=Vt;const Gt={"carbon.table.batch.cancel":"Cancel","carbon.table.batch.items.selected":"items selected","carbon.table.batch.item.selected":"item selected","carbon.table.batch.selectAll":"Select all"},Wt=function(e){let{totalSelected:t,totalCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{totalSelected:0,totalCount:0};return"carbon.table.batch.cancel"===e?Gt[e]:"carbon.table.batch.selectAll"===e?`${Gt[e]} (${n})`:`${t} ${Gt[e]}`},qt=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:a,onCancel:o,onSelectAll:s,translateWithId:l=Wt,...c}=e;const[u,d]=y().useState(!1),h=_(),f=g()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),m=g()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return y().createElement("div",p({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),y().createElement("div",{className:m},y().createElement("p",{className:`${h}--batch-summary__para`},y().createElement($,{as:"span"},l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&y().createElement(y().Fragment,null,y().createElement("span",{className:`${h}--batch-summary__divider`},"|"),y().createElement(de,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:a})))),y().createElement(Ft,null,n,y().createElement(de,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:o},l("carbon.table.batch.cancel"))))};qt.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],qt.propTypes={children:E().node,className:E().string,onCancel:E().func.isRequired,onSelectAll:E().func,shouldShowBatchActions:E().bool,totalCount:E().number,totalSelected:E().number.isRequired,translateWithId:E().func},qt.defaultProps={translateWithId:Wt};const Zt=e=>{let{children:t,className:n,...r}=e;return y().createElement("tbody",p({className:n},r),t)};Zt.propTypes={"aria-live":E().oneOf(["polite","assertive","off"]),children:E().node,className:E().string},Zt.defaultProps={"aria-live":"polite"};const Yt=jt({name:"TableCell",type:"td"}),Kt=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:a,useStaticWidth:o,...s}=e;const l=R("tc"),c=`${l}-title`,u=`${l}-description`,d=_(),h=g()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:a,[`${d}--data-table-container--static`]:o}),f=(0,v.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return y().createElement(Bt.Provider,{value:f},y().createElement("div",p({},s,{className:h}),r&&y().createElement("div",{className:`${d}--data-table-header`},y().createElement("h4",{className:`${d}--data-table-header__title`,id:c},r),y().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};function Xt(e,t){return function(e,n,r){for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return t(e,n,r,...a)}}Kt.propTypes={children:E().node,className:E().string,description:E().node,stickyHeader:E().bool,title:E().node,useStaticWidth:E().bool};const Qt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:a,enableToggle:o,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=_(),m=g()(`${f}--table-expand`,i),v=l?"collapsed":void 0;return y().createElement("th",p({scope:"col",className:m,"data-previous-value":v,id:s},h),a||o?y().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},y().createElement(C._Q,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};Qt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,enableExpando:I(E().bool),enableToggle:E().bool,expandIconDescription:E().string,id:E().string,isExpanded:Xt(0,E().bool),onExpand:E().oneOfType([Xt(0,E().func),Xt(0,E().func)])};const Jt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,children:a,isExpanded:o,onExpand:s,expandIconDescription:l,isSelected:c,expandHeader:u="expand",...d}=e;const h=_(),f=g()({[`${h}--parent-row`]:!0,[`${h}--expandable-row`]:o,[`${h}--data-table--selected`]:c},i),m=o?"collapsed":void 0;return y().createElement("tr",p({},d,{className:f,"data-parent-row":!0}),y().createElement(Yt,{className:`${h}--table-expand`,"data-previous-value":m,headers:u},y().createElement("button",{type:"button",className:`${h}--table-expand__button`,onClick:s,title:l,"aria-label":r||n,"aria-expanded":o,"aria-controls":t},y().createElement(C._Q,{className:`${h}--table-expand__svg`,"aria-label":l}))),a)};Jt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,expandHeader:E().string,expandIconDescription:E().string,isExpanded:E().bool.isRequired,isSelected:E().bool,onExpand:E().func.isRequired};const en=e=>{let{className:t,children:n,colSpan:r,...i}=e;const a=(0,v.useRef)(null),o=_(),s=g()(`${o}--expandable-row`,t),l=e=>{if(a&&a.current&&a.current.previousElementSibling){const t=a.current.previousElementSibling;"enter"===e?t.classList.add(`${o}--expandable-row--hover`):t.classList.remove(`${o}--expandable-row--hover`)}};return y().createElement("tr",p({ref:a,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),y().createElement(Yt,{colSpan:r},y().createElement("div",{className:`${o}--child-row-inner-container`},n)))};en.propTypes={children:E().node,className:E().string,colSpan:E().number.isRequired};const tn=jt({name:"TableHead",type:"thead"}),nn="col",rn={buttonDescription:"carbon.table.header.icon.description"},an={[At.NONE]:"none",[At.ASC]:"ascending",[At.DESC]:"descending"},on=y().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,isSortable:a,isSortHeader:o,onClick:s,scope:l=nn,sortDirection:c,translateWithId:u,id:d,...h}=e;const f=_(),m=R("table-sort");if(!a)return y().createElement("th",p({},h,{id:d,className:n,scope:l,colSpan:i,ref:t}),r?y().createElement("div",{className:`${f}--table-header-label`},r):null);const v=g()(n,{[`${f}--table-sort`]:!0,[`${f}--table-sort--active`]:o&&c!==At.NONE,[`${f}--table-sort--descending`]:o&&c===At.DESC}),b=o&&c?an[c]:"none",w=u&&u("carbon.table.header.icon.description",{header:r,sortDirection:c,isSortHeader:o,sortStates:At}),E=g()(n,`${f}--table-sort__header`);return y().createElement("th",{id:d,"aria-sort":b,className:E,colSpan:i,ref:t,scope:l},y().createElement("div",{className:`${f}--table-sort__description`,id:m},w),y().createElement("button",p({type:"button","aria-describedby":m,className:v,onClick:s},h),y().createElement("span",{className:`${f}--table-sort__flex`},y().createElement("div",{className:`${f}--table-header-label`},r),y().createElement(Ye,{size:20,className:`${f}--table-sort__icon`}),y().createElement(Ke,{size:20,className:`${f}--table-sort__icon-unsorted`}))))}));on.propTypes={children:E().node,className:E().string,colSpan:E().number,id:E().string,isSortHeader:E().bool,isSortable:E().bool,onClick:E().func,scope:E().string.isRequired,sortDirection:E().oneOf(Object.values(At)),translateWithId:E().func},on.defaultProps={isSortable:!1,scope:nn,translateWithId:(e,t)=>t&&e===rn.buttonDescription?t.isSortHeader&&At?t.sortDirection===At.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===At.ASC?`Click to sort rows by ${t.header} header in descending order`:`Click to unsort rows by ${t.header} header`:`Click to sort rows by ${t.header} header in ascending order`:""},on.translationKeys=Object.values(rn),on.displayName="TableHeader";var sn=n(8979),ln=n.n(sn);const cn=e=>{const t=_(),n=g()(e.className,{[`${t}--data-table--selected`]:e.isSelected}),r={...ln()(e,["ariaLabel","aria-label","aria-controls","onExpand","isExpanded","isSelected"]),className:n||void 0};return y().createElement("tr",r)};cn.propTypes={className:E().string,isSelected:E().bool};const un=y().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:a,id:o,indeterminate:s,name:l,onChange:c=(()=>{}),onClick:u,onKeyDown:d,title:h}=e,f=_(),p=(0,v.useRef)(null),m=J([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:a,id:o,name:l,onClick:u,onChange:e=>{c(e.target.checked,o,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,v.useEffect)((()=>{p?.current&&(p.current.indeterminate=s)}),[s]),y().createElement("div",{className:`${f}--checkbox--inline`},y().createElement("input",g),y().createElement("label",{htmlFor:o,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},y().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));un.propTypes={"aria-label":E().string.isRequired,ariaLabel:I(E().string.isRequired),checked:E().bool,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onChange:E().func,onClick:E().func,onKeyDown:E().func,title:E().string};var dn=un;const hn=e=>{let{ariaLabel:t,checked:n,id:r,indeterminate:i,name:a,onSelect:o,disabled:s,className:l}=e;const c=_();return y().createElement("th",{"aria-live":"off",scope:"col",className:g()(`${c}--table-column-checkbox`,l)},y().createElement(dn,{"aria-label":t,checked:n,id:r,indeterminate:i,name:a,onClick:o,disabled:s}))};hn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onSelect:E().func.isRequired},hn.defaultProps={ariaLabel:"Select all rows in the table"};var fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):Object(t)===t&&(t.current=e)}))}};const pn=y().forwardRef(((e,t)=>{const{className:n,disabled:r,hideLabel:i,id:a,labelPosition:o="right",labelText:s="",name:l,onChange:c=(()=>{}),value:u="",...d}=e,h=_(),f=R("radio-button"),m=a||f,b=g()(`${h}--radio-button__label-text`,{[`${h}--visually-hidden`]:i}),w=g()(n,`${h}--radio-button-wrapper`,{[`${h}--radio-button-wrapper--label-${o}`]:"right"!==o}),E=(0,v.useRef)(null);return y().createElement("div",{className:w},y().createElement("input",p({},d,{type:"radio",className:`${h}--radio-button`,onChange:function(e){c(u,l,e)},id:m,ref:fn(E,t),disabled:r,value:u,name:l})),y().createElement("label",{htmlFor:m,className:`${h}--radio-button__label`},y().createElement("span",{className:`${h}--radio-button__appearance`}),s&&y().createElement($,{className:b},s)))}));pn.displayName="RadioButton",pn.propTypes={checked:E().bool,className:E().string,defaultChecked:E().bool,disabled:E().bool,hideLabel:E().bool,id:E().string,labelPosition:E().oneOf(["right","left"]),labelText:E().node.isRequired,name:E().string,onChange:E().func,onClick:E().func,value:E().oneOfType([E().string,E().number])};const mn=e=>{let{ariaLabel:t,checked:n,id:r,name:i,onSelect:a,onChange:o,disabled:s,radio:l,className:c}=e;const u=_(),d={id:r,name:i,onClick:a,onChange:o,checked:n,disabled:s},h=l?pn:dn,f=g()(`${u}--table-column-checkbox`,{...c&&{[c]:!0},[`${u}--table-column-radio`]:l});return y().createElement("td",{className:f,"aria-live":"off"},y().createElement(h,p({},d,l&&{labelText:t,hideLabel:!0},!l&&{"aria-label":t})))};mn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,name:E().string.isRequired,onChange:E().func,onSelect:E().func.isRequired,radio:E().bool};const gn=(vn={"aria-label":E().string,"aria-labelledby":E().string},Object.keys(vn).reduce(((e,t)=>{return{...e,[t]:(n=vn[t],function(e,t,r){for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return n(e,t,r,...a)})};var n}),{}));var vn;const yn=e=>{let{children:t,size:n,...r}=e;const i=_(),a=g()({[`${i}--table-toolbar`]:!0,[`${i}--table-toolbar--${n}`]:n});return y().createElement("section",p({},r,{className:a}),t)};yn.propTypes={...gn,children:E().node,size:E().oneOf(["sm","lg"])},yn.defaultProps={"aria-label":"data table toolbar"};const bn=y().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:a,hasDivider:o=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=(()=>{}),onKeyDown:h=(()=>{}),requireTitle:f,title:m,wrapperClassName:v,...b}=e;const w=_(),E=g()(`${w}--overflow-menu-options__btn`,n),x=g()(`${w}--overflow-menu-options__option`,{[`${w}--overflow-menu--divider`]:o,[`${w}--overflow-menu-options__option--danger`]:l,[`${w}--overflow-menu-options__option--disabled`]:i},v),S=s?"a":"button",O="string"!=typeof u?u:y().createElement("div",{className:`${w}--overflow-menu-options__option-content`},u);return y().createElement("li",{className:x,role:"none"},y().createElement(S,p({className:E,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){z(e,Z)&&a?.({currentIndex:c,direction:1}),z(e,W)&&a?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?m||u:void 0},b),O))}));bn.propTypes={className:E().string,closeMenu:E().func,disabled:E().bool,handleOverflowMenuItemFocus:E().func,hasDivider:E().bool,href:E().string,index:E().number,isDelete:E().bool,itemText:E().node.isRequired,onBlur:E().func,onClick:E().func,onFocus:E().func,onKeyDown:E().func,onKeyUp:E().func,onMouseDown:E().func,onMouseEnter:E().func,onMouseLeave:E().func,onMouseUp:E().func,requireTitle:E().bool,title:E().string,wrapperClassName:E().string};const _n=y().forwardRef(((e,t)=>{let{children:n,...r}=e;return y().createElement(bn,p({ref:t,itemText:n},r))}));_n.displayName="TableToolbarAction",_n.propTypes={children:E().node,className:E().string,onClick:E().func.isRequired};const wn=jt({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var En,xn,Sn,On,Cn,Tn;const An=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},En||(En=y().createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},xn||(xn=y().createElement("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"})),n)})),Mn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Sn||(Sn=y().createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),On||(On=y().createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Cn||(Cn=y().createElement("path",{d:"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"})),Tn||(Tn=y().createElement("path",{d:"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"})),n)})),kn=(0,v.createContext)({isFluid:!1});var Ln;const Dn=y().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:a,disabled:o,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=(()=>{}),onClear:h=(()=>{}),onKeyDown:f,onExpand:m,placeholder:b="Search",renderIcon:w,role:E="searchbox",size:x="md",type:S="text",value:O,...C}=e;const T=!(!O&&!a),A=_(),{isFluid:M}=(0,v.useContext)(kn),k=(0,v.useRef)(null),L=J([t,k]),D=(0,v.useRef)(null),N=R("search-input"),I=l||N,P=`${I}-search`,[$,B]=(0,v.useState)(T||!1),[V,H]=(0,v.useState)(O),G=g()({[`${A}--search`]:!0,[`${A}--search--sm`]:"sm"===x,[`${A}--search--md`]:"md"===x,[`${A}--search--lg`]:"lg"===x,[`${A}--search--light`]:u,[`${A}--search--disabled`]:o,[`${A}--search--fluid`]:M},r),W=g()({[`${A}--search-close`]:!0,[`${A}--search-close--hidden`]:!$||!s});function q(){!O&&k.current&&(k.current.value="");const e=Object.assign({},k.current,{value:""});d({target:e,type:"change"}),h(),B(!1),function(e){const t=e.current||e;t&&t.focus&&document.activeElement!==t&&t.focus()}(k)}return O!==V&&(B(!!O),H(O)),y().createElement("div",{role:"search","aria-label":b,className:G},y().createElement("div",{"aria-labelledby":m?I:void 0,role:m?"button":void 0,className:`${A}--search-magnifier`,onClick:m,onKeyDown:function(e){(z(e,U)||z(e,F))&&(e.stopPropagation(),m&&m(e))},tabIndex:m&&!s?0:-1,ref:D,"aria-expanded":!(!m||!s)||void 0,"aria-controls":m?I:void 0},y().createElement(Rn,{icon:w})),y().createElement("label",{id:P,htmlFor:I,className:`${A}--label`},c),y().createElement("input",p({autoComplete:n,className:`${A}--search-input`,defaultValue:a,disabled:o,role:E,ref:L,id:I,onChange:ue([d,function(e){B(""!==e.target.value)}]),onKeyDown:ue([f,function(e){z(e,j)&&(e.stopPropagation(),k.current?.value?q():m&&s&&D.current?.focus())}]),placeholder:b,type:S,value:O,tabIndex:m&&!s?-1:void 0},C)),y().createElement("button",{"aria-label":i,className:W,disabled:o,onClick:q,title:i,type:"button"},Ln||(Ln=y().createElement(ye,null))))}));function Rn(e){let{icon:t}=e;const n=_();return t?y().createElement(t,{className:`${n}--search-magnifier-icon`}):y().createElement(An,{className:`${n}--search-magnifier-icon`})}Dn.displayName="Search",Dn.propTypes={autoComplete:E().string,className:E().string,closeButtonLabelText:E().string,defaultValue:E().oneOfType([E().string,E().number]),disabled:E().bool,id:E().string,isExpanded:E().bool,labelText:E().node.isRequired,light:I(E().bool),onChange:E().func,onClear:E().func,onExpand:E().func,onKeyDown:E().func,placeholder:E().string,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg"]),type:E().string,value:E().oneOfType([E().string,E().number])},Rn.propTypes={icon:E().oneOfType([E().func,E().object])};const Nn=$t(),In={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},Pn=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i,translateWithId:a,placeholder:o,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f,id:m,onBlur:b,onFocus:w,size:E="lg",tabIndex:x,...S}=e;const{current:O}=(0,v.useRef)(void 0!==l),[C,T]=(0,v.useState)(c||u),A=O?l:C,[M,k]=(0,v.useState)(u||""),L=(0,v.useMemo)(Nn,[]),[D,R]=(0,v.useState)(null),N=_();(0,v.useEffect)((()=>{D&&(D.current?.querySelector?.("input")?.focus(),R(null))}),[D]),(0,v.useEffect)((()=>{u&&r?.("",u)}),[]);const I=g()(t,{[n]:n,[`${N}--toolbar-search-container-active`]:A,[`${N}--toolbar-search-container-disabled`]:d,[`${N}--toolbar-search-container-expandable`]:!f,[`${N}--toolbar-search-container-persistent`]:f}),P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!A;d||(O||f||T(t),h&&h(e,t))};return y().createElement(Dn,p({disabled:d,className:I,value:M,id:void 0!==m?m:L.toString(),labelText:s||a("carbon.table.toolbar.search.label"),placeholder:o||a("carbon.table.toolbar.search.placeholder"),onChange:e=>{k(e.target.value),r&&r(e)},onClear:i,onFocus:w?e=>w(e,P):e=>P(e,!0),onBlur:b?e=>b(e,P):e=>!M&&P(e,!1),size:E,tabIndex:x},S))};var $n,Bn,zn;Pn.propTypes={children:E().node,className:E().string,defaultExpanded:E().bool,defaultValue:E().string,disabled:E().bool,expanded:E().bool,id:E().string,labelText:E().string,onBlur:E().func,onChange:E().func,onClear:E().func,onExpand:E().func,onFocus:E().func,persistent:E().bool,placeholder:E().string,searchContainerClass:E().string,size:E().oneOf(["sm","md","lg"]),tabIndex:E().oneOfType([E().number,E().string]),translateWithId:E().func.isRequired},Pn.defaultProps={tabIndex:"0",translateWithId:e=>In[e],persistent:!1,onClear:()=>{}};const Un=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$n||($n=y().createElement("circle",{cx:"16",cy:"8",r:"2"})),Bn||(Bn=y().createElement("circle",{cx:"16",cy:"16",r:"2"})),zn||(zn=y().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));var jn=n(8316);function Fn(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Vn=y().createContext({state:{isRoot:!0,hasIcons:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:()=>{}}),Hn=y().createContext({direction:"ltr"}),Gn=y().forwardRef((function(e,t){let{children:n,className:r,label:i,onClose:a,onOpen:o,open:s,size:l="sm",target:c=document.body,x:u=0,y:d=0,...h}=e;const f=_(),m=(0,v.useRef)(null),b=(0,v.useContext)(Vn),w=b.state.isRoot,E=w?l:b.state.size,[x,S]=(0,v.useReducer)(Fn,{...b.state,isRoot:!1,size:l,requestCloseRoot:w?R:b.state.requestCloseRoot}),O=(0,v.useMemo)((()=>({state:x,dispatch:S})),[x,S]),C=(0,v.useRef)(),T=J([t,C]),[A,M]=(0,v.useState)([-1,-1]),k=O.state.items.filter((e=>!e.disabled&&e.ref.current)),{direction:L}=(0,v.useContext)(Hn);function D(){m.current&&m.current.focus()}function R(e){/^key/.test(e.type)?window.addEventListener("keyup",D,{once:!0}):"click"===e.type&&C.current?C.current.addEventListener("focusout",D,{once:!0}):D(),a&&a()}function N(e){const t=k.findIndex((e=>e.ref.current.contains(document.activeElement)));let n=t;-1===t?n=0:e&&(z(e,W)&&(n-=1),z(e,Z)&&(n+=1)),n<0&&(n=k.length-1),n>=k.length&&(n=0),n!==t&&k[n].ref.current.focus()}function I(e,t){const{width:n,height:r}=C.current.getBoundingClientRect(),i=w?"vertical":"horizontal",a={x:{max:window.innerWidth,size:n,anchor:"horizontal"===i?e[1]:e[0],reversedAnchor:"horizontal"===i?e[0]:e[1],offset:0},y:{max:window.innerHeight,size:r,anchor:"horizontal"===i?e[0]:e[1],reversedAnchor:"horizontal"===i?e[1]:e[0],offset:w?0:4}},{max:o,size:s,anchor:l,reversedAnchor:c,offset:u}=a[t],d=[o-8-s-l>=0&&l-u,c-s>=0&&c-s+u,o-8-s].find((e=>!1!==e));return d>=8?d:8}(0,v.useEffect)((()=>{s&&k.length>0&&N()}),[s,k]),(0,v.useEffect)((()=>{s?function(){if(C.current){m.current=document.activeElement;const e=function(){if(C.current){const e={x:"object"==typeof u&&2===u.length?u:[u,u],y:"object"==typeof d&&2===d.length?d:[d,d]};return[I(e.x,"x"),I(e.y,"y")]}return[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==L||h?.id?.includes("MenuButton")?(C.current.style.insetInlineStart=`${e[0]}px`,C.current.style.insetInlineEnd="initial"):(C.current.style.insetInlineStart="initial",C.current.style.insetInlineEnd=`${e[0]}px`),C.current.style.insetBlockStart=`${e[1]}px`,M(e),C.current.focus(),o&&o()}}():M(-1,-1)}),[s]);const P=g()(r,`${f}--menu`,`${f}--menu--${E}`,{[`${f}--menu--open`]:s,[`${f}--menu--shown`]:A[0]>=0&&A[1]>=0,[`${f}--menu--with-icons`]:O.state.hasIcons}),$=y().createElement(Vn.Provider,{value:O},y().createElement("ul",p({},h,{className:P,role:"menu",ref:T,"aria-label":i,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(z(e,j)||!w&&z(e,G))&&a?R(e):N(e)},onBlur:function(e){s&&a&&w&&!C.current.contains(e.relatedTarget)&&R(e)}}),n));return w?s&&(0,jn.createPortal)($,c)||null:$}));Gn.propTypes={children:E().node,className:E().string,label:E().string,onClose:E().func,onOpen:E().func,open:E().bool,size:E().oneOf(["xs","sm","md","lg"]),target:E().object,x:E().oneOfType([E().number,E().arrayOf(E().number)]),y:E().oneOfType([E().number,E().arrayOf(E().number)])};const Wn="md",qn=y().forwardRef((function(e,t){let{children:n,className:r,label:i="Options",renderIcon:a=Un,size:o=Wn,tooltipAlignment:s,...l}=e;const c=R("overflowmenu"),u=_(),d=(0,v.useRef)(null),{open:h,x:f,y:m,handleClick:b,handleMousedown:w,handleClose:E}=function(e){const[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)([[-1,-1],[-1,-1]]);function a(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?a():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:a}=t.getBoundingClientRect();i([[e,r],[n,a]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:a}}(d),x=g()(r,`${u}--overflow-menu__container`),S=g()(`${u}--overflow-menu`,{[`${u}--overflow-menu--open`]:h},o!==Wn&&`${u}--overflow-menu--${o}`);return y().createElement("div",p({},l,{className:x,"aria-owns":h?c:null,ref:t}),y().createElement(ce,{"aria-controls":h?c:null,"aria-haspopup":!0,"aria-expanded":h,className:S,onClick:b,onMouseDown:w,ref:d,label:i,align:s},y().createElement(a,{className:`${u}--overflow-menu__icon`})),y().createElement(Gn,{id:c,size:o,open:h,onClose:E,x:f,y:m,label:i},n))}));qn.propTypes={children:E().node,className:E().string,label:E().string,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),tooltipAlignment:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"])},n(7677);class Zn extends y().Component{static getEventTarget(e){return e.composed&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target}constructor(e){super(e),this.handleRef=this.handleRef.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick(e){this.element&&this.element.contains&&!this.element.contains(Zn.getEventTarget(e))&&this.props.onClickOutside(e)}handleRef(e){const{children:t}=this.props;this.element=e,t.ref&&"function"==typeof t.ref&&t.ref(e)}render(){return y().cloneElement(this.props.children,{ref:this.handleRef})}}f(Zn,"propTypes",{children:E().element.isRequired,onClickOutside:E().func.isRequired});var Yn=n(3883),Kn=n.n(Yn),Xn=function(){const e=[];let t=!1;function n(){e.forEach((e=>{e()})),t=!1}function r(){t||(t=!0,Kn().requestAnimationFrame(n))}return{add:t=>(e.length||Kn().addEventListener("resize",r),function(t){t&&e.indexOf(t)<0&&e.push(t)}(t),{release(){const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}}();const Qn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS,Jn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY,er="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";var tr=n(8431),nr=n.n(tr);const rr="left",ir="top",ar="right",or="bottom",sr=e=>{let{menuSize:t,refPosition:n={},offset:r={},direction:i=or,scrollX:a=0,scrollY:o=0,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:a,f="static"!==s.position?0:o,p="static"!==s.position?s.rect.top:0,m="static"!==s.position?s.rect.left:0,{width:g,height:v}=t,{top:y=0,left:b=0}=r,_=(l+u)/2,w=(c+d)/2;return{[rr]:()=>({left:l-g+h-b-m,top:w-v/2+f+y-9-p}),[ir]:()=>({left:_-g/2+h+b-m,top:c-v+f-y-p}),[ar]:()=>({left:u+h+b-m,top:w-v/2+f+y+3-p}),[or]:()=>({left:_-g/2+h+b-m,top:d+f+y-p})}[i]()};class lr extends y().Component{constructor(){var e;super(...arguments),e=this,f(this,"_placeInProgress",!1),f(this,"state",{floatingPosition:void 0}),f(this,"_menuContainer",null),f(this,"_menuBody",null),f(this,"startSentinel",y().createRef()),f(this,"endSentinel",y().createRef()),f(this,"_updateMenuSize",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e._menuBody;if(!r)return;const{menuOffset:i={},menuDirection:a}=t,{menuOffset:o={},menuDirection:s}=e.props;if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return typeof e!=typeof t||(Object(t)===t&&"function"!=typeof t?e.top!==t.top||e.left!==t.left:e!==t)}(i,o)||a!==s||n){const{flipped:t,triggerRef:i,updateOrientation:a}=e.props,{current:l}=i,c=r.getBoundingClientRect(),u=l&&l.getBoundingClientRect(),d="function"!=typeof o?o:o(r,s,l,t);a&&a({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}}),(c.width>0&&c.height>0||!d)&&e.setState({floatingPosition:sr({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}})},(()=>{n||r.getBoundingClientRect()!==c&&e._updateMenuSize(e.props,!0)}))}})),f(this,"_focusMenuContent",(e=>{const t=e.querySelector(this.props.selectorPrimaryFocus||null),n=e.querySelector(er),r=e.querySelector("\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n");(t||n||r||e).focus()})),f(this,"_menuRef",(e=>{const{menuRef:t}=this.props;this._placeInProgress=!!e,t&&t(this._menuBody=e),e&&this._updateMenuSize()})),f(this,"_getChildrenWithProps",(()=>{const{styles:e,children:t}=this.props,{floatingPosition:n}=this.state,r=n?{left:`${n.left}px`,top:`${n.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return y().cloneElement(t,{ref:this._menuRef,style:{...e,...r,position:"absolute",opacity:1}})})),f(this,"handleBlur",(e=>{let{target:t,relatedTarget:n}=e;if(n&&t){const{current:e}=this.startSentinel,{current:r}=this.endSentinel;!function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:a,selectorsFloatingMenus:o}=e;if(t&&i&&a&&!t.contains(i)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"function"==typeof e.closest)return[".cds--overflow-menu-options",".cds--tooltip",".flatpickr-calendar",...t].some((t=>e.closest(t)))}(i,o)){const e=a.compareDocumentPosition(i);if(i===n||e&Qn){const e=nr()(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==a&&t.focus()}else if(i===r||e&Jn){const e=Array.prototype.find.call(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==a&&t.focus()}}}({bodyNode:this._menuBody,startSentinelNode:e,endSentinelNode:r,currentActiveNode:n,oldActiveNode:t})}}))}componentWillUnmount(){this.hResize.release()}componentDidMount(){this.hResize=Xn.add((()=>{this._updateMenuSize()}))}componentDidUpdate(e){this._updateMenuSize(e);const{onPlace:t}=this.props;this._placeInProgress&&this.state.floatingPosition&&(this._menuBody&&!this._menuBody.contains(document.activeElement)&&this._focusMenuContent(this._menuBody),"function"==typeof t&&(t(this._menuBody),this._placeInProgress=!1))}render(){const{context:e}=this;if("undefined"!=typeof document){const{focusTrap:t,target:n}=this.props;return jn.createPortal(y().createElement("div",{onBlur:t?this.handleBlur:null},y().createElement("span",{ref:this.startSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel"),this._getChildrenWithProps(),y().createElement("span",{ref:this.endSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel")),n?n():document.body)}return null}}f(lr,"contextType",b),f(lr,"propTypes",{children:E().object,flipped:E().bool,focusTrap:E().bool,menuDirection:E().oneOf([rr,ir,ar,or]),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuRef:E().func,onPlace:E().func,selectorPrimaryFocus:E().string,styles:E().object,target:E().func,triggerRef:E().oneOfType([E().func,E().shape({current:E().any})]),updateOrientation:E().func}),f(lr,"defaultProps",{menuOffset:{},menuDirection:or,updateOrientation:null});var cr=lr;const ur=T(),dr={[ir]:"bottom",[or]:"top"},hr=(e,t,n,r)=>{const i=dr[t],{offsetWidth:a,offsetHeight:o}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(a/2-(n?n.offsetWidth:0)/2),top:0};case"left":case"right":return{left:0,top:(r?-1:1)*(o/2-(n?n.offsetHeight:0)/2)}}};class fr extends v.Component{constructor(){super(...arguments),f(this,"state",{}),f(this,"instanceId",ur()),f(this,"_hFocusIn",null),f(this,"_hBlurTimeout",void 0),f(this,"_triggerRef",y().createRef()),f(this,"handleClick",(e=>{e.stopPropagation(),this._menuBody&&this._menuBody.contains(e.target)||(this.setState({open:!this.state.open}),this.props.onClick(e))})),f(this,"closeMenuAndFocus",(()=>{let e=this.state.open;this.closeMenu((()=>{e&&this.focusMenuEl()}))})),f(this,"handleKeyPress",(e=>{this.state.open&&B(e,[W,q,Z,G])&&e.preventDefault(),B(e,[j])&&(this.closeMenuAndFocus(),e.stopPropagation())})),f(this,"handleClickOutside",(e=>{!this.state.open||this._menuBody&&this._menuBody.contains(e.target)||this.closeMenu()})),f(this,"closeMenu",(e=>{this.setState({open:!1},(()=>{e&&e(),this.props.onClose()}))})),f(this,"focusMenuEl",(()=>{const{current:e}=this._triggerRef;e&&e.focus()})),f(this,"handleOverflowMenuItemFocus",(e=>{let{currentIndex:t,direction:n}=e;const r=y().Children.toArray(this.props.children).reduce(((e,t,n)=>(t.props.disabled||e.push(n),e)),[]),i=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),a=this[`overflowMenuItem${r[i]}`];a?.focus()})),f(this,"_bindMenuBody",(e=>{e||(this._menuBody=e),!e&&this._hFocusIn&&(this._hFocusIn=this._hFocusIn.release())})),f(this,"_handlePlace",(e=>{if(e){this._menuBody=e;const t="onfocusin"in window,n=t?"focusin":"focus";this._hFocusIn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener(...n),{release:()=>(e.removeEventListener(...n),null)}}(e.ownerDocument,n,(t=>{const n=Zn.getEventTarget(t),{current:r}=this._triggerRef;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${this.context}--overflow-menu,.${this.context}--overflow-menu-options`)||this.closeMenuAndFocus())}),!t),this.props.onOpen()}})),f(this,"_getTarget",(()=>{const{current:e}=this._triggerRef;return e&&e.closest("[data-floating-menu-container]")||document.body}))}componentDidUpdate(e,t){const{onClose:n}=this.props;!this.state.open&&t.open&&n()}componentDidMount(){this._triggerRef.current&&this.setState({hasMountedTrigger:!0})}static getDerivedStateFromProps(e,t){let{open:n}=e;const{prevOpen:r}=t;return r===n?null:{open:n,prevOpen:n}}componentWillUnmount(){"number"==typeof this._hBlurTimeout&&(clearTimeout(this._hBlurTimeout),this._hBlurTimeout=void 0)}render(){const e=this.context,{id:t,"aria-label":n,ariaLabel:r,children:i,iconDescription:a,direction:o,flipped:s,focusTrap:l,menuOffset:c,menuOffsetFlip:u,iconClass:d,onClick:h,onOpen:f,selectorPrimaryFocus:m="[data-floating-menu-primary-focus]",renderIcon:v,innerRef:b,menuOptionsClass:_,light:w,size:E="md",...x}=this.props,{open:S}=this.state,O=g()(this.props.className,`${e}--overflow-menu`,{[`${e}--overflow-menu--open`]:S,[`${e}--overflow-menu--light`]:w,[`${e}--overflow-menu--${E}`]:E}),C=g()(_,`${e}--overflow-menu-options`,{[`${e}--overflow-menu--flip`]:this.props.flipped,[`${e}--overflow-menu-options--open`]:S,[`${e}--overflow-menu-options--light`]:w,[`${e}--overflow-menu-options--${E}`]:E}),T=g()(`${e}--overflow-menu__icon`,d),A=y().Children.toArray(i).map(((e,t)=>y().cloneElement(e,{closeMenu:e?.props?.closeMenu||this.closeMenuAndFocus,handleOverflowMenuItemFocus:this.handleOverflowMenuItemFocus,ref:e=>{this[`overflowMenuItem${t}`]=e},index:t}))),M=`overflow-menu-${this.instanceId}__menu-body`,k=y().createElement("ul",{className:C,tabIndex:"-1",role:"menu","aria-label":n||r,onKeyDown:this.handleKeyPress,id:M},A),L=y().createElement(cr,{focusTrap:l,triggerRef:this._triggerRef,menuDirection:o,menuOffset:s?u:c,menuRef:this._bindMenuBody,flipped:this.props.flipped,target:this._getTarget,onPlace:this._handlePlace,selectorPrimaryFocus:this.props.selectorPrimaryFocus},y().cloneElement(k,{"data-floating-menu-direction":o})),D={className:T,"aria-label":a};return y().createElement(Zn,{onClickOutside:this.handleClickOutside},y().createElement("span",{className:`${e}--overflow-menu__wrapper`,"aria-owns":S?M:null},y().createElement(ce,p({},x,{type:"button","aria-haspopup":!0,"aria-expanded":this.state.open,"aria-controls":S?M:null,className:O,onClick:this.handleClick,id:t,ref:fn(this._triggerRef,b),size:E,label:a}),y().createElement(v,D)),S&&this.state.hasMountedTrigger&&L))}}f(fr,"propTypes",{"aria-label":E().string,ariaLabel:I(E().string),children:E().node,className:E().string,direction:E().oneOf([ir,or]),flipped:E().bool,focusTrap:E().bool,iconClass:E().string,iconDescription:E().string.isRequired,id:E().string,light:I(E().bool),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOffsetFlip:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOptionsClass:E().string,onClick:E().func,onClose:E().func,onFocus:E().func,onKeyDown:E().func,onOpen:E().func,open:E().bool,renderIcon:E().oneOfType([E().func,E().object]),selectorPrimaryFocus:E().string,size:E().oneOf(["sm","md","lg"])}),f(fr,"contextType",b),f(fr,"defaultProps",{"aria-label":null,iconDescription:"Options",open:!1,direction:or,flipped:!1,focusTrap:!0,renderIcon:Un,onClick:()=>{},onKeyDown:()=>{},onClose:()=>{},onOpen:()=>{},menuOffset:hr,menuOffsetFlip:hr,selectorPrimaryFocus:"[data-overflow-menu-primary-focus]"});const pr=function(e){function t(t){return y().createElement(e,t)}const n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t}(fr);function mr(e){return ct("enable-v12-overflowmenu")?y().createElement(qn,e):y().createElement(pr,e)}mr.displayName="OverflowMenu";const gr="Settings",vr=e=>{let{className:t,renderIcon:n,iconDescription:r=gr,children:i,...a}=e;const o=_(),s=g()(t,`${o}--toolbar-action ${o}--overflow-menu`);return y().createElement(mr,p({"aria-label":r,renderIcon:n,className:s,title:r,iconDescription:r,flipped:!0},a),i)};vr.defaultProps={renderIcon:Mn,iconDescription:gr},vr.propTypes={children:E().node.isRequired,className:E().string,iconDescription:E().string.isRequired,renderIcon:E().oneOfType([E().func,E().object])};const yr=$t(),br={expandRow:"carbon.table.row.expand",collapseRow:"carbon.table.row.collapse",expandAll:"carbon.table.all.expand",collapseAll:"carbon.table.all.collapse",selectAll:"carbon.table.all.select",unselectAll:"carbon.table.all.unselect",selectRow:"carbon.table.row.select",unselectRow:"carbon.table.row.unselect"},_r={[br.expandAll]:"Expand all rows",[br.collapseAll]:"Collapse all rows",[br.expandRow]:"Expand current row",[br.collapseRow]:"Collapse current row",[br.selectAll]:"Select all rows",[br.unselectAll]:"Unselect all rows",[br.selectRow]:"Select row",[br.unselectRow]:"Unselect row"},wr={filterRows:e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:a}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const o=a(e,n);return"boolean"!=typeof r[o].value&&(""+r[o].value).toLowerCase().includes(i.toLowerCase())}))))},locale:"en",overflowMenuOnHover:!0,size:"lg",sortRow:(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:a}=n;return r===i.ASC?kt(e,t,a):kt(t,e,a)},translateWithId:e=>_r[e]};class Er extends y().Component{constructor(e){var t;super(e),t=this,f(this,"instanceId",void 0),f(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:a,sortHeaderKey:o}=this.state;return{...i,key:t.key,sortDirection:a,isSortable:r,isSortHeader:o===t.key,onClick:e=>{const r=Rt(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),f(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props,{isExpandedAll:a,rowIds:o,rowsById:s}=t.state,l=a||o.every((e=>s[e].isExpanded)),c=l?br.collapseAll:br.expandAll;return{...r,ariaLabel:i(c),"aria-label":i(c),"aria-controls":o.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:ue([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),f(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),f(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),f(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i}=this.props,a=t.isExpanded?br.collapseRow:br.expandRow;return{...r,key:t.id,onExpand:ue([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,ariaLabel:i(a),"aria-label":i(a),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),f(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),f(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props;if(n){const a=n.isSelected?br.unselectRow:br.selectRow;return{...r,checked:n.isSelected,onSelect:ue([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:"select-row",ariaLabel:i(a),disabled:n.disabled,radio:t.props.radio||null}}const a=t.state.rowIds.length,o=t.getSelectedRows().length,s=a>0&&o===a,l=a>0&&o>0&&o!==a,c=s||l?br.unselectAll:br.selectAll;return{...r,ariaLabel:i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:"select-all",onSelect:ue([t.handleSelectAll,e])}})),f(this,"getToolbarProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{size:n}=t.props;return{...e,size:"xs"===n||"sm"===n?"sm":void 0}})),f(this,"getBatchActionProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{shouldShowBatchActions:n}=t.state,r=t.getSelectedRows().length;return{onSelectAll:void 0,totalCount:t.state.rowIds.length||0,...e,shouldShowBatchActions:n&&r>0,totalSelected:r,onCancel:t.handleOnCancel}})),f(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:a,experimentalAutoAlign:o}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:a,experimentalAutoAlign:o}})),f(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),f(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),f(this,"getFilteredRowIds",(()=>{const e="string"==typeof this.state.filterInputValue?this.props.filterRows({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:Mt}):this.state.rowIds;return 0==e.length?[]:e})),f(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),f(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,a)=>{const o={...e.rowsById[a]};return o.disabled||i&&!n.includes(a)||(o.isSelected=t),r[a]=o,r}),{})}})),f(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),f(this,"handleSelectAll",(()=>{this.setState((e=>{const t=this.getFilteredRowIds(),{rowsById:n}=e,r=!(Object.values(n).filter((e=>e.isSelected&&!e.disabled)).length>0);return{shouldShowBatchActions:r,...this.setAllSelectedState(e,r,t)}}))})),f(this,"handleOnSelectRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e];if(this.props.radio)return{shouldShowBatchActions:!1,rowsById:{...Object.entries(t.rowsById).reduce(((e,t)=>{const[n,r]=t;return r.isSelected=!1,e[n]=r,e}),{}),[e]:{...n,isSelected:!n.isSelected}}};const r=t.rowIds.filter((e=>t.rowsById[e].isSelected)).length,i=n.isSelected?r-1:r+1;return{shouldShowBatchActions:!n.isSelected||i>0,rowsById:{...t.rowsById,[e]:{...n,isSelected:!n.isSelected}}}}))})),f(this,"handleOnExpandRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e],{isExpandedAll:r}=t;return{isExpandedAll:!n.isExpanded&&r,rowsById:{...t.rowsById,[e]:{...n,isExpanded:!n.isExpanded}}}}))})),f(this,"handleOnExpandAll",(()=>{this.setState((e=>{const{rowIds:t,isExpandedAll:n}=e;return{isExpandedAll:!n,rowsById:t.reduce(((t,r)=>({...t,[r]:{...e.rowsById[r],isExpanded:!n}})),{})}}))})),f(this,"handleSortBy",(e=>()=>{this.setState((t=>Rt(this.props,t,{key:e})))})),f(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...It(e,{}),isExpandedAll:!1},this.instanceId=yr()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!Tt()(t,n))return this.setState((e=>It(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!Tt()(r,i))return this.setState((e=>It(this.props,e))),!1;if(!Tt()(e.rows,this.props.rows))return this.setState((e=>It(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:a,rowsById:o,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:a,headers:n,cellsById:s,inputValue:i,getCellId:Mt}):a,c={rows:Pt(l,o,s),headers:this.props.headers,selectedRows:Pt(this.getSelectedRows(),o,s),getHeaderProps:this.getHeaderProps,getExpandHeaderProps:this.getExpandHeaderProps,getRowProps:this.getRowProps,getExpandedRowProps:this.getExpandedRowProps,getSelectionProps:this.getSelectionProps,getToolbarProps:this.getToolbarProps,getBatchActionProps:this.getBatchActionProps,getTableProps:this.getTableProps,getTableContainerProps:this.getTableContainerProps,onInputChange:this.handleOnInputValueChange,sortBy:e=>this.handleSortBy(e)(),selectAll:this.handleSelectAll,selectRow:e=>this.handleOnSelectRow(e)(),expandRow:e=>this.handleOnExpandRow(e)(),expandAll:this.handleOnExpandAll,radio:this.props.radio};return void 0!==r?r(c):void 0!==e?e(c):null}}var xr,Sr,Or,Cr;f(Er,"defaultProps",wr),f(Er,"propTypes",{experimentalAutoAlign:E().bool,filterRows:E().func,headers:E().arrayOf(E().shape({key:E().string.isRequired,header:E().node.isRequired})).isRequired,isSortable:E().bool,locale:E().string,overflowMenuOnHover:E().bool,radio:E().bool,rows:E().arrayOf(E().shape({id:E().string.isRequired,disabled:E().bool,isSelected:E().bool,isExpanded:E().bool})).isRequired,size:E().oneOf(["xs","sm","md","lg","xl"]),sortRow:E().func,stickyHeader:E().bool,translateWithId:E().func,useStaticWidth:E().bool,useZebraStyles:E().bool}),f(Er,"translationKeys",Object.values(br)),f(Er,"Table",void 0),f(Er,"TableActionList",void 0),f(Er,"TableBatchAction",void 0),f(Er,"TableBatchActions",void 0),f(Er,"TableBody",void 0),f(Er,"TableCell",void 0),f(Er,"TableContainer",void 0),f(Er,"TableExpandHeader",void 0),f(Er,"TableExpandRow",void 0),f(Er,"TableExpandedRow",void 0),f(Er,"TableHead",void 0),f(Er,"TableHeader",void 0),f(Er,"TableRow",void 0),f(Er,"TableSelectAll",void 0),f(Er,"TableSelectRow",void 0),f(Er,"TableToolbar",void 0),f(Er,"TableToolbarAction",void 0),f(Er,"TableToolbarContent",void 0),f(Er,"TableToolbarSearch",void 0),f(Er,"TableToolbarMenu",void 0),Er.Table=Ut,Er.TableActionList=Ft,Er.TableBatchAction=Ht,Er.TableBatchActions=qt,Er.TableBody=Zt,Er.TableCell=Yt,Er.TableContainer=Kt,Er.TableExpandHeader=Qt,Er.TableExpandRow=Jt,Er.TableExpandedRow=en,Er.TableHead=tn,Er.TableHeader=on,Er.TableRow=cn,Er.TableSelectAll=hn,Er.TableSelectRow=mn,Er.TableToolbar=yn,Er.TableToolbarAction=_n,Er.TableToolbarContent=wn,Er.TableToolbarSearch=Pn,Er.TableToolbarMenu=vr;const Tr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},xr||(xr=y().createElement("path",{d:"M5 8L0 4 5 0z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Sr||(Sr=y().createElement("path",{d:"M20 24L10 16 20 8z"})),n)})),Ar=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Or||(Or=y().createElement("path",{d:"M0 0L5 4 0 8z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Cr||(Cr=y().createElement("path",{d:"M12 8L22 16 12 24z"})),n)}));var Mr,kr,Lr,Dr,Rr,Nr,Ir,Pr,$r,Br,zr;const Ur=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Mr||(Mr=y().createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),kr||(kr=y().createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),Lr||(Lr=y().createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),n)})),jr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Dr||(Dr=y().createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),Rr||(Rr=y().createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Nr||(Nr=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),Ir||(Ir=y().createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Pr||(Pr=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),$r||($r=y().createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Br||(Br=y().createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),zr||(zr=y().createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),n)})),Fr=T(),Vr=y().forwardRef((function(e,t){let{className:n,id:r,inline:i=!1,labelText:a,disabled:o=!1,children:s,noLabel:l=!1,hideLabel:c=!1,invalid:u=!1,invalidText:d,helperText:h,light:f=!1,readOnly:m,size:b,warn:w=!1,warnText:E,onChange:x,...S}=e;const O=_(),{isFluid:T}=(0,v.useContext)(kn),[A,M]=(0,v.useState)(!1),[k,L]=(0,v.useState)(""),{current:D}=(0,v.useRef)(Fr()),R=g()({[`${O}--select`]:!0,[`${O}--select--inline`]:i,[`${O}--select--light`]:f,[`${O}--select--invalid`]:u,[`${O}--select--disabled`]:o,[`${O}--select--readonly`]:m,[`${O}--select--warning`]:w,[`${O}--select--fluid--invalid`]:T&&u,[`${O}--select--fluid--focus`]:T&&A}),N=g()(`${O}--label`,{[`${O}--visually-hidden`]:c,[`${O}--label--disabled`]:o}),I=g()({[`${O}--select-input`]:!0,[`${O}--select-input--${b}`]:b}),P=`${r}-error-msg`,$=u?d:w?E:void 0,B=u||w?y().createElement("div",{className:`${O}--form-requirement`,id:P},$):null,z=g()(`${O}--form__helper-text`,{[`${O}--form__helper-text--disabled`]:o}),U=h?`select-helper-text-${D}`:void 0,j=h?y().createElement("div",{id:U,className:z},h):null,F={};u?F["aria-describedby"]=P:i||T||(F["aria-describedby"]=j?U:void 0);const V=e=>{M("focus"===e.type)},H={onMouseDown:e=>{m&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{m&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}},G=y().createElement(y().Fragment,null,y().createElement("select",p({},S,F,{id:r,className:I,disabled:o||void 0,"aria-invalid":u||void 0,"aria-readonly":m||void 0,title:k,onChange:ue([x,e=>{L(e?.target?.value)}])},H,{ref:t}),s),y().createElement(C._M,{className:`${O}--select__arrow`}),u&&y().createElement(jr,{className:`${O}--select__invalid-icon`}),!u&&w&&y().createElement(Ur,{className:`${O}--select__invalid-icon ${O}--select__invalid-icon--warning`}));return y().createElement("div",{className:g()(`${O}--form-item`,n)},y().createElement("div",{className:R},!l&&y().createElement("label",{htmlFor:r,className:N},a),i&&y().createElement("div",{className:`${O}--select-input--inline__wrapper`},y().createElement("div",{className:`${O}--select-input__wrapper`,"data-invalid":u||null},G),B),!i&&y().createElement("div",{className:`${O}--select-input__wrapper`,"data-invalid":u||null,onFocus:V,onBlur:V},G,T&&y().createElement("hr",{className:`${O}--select__divider`}),T&&B?B:null),i||T||!B?j:B))}));Vr.displayName="Select",Vr.propTypes={children:E().node,className:E().string,defaultValue:E().any,disabled:E().bool,helperText:E().node,hideLabel:E().bool,id:E().string.isRequired,inline:E().bool,invalid:E().bool,invalidText:E().node,labelText:E().node,light:I(E().bool),noLabel:E().bool,onChange:E().func,readOnly:E().bool,size:E().oneOf(["sm","md","lg"]),warn:E().bool,warnText:E().node},Vr.defaultProps={disabled:!1,labelText:"Select",inline:!1,invalid:!1,invalidText:"",helperText:""};const Hr=e=>{let{className:t,value:n,disabled:r,hidden:i,text:a,...o}=e;const s=_(),l=g()({[`${s}--select-option`]:!0,...t&&{[t]:t}});return y().createElement("option",p({},o,{className:l,value:n,disabled:r,hidden:i}),a)};var Gr,Wr;function qr(e){return"object"==typeof e[0]&&null!==e[0]?e:e.map((e=>({text:e,value:e})))}function Zr(e,t){return t&&e.find((e=>t===e.value))?t:e[0].value}Hr.propTypes={className:E().string,disabled:E().bool,hidden:E().bool,text:E().string.isRequired,value:E().any.isRequired},Hr.defaultProps={disabled:!1,hidden:!1,value:"",text:""};const Yr=y().forwardRef((function(e,t){let{backwardText:n="Previous page",className:r,disabled:i=!1,forwardText:a="Next page",id:o,isLastPage:s=!1,itemText:l=((e,t)=>`${e}–${t} items`),itemRangeText:c=((e,t,n)=>`${e}–${t} of ${n} items`),itemsPerPageText:u="Items per page:",onChange:d,pageNumberText:h="Page Number",pageRangeText:f=((e,t)=>`of ${t} ${1===t?"page":"pages"}`),page:m=1,pageInputDisabled:b,pageSize:w,pageSizeInputDisabled:E,pageSizes:x,pageText:S=((e,t)=>`page ${t?"":e}`),pagesUnknown:O=!1,size:C="md",totalItems:T,...A}=e;const M=_(),k=function(e){const t=R();return e??t}(o),L=(0,v.useRef)(null),D=(0,v.useRef)(null),[N,I]=(0,v.useState)((()=>qr(x))),[P,$]=(0,v.useState)(x),[B,z]=(0,v.useState)(m),[U,j]=(0,v.useState)(m),[F,V]=(0,v.useState)((()=>Zr(N,w))),[H,G]=(0,v.useState)(w),W=g()({[`${M}--pagination`]:!0,[`${M}--pagination--${C}`]:C,[r]:!!r}),q=Math.max(Math.ceil(T/F),1),Z=i||1===B,Y=g()({[`${M}--pagination__button`]:!0,[`${M}--pagination__button--backward`]:!0,[`${M}--pagination__button--no-index`]:Z}),K=i||B===q,X=g()({[`${M}--pagination__button`]:!0,[`${M}--pagination__button--forward`]:!0,[`${M}--pagination__button--no-index`]:K}),Q=function(e){let t=1,n=[];for(;t<=e;)n.push(y().createElement(Hr,{key:t,value:t,text:String(t)})),t++;return n}(q);if(m!==U&&(z(m),j(m)),w!==H&&(V(Zr(N,w)),G(w)),!function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(e===t)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,P)){const e=qr(x),t=e.find((e=>e.value===F));t||z(1),I(e),$(x)}return y().createElement("div",p({className:W,ref:t},A),y().createElement("div",{className:`${M}--pagination__left`},y().createElement("label",{id:`${M}-pagination-select-${k}-count-label`,className:`${M}--pagination__text`,htmlFor:`${M}-pagination-select-${k}`},u),y().createElement(Vr,{id:`${M}-pagination-select-${k}`,className:`${M}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};z(t.page),V(t.pageSize),d&&d(t)},disabled:E||i,value:F},N.map((e=>y().createElement(Hr,{key:e.value,value:e.value,text:String(e.text)})))),y().createElement("span",{className:`${M}--pagination__text ${M}--pagination__items-count`},O?l(F*(B-1)+1,B*F):c(Math.min(F*(B-1)+1,T),Math.min(B*F,T),T))),y().createElement("div",{className:`${M}--pagination__right`},O?y().createElement("span",{className:`${M}--pagination__text ${M}--pagination__page-text`},O?S(B,O):f(B,q)):null,y().createElement(Vr,{id:`${M}-pagination-select-${k}-right`,className:`${M}--select__page-number`,labelText:`Page number, of ${q} pages`,inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&t<=Math.max(Math.ceil(T/F),1)&&(z(t),d&&d({page:t,pageSize:F}))},value:B,disabled:b||i},Q),O?null:y().createElement("span",{className:`${M}--pagination__text`},O?S(B,O):f(B,q)),y().createElement("div",{className:`${M}--pagination__control-buttons`},y().createElement(ce,{align:"top",disabled:Z,kind:"ghost",className:Y,label:n,onClick:function(){const e=B-1;z(e),1===e&&D.current.focus(),d&&d({page:e,pageSize:F,forwardBtnRef:D})},ref:L},Gr||(Gr=y().createElement(Tr,null))),y().createElement(ce,{align:"top-right",disabled:K||s,kind:"ghost",className:X,label:a,onClick:function(){const e=B+1;z(e),e===q&&L.current.focus(),d&&d({page:e,pageSize:F,backBtnRef:L})},ref:D},Wr||(Wr=y().createElement(Ar,null))))))}));Yr.propTypes={backwardText:E().string,className:E().string,disabled:E().bool,forwardText:E().string,id:E().oneOfType([E().string,E().number]),isLastPage:E().bool,itemRangeText:E().func,itemText:E().func,itemsPerPageText:E().string,onChange:E().func,page:E().number,pageInputDisabled:E().bool,pageNumberText:E().string,pageRangeText:E().func,pageSize:E().number,pageSizeInputDisabled:E().bool,pageSizes:E().oneOfType([E().arrayOf(E().number),E().arrayOf(E().shape({text:E().text,value:E().number}))]).isRequired,pageText:E().func,pagesUnknown:E().bool,size:E().oneOf(["sm","md","lg"]),totalItems:E().number};var Kr=Yr},8230:(e,t)=>{"use strict";var n=Symbol.for("react.element");Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}},9074:(e,t,n)=>{"use strict";e.exports=n(8230)},321:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},o=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=a[c]||0,d="".concat(c," ").concat(u);a[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:p,references:1})}o.push(d)}return o}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var s=n(a[o]);t[s].references--}for(var l=r(e,i),c=0;c<a.length;c++){var u=n(a[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=l}}},3275:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},2094:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7162:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1195:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},757:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},4512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-generic-patient-widgets__obs-graph__label01___nqHbU,.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve{flex-grow:4;padding:0 1rem 3rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .cds--cc--layout-row{height:0}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .layout-child{margin-top:.5rem}.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{margin-bottom:1rem;display:inline-block}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw{margin:1rem 0;scroll-behavior:smooth}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw>ul{flex-direction:column !important}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi{outline:0;outline-offset:0}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:active,.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:focus{outline:2px solid var(--brand-03) !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-graph/obs-graph.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,8DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,oEACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,qEACE,WAAA,CACA,mBAAA,CAEA,0FACE,QAAA,CAGF,mFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,+DACE,aAAA,CACA,sBAAA,CAEA,kEACE,gCAAA,CAGF,wJACE,gBAAA,CAGF,uHACE,0BAAA,CACA,6BAAA,CAIJ,sDACE,SAAA,CACA,gBAAA,CAEA,yHACE,4CAAA,CAGF,0EACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,2EACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,0EACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,iGACE,kBAAA",sourceRoot:""}]),o.locals={label01:"-esm-generic-patient-widgets__obs-graph__label01___nqHbU",conceptLabel:"-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin",bodyShort01:"-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj",graphContainer:"-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT",conceptPickerTabs:"-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph",lineChartContainer:"-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve",verticalTabs:"-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw",tab:"-esm-generic-patient-widgets__obs-graph__tab___dw7mi",tablist:"-esm-generic-patient-widgets__obs-graph__tablist___f25Mm"};const s=o},1897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;border:1px solid #e0e0e0}.-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem}.-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI{width:fit-content;margin:0 .5rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg{padding:.5rem;color:#0f62fe;min-height:0px}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary{border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--tooltip__trigger:active:not([disabled]){border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:active{border-color:#0f62fe;background-color:#edf5ff;color:#edf5ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:focus{background-color:#0f62fe;color:#fff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:hover{color:#fff;background-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost{border-color:#a6c8ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost:hover{color:#000;background-color:#f4f4f4}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type{border-radius:.25rem 0 0 .25rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type.cds--btn--ghost{border-right:0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type{border-radius:0 .25rem .25rem 0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type.cds--btn--ghost{border-left:0rem}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;position:relative}.-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-switchable/obs-switchable.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCpDF,uEACE,qBDGc,CCFd,wBAAA,CAGF,uEACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CAGF,qEACE,iBAAA,CACA,cAAA,CAGF,8DACE,aAAA,CACA,aDDe,CCEf,cAAA,CAEA,iFACE,oBDLa,CCQf,2GACE,oBDTa,CCYf,wFACE,oBDba,CCcb,wBAAA,CACA,aAAA,CAGF,uFACE,wBDnBa,CCoBb,UDlCY,CCqCd,uFACE,UDtCY,CCuCZ,wBDzBa,CC4Bf,8EACE,oBAAA,CAGF,oFACE,UAAA,CACA,wBDvDI,CC2DR,4EACE,+BAAA,CAEA,4FACE,cAAA,CAIJ,2EACE,+BAAA,CAEA,2FACE,gBAAA,CAIJ,uEACE,qBDrEc,CCsEd,iBAAA,CAGF,yEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,uFACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),o.locals={widgetContainer:"-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6",headerContainer:"-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW",toggleButtons:"-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI",toggle:"-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg",headerActionItems:"-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq",backgroundDataFetchingIndicator:"-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ"};const s=o},5136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,".-esm-generic-patient-widgets__obs-table__customRow___Kp7z_ tbody{white-space:nowrap}.-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK{width:max-content;max-width:300px}","",{version:3,sources:["webpack://./src/obs-table/obs-table.scss"],names:[],mappings:"AAAA,kEACE,kBAAA,CAGF,8DACE,iBAAA,CACA,eAAA",sourceRoot:""}]),o.locals={customRow:"-esm-generic-patient-widgets__obs-table__customRow___Kp7z_",tableHeader:"-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK"};const s=o},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&o[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},7677:e=>{"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},594:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||o.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function _(){var e=p();if(b(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return d?f(n,a-(e-c)):n}(e))}function w(e){return s=void 0,v&&r?y(e):(r=i=void 0,o)}function E(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(_,t),u?y(e):o}(l);if(d)return s=setTimeout(_,t),y(l)}return void 0===s&&(s=setTimeout(_,t)),o}return t=g(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?o:w(p())},E}},8431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,a=2,o=1/0,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",y="[object Promise]",b="[object RegExp]",_="[object Set]",w="[object String]",E="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,A=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/^\s+|\s+$/g,L=/\\(\\)?/g,D=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,N=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,P=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[l]=$[c]=$[S]=$[u]=$[O]=$[d]=$[h]=$[f]=$[m]=$[g]=$[v]=$[b]=$[_]=$[w]=$[x]=!1;var B=parseInt,z="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,U="object"==typeof self&&self&&self.Object===Object&&self,j=z||U||Function("return this")(),F=t&&!t.nodeType&&t,V=F&&e&&!e.nodeType&&e,H=V&&V.exports===F&&z.process,G=function(){try{return H&&H.binding("util")}catch(e){}}(),W=G&&G.isTypedArray;function q(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function Z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function Y(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var X,Q,J,ee=Array.prototype,te=Function.prototype,ne=Object.prototype,re=j["__core-js_shared__"],ie=(X=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",ae=te.toString,oe=ne.hasOwnProperty,se=ne.toString,le=RegExp("^"+ae.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=j.Symbol,ue=j.Uint8Array,de=ne.propertyIsEnumerable,he=ee.splice,fe=(Q=Object.keys,J=Object,function(e){return Q(J(e))}),pe=Math.max,me=Math.min,ge=Ve(j,"DataView"),ve=Ve(j,"Map"),ye=Ve(j,"Promise"),be=Ve(j,"Set"),_e=Ve(j,"WeakMap"),we=Ve(Object,"create"),Ee=Xe(ge),xe=Xe(ve),Se=Xe(ye),Oe=Xe(be),Ce=Xe(_e),Te=ce?ce.prototype:void 0,Ae=Te?Te.valueOf:void 0,Me=Te?Te.toString:void 0;function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Le(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){var t=-1,n=e?e.length:0;for(this.__data__=new De;++t<n;)this.add(e[t])}function Ne(e){this.__data__=new Le(e)}function Ie(e,t){for(var n=e.length;n--;)if(tt(e[n][0],t))return n;return-1}function Pe(e,t){for(var n=0,r=(t=We(t,e)?[t]:Ue(t)).length;null!=e&&n<r;)e=e[Ke(t[n++])];return n&&n==r?e:void 0}function $e(e,t){return null!=e&&t in Object(e)}function Be(e,t,n,r,o){return e===t||(null==e||null==t||!st(e)&&!lt(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var f=rt(e),p=rt(t),y=c,x=c;f||(y=(y=He(e))==l?v:y),p||(x=(x=He(t))==l?v:x);var C=y==v&&!Z(e),T=x==v&&!Z(t),A=y==x;if(A&&!C)return s||(s=new Ne),f||ut(e)?je(e,t,n,r,o,s):function(e,t,n,r,o,s,l){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!r(new ue(e),new ue(t)));case u:case d:case g:return tt(+e,+t);case h:return e.name==t.name&&e.message==t.message;case b:case w:return e==t+"";case m:var c=Y;case _:var f=s&a;if(c||(c=K),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;s|=i,l.set(e,t);var v=je(c(e),c(t),r,o,s,l);return l.delete(e),v;case E:if(Ae)return Ae.call(e)==Ae.call(t)}return!1}(e,t,y,n,r,o,s);if(!(o&a)){var M=C&&oe.call(e,"__wrapped__"),k=T&&oe.call(t,"__wrapped__");if(M||k){var L=M?e.value():e,D=k?t.value():t;return s||(s=new Ne),n(L,D,r,o,s)}}return!!A&&(s||(s=new Ne),function(e,t,n,r,i,o){var s=i&a,l=dt(e),c=l.length;if(c!=dt(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:oe.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,o):r(m,g,d,e,t,o);if(!(void 0===v?m===g||n(m,g,r,i,o):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,s))}(e,t,Be,n,r,o))}function ze(e){return"function"==typeof e?e:null==e?ht:"object"==typeof e?rt(e)?function(e,t){return We(e)&&qe(t)?Ze(Ke(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Pe(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r,i=-1,a=(t=We(t,e)?[t]:Ue(t)).length;++i<a;){var o=Ke(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||!!(a=e?e.length:0)&&ot(a)&&Ge(o,a)&&(rt(e)||nt(e))}(e,t,$e)}(n,e):Be(t,r,void 0,i|a)}}(e[0],e[1]):(n=function(e){for(var t=dt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,qe(i)]}return t}(t=e),1==n.length&&n[0][2]?Ze(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var o=n.length,s=o;if(null==e)return!s;for(e=Object(e);o--;){var l=n[o];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=n[o])[0],u=e[c],d=l[1];if(l[2]){if(void 0===u&&!(c in e))return!1}else{var h,f=new Ne;if(!(void 0===h?Be(d,u,r,i|a,f):h))return!1}}return!0}(e,0,n)}):We(r=e)?(o=Ke(r),function(e){return null==e?void 0:e[o]}):function(e){return function(t){return Pe(t,e)}}(r);var t,n,r,o}function Ue(e){return rt(e)?e:Ye(e)}function je(e,t,n,r,o,s){var l=o&a,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=o&i?new Re:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!q(t,(function(e,t){if(!p.has(t)&&(m===e||n(m,e,r,o,s)))return p.add(t)}))){f=!1;break}}else if(m!==g&&!n(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Fe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!st(e)||function(e){return!!ie&&ie in e}(e))&&(at(e)||Z(e)?le:N).test(Xe(e))}(n)?n:void 0}ke.prototype.clear=function(){this.__data__=we?we(null):{}},ke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ke.prototype.get=function(e){var t=this.__data__;if(we){var n=t[e];return n===r?void 0:n}return oe.call(t,e)?t[e]:void 0},ke.prototype.has=function(e){var t=this.__data__;return we?void 0!==t[e]:oe.call(t,e)},ke.prototype.set=function(e,t){return this.__data__[e]=we&&void 0===t?r:t,this},Le.prototype.clear=function(){this.__data__=[]},Le.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0||(n==t.length-1?t.pop():he.call(t,n,1),0))},Le.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Le.prototype.has=function(e){return Ie(this.__data__,e)>-1},Le.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new ke,map:new(ve||Le),string:new ke}},De.prototype.delete=function(e){return Fe(this,e).delete(e)},De.prototype.get=function(e){return Fe(this,e).get(e)},De.prototype.has=function(e){return Fe(this,e).has(e)},De.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,r),this},Re.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.clear=function(){this.__data__=new Le},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Le){var r=n.__data__;if(!ve||r.length<199)return r.push([e,t]),this;n=this.__data__=new De(r)}return n.set(e,t),this};var He=function(e){return se.call(e)};function Ge(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function We(e,t){if(rt(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ct(e))||T.test(e)||!C.test(e)||null!=t&&e in Object(t)}function qe(e){return e==e&&!st(e)}function Ze(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ge&&He(new ge(new ArrayBuffer(1)))!=O||ve&&He(new ve)!=m||ye&&He(ye.resolve())!=y||be&&He(new be)!=_||_e&&He(new _e)!=x)&&(He=function(e){var t=se.call(e),n=t==v?e.constructor:void 0,r=n?Xe(n):void 0;if(r)switch(r){case Ee:return O;case xe:return m;case Se:return y;case Oe:return _;case Ce:return x}return t});var Ye=et((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ct(e))return Me?Me.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return A.test(e)&&n.push(""),e.replace(M,(function(e,t,r,i){n.push(r?i.replace(L,"$1"):t||e)})),n}));function Ke(e){if("string"==typeof e||ct(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function Xe(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Qe,Je=(Qe=function(e,t,n){var r=e?e.length:0;if(!r)return-1;var i,a,s,l=r-1;return void 0!==n&&(a=(i=(s=n)?(s=function(e){if("number"==typeof e)return e;if(ct(e))return NaN;if(st(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=st(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(k,"");var n=R.test(e);return n||I.test(e)?B(e.slice(2),n?2:8):D.test(e)?NaN:+e}(s))===o||s===-o?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0)%1,l=i==i?a?i-a:i:0,l=n<0?pe(r+l,0):me(l,r-1)),function(e,t,n,r){e.length;for(var i=n+1;i--;)if(t(e[i],i,e))return i;return-1}(e,ze(t),l)},function(e,t,n){var r=Object(e);if(!it(e)){var i=ze(t);e=dt(e),t=function(e){return i(r[e],e,r)}}var a=Qe(e,t,n);return a>-1?r[i?e[a]:a]:void 0});function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(et.Cache||De),n}function tt(e,t){return e===t||e!=e&&t!=t}function nt(e){return function(e){return lt(e)&&it(e)}(e)&&oe.call(e,"callee")&&(!de.call(e,"callee")||se.call(e)==l)}et.Cache=De;var rt=Array.isArray;function it(e){return null!=e&&ot(e.length)&&!at(e)}function at(e){var t=st(e)?se.call(e):"";return t==f||t==p}function ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function lt(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||lt(e)&&se.call(e)==E}var ut=W?function(e){return function(t){return e(t)}}(W):function(e){return lt(e)&&ot(e.length)&&!!$[se.call(e)]};function dt(e){return it(e)?function(e,t){var n=rt(e)||nt(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!oe.call(e,a)||i&&("length"==a||Ge(a,r))||n.push(a);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||ne))return fe(e);var t,n,r=[];for(var i in Object(e))oe.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e)}function ht(e){return e}e.exports=Je},3958:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",_="[object Proxy]",w="[object RegExp]",E="[object Set]",x="[object String]",S="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",A=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[l]=k[C]=k[u]=k[T]=k[d]=k[h]=k[f]=k[m]=k[g]=k[y]=k[w]=k[E]=k[x]=k[O]=!1;var L="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,R=L||D||Function("return this")(),N=t&&!t.nodeType&&t,I=N&&e&&!e.nodeType&&e,P=I&&I.exports===N,$=P&&L.process,B=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),z=B&&B.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function j(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function F(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V,H,G,W=Array.prototype,q=Function.prototype,Z=Object.prototype,Y=R["__core-js_shared__"],K=q.toString,X=Z.hasOwnProperty,Q=(V=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",J=Z.toString,ee=RegExp("^"+K.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=P?R.Buffer:void 0,ne=R.Symbol,re=R.Uint8Array,ie=Z.propertyIsEnumerable,ae=W.splice,oe=ne?ne.toStringTag:void 0,se=Object.getOwnPropertySymbols,le=te?te.isBuffer:void 0,ce=(H=Object.keys,G=Object,function(e){return H(G(e))}),ue=Ie(R,"DataView"),de=Ie(R,"Map"),he=Ie(R,"Promise"),fe=Ie(R,"Set"),pe=Ie(R,"WeakMap"),me=Ie(Object,"create"),ge=ze(ue),ve=ze(de),ye=ze(he),be=ze(fe),_e=ze(pe),we=ne?ne.prototype:void 0,Ee=we?we.valueOf:void 0;function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function Te(e){var t=this.__data__=new Se(e);this.size=t.size}function Ae(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Me(e){return null==e?void 0===e?S:v:oe&&oe in Object(e)?function(e){var t=X.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch(e){}var i=J.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}(e):function(e){return J.call(e)}(e)}function ke(e){return qe(e)&&Me(e)==s}function Le(e,t,n,r,o){return e===t||(null==e||null==t||!qe(e)&&!qe(t)?e!=e&&t!=t:function(e,t,n,r,o,c){var f=Fe(e),p=Fe(t),v=f?l:$e(e),b=p?l:$e(t),_=(v=v==s?y:v)==y,S=(b=b==s?y:b)==y,O=v==b;if(O&&Ve(e)){if(!Ve(t))return!1;f=!0,_=!1}if(O&&!_)return c||(c=new Te),f||Ze(e)?De(e,t,n,r,o,c):function(e,t,n,r,o,s,l){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case u:case d:case g:return Ue(+e,+t);case h:return e.name==t.name&&e.message==t.message;case w:case x:return e==t+"";case m:var c=j;case E:var f=r&i;if(c||(c=F),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;r|=a,l.set(e,t);var v=De(c(e),c(t),r,o,s,l);return l.delete(e),v;case"[object Symbol]":if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,v,n,r,o,c);if(!(n&i)){var A=_&&X.call(e,"__wrapped__"),M=S&&X.call(t,"__wrapped__");if(A||M){var k=A?e.value():e,L=M?t.value():t;return c||(c=new Te),o(k,L,n,r,c)}}return!!O&&(c||(c=new Te),function(e,t,n,r,a,o){var s=n&i,l=Re(e),c=l.length;if(c!=Re(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:X.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,o):r(m,g,d,e,t,o);if(!(void 0===v?m===g||a(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,c))}(e,t,n,r,Le,o))}function De(e,t,n,r,o,s){var l=n&i,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&a?new Ce:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!U(t,(function(e,t){if(i=t,!p.has(i)&&(m===e||o(m,e,n,r,s)))return p.push(t);var i}))){f=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Re(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ye,Pe)}function Ne(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||function(e){return!!Q&&Q in e}(e))&&(He(e)?ee:A).test(ze(e))}(n)?n:void 0}xe.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return X.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:X.call(t,e)},xe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Ae(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(de||Se),string:new xe}},Oe.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return Ne(this,e).get(e)},Oe.prototype.has=function(e){return Ne(this,e).has(e)},Oe.prototype.set=function(e,t){var n=Ne(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,r),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Se,this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(r)}return n.set(e,t),this.size=n.size,this};var Pe=se?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,a=0,o=[];++r<i;){var s=t[r];l=s,ie.call(e,l)&&(o[a++]=s)}var l;return o}(se(e)))}:function(){return[]},$e=Me;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(ue&&$e(new ue(new ArrayBuffer(1)))!=T||de&&$e(new de)!=m||he&&$e(he.resolve())!=b||fe&&$e(new fe)!=E||pe&&$e(new pe)!=O)&&($e=function(e){var t=Me(e),n=t==y?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case ge:return T;case ve:return m;case ye:return b;case be:return E;case _e:return O}return t});var je=ke(function(){return arguments}())?ke:function(e){return qe(e)&&X.call(e,"callee")&&!ie.call(e,"callee")},Fe=Array.isArray,Ve=le||function(){return!1};function He(e){if(!We(e))return!1;var t=Me(e);return t==f||t==p||t==c||t==_}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function We(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qe(e){return null!=e&&"object"==typeof e}var Ze=z?function(e){return function(t){return e(t)}}(z):function(e){return qe(e)&&Ge(e.length)&&!!k[Me(e)]};function Ye(e){return null!=(t=e)&&Ge(t.length)&&!He(t)?function(e,t){var n=Fe(e),r=!n&&je(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ze(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!X.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Be(c,l))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Z))return ce(e);var t,n,r=[];for(var i in Object(e))X.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return Le(e,t)}},8979:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")();function f(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,a=-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,g);for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t)>-1}function p(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function m(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function g(e){return e!=e}function v(e,t){return e.has(t)}function y(e,t){return function(n){return e(t(n))}}var b,_=Array.prototype,w=Function.prototype,E=Object.prototype,x=h["__core-js_shared__"],S=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",O=w.toString,C=E.hasOwnProperty,T=E.toString,A=RegExp("^"+O.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=h.Symbol,k=y(Object.getPrototypeOf,Object),L=E.propertyIsEnumerable,D=_.splice,R=M?M.isConcatSpreadable:void 0,N=Object.getOwnPropertySymbols,I=Math.max,P=G(h,"Map"),$=G(Object,"create");function B(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.__data__=new U;++t<n;)this.add(e[t])}function F(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function V(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Z),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?V(s,t-1,n,r,i):m(i,s):r||(i[i.length]=s)}return i}function H(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!te(e)||S&&S in e)return!1;var t=ee(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?A:l;return t.test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}B.prototype.clear=function(){this.__data__=$?$(null):{}},B.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},B.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return C.call(t,e)?t[e]:void 0},B.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:C.call(t,e)},B.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},z.prototype.clear=function(){this.__data__=[]},z.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),0))},z.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},z.prototype.has=function(e){return F(this.__data__,e)>-1},z.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new B,map:new(P||z),string:new B}},U.prototype.delete=function(e){return H(this,e).delete(e)},U.prototype.get=function(e){return H(this,e).get(e)},U.prototype.has=function(e){return H(this,e).has(e)},U.prototype.set=function(e,t){return H(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,r),this},j.prototype.has=function(e){return this.__data__.has(e)};var W=N?y(N,Object):se,q=N?function(e){for(var t=[];e;)m(t,W(e)),e=k(e);return t}:se;function Z(e){return Q(e)||X(e)||!!(R&&e&&e[R])}function Y(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==T.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function X(e){return function(e){return ne(e)&&J(e)}(e)&&C.call(e,"callee")&&(!L.call(e,"callee")||T.call(e)==a)}var Q=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!ee(e)}function ee(e){var t=te(e)?T.call(e):"";return t==o||t==s}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return J(e)?function(e,t){var n=Q(e)||X(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!C.call(e,a)||i&&("length"==a||Y(a,r))||n.push(a);return n}(e,!0):function(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||E)),i=[];for(var a in e)("constructor"!=a||!r&&C.call(e,a))&&i.push(a);return i}(e)}var ie,ae,oe=(ie=function(e,t){return null==e?{}:(t=p(V(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=e[o];n(0,o)&&(a[o]=s)}return a}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i=-1,a=f,o=!0,s=e.length,l=[],c=t.length;if(!s)return l;t.length>=200&&(a=v,o=!1,t=new j(t));e:for(;++i<s;){var u=e[i],d=u;if(u=0!==u?u:0,o&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else a(t,d,r)||l.push(u)}return l}(function(e){return function(e,t,n){var r=t(e);return Q(e)?r:m(r,n(e))}(e,re,q)}(e),t)))},ae=I(void 0===ae?ie.length-1:ae,0),function(){for(var e=arguments,t=-1,n=I(e.length-ae,0),r=Array(n);++t<n;)r[t]=e[ae+t];t=-1;for(var i=Array(ae+1);++t<ae;)i[t]=e[t];return i[ae]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(ie,this,i)});function se(){return[]}e.exports=oe},8262:(e,t,n)=>{"use strict";var r=n(3586);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},3980:(e,t,n)=>{e.exports=n(8262)()},3586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2967:(e,t,n)=>{"use strict";var r=n(7900),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var N=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=N&&e[N]||e["@@iterator"])?e:null}var P,$=Object.assign;function B(e){if(void 0===P)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return"\n"+P+e}var z=!1;function U(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function j(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case E:return"Portal";case O:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case k:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return F(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,xe=null,Se=null;function Oe(e){if(e=bi(e)){if("function"!=typeof Ee)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),Ee(e.stateNode,e.type,t))}}function Ce(e){xe?Se?Se.push(e):Se=[e]:xe=e}function Te(){if(xe){var e=xe,t=Se;if(Se=xe=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Ae(e,t){return e(t)}function Me(){}var ke=!1;function Le(e,t,n){if(ke)return e(t,n);ke=!0;try{return Ae(e,t,n)}finally{ke=!1,(null!==xe||null!==Se)&&(Me(),Te())}}function De(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Re=!1;if(u)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(ue){Re=!1}function Ie(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Pe=!1,$e=null,Be=!1,ze=null,Ue={onError:function(e){Pe=!0,$e=e}};function je(e,t,n,r,i,a,o,s,l){Pe=!1,$e=null,Ie.apply(Ue,arguments)}function Fe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function He(e){if(Fe(e)!==e)throw Error(a(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Fe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return He(i),e;if(o===r)return He(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Ze=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null,ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!=(a&=o)&&(r=dt(a))}else 0!=(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function _t(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var wt,Et,xt,St,Ot,Ct=!1,Tt=[],At=null,Mt=null,kt=null,Lt=new Map,Dt=new Map,Rt=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":kt=null;break;case"pointerover":case"pointerout":Lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function Pt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&Et(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function $t(e){var t=yi(e.target);if(null!==t){var n=Fe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void Ot(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_e=r,n.target.dispatchEvent(r),_e=null,t.shift()}return!0}function zt(e,t,n){Bt(e)&&n.delete(t)}function Ut(){Ct=!1,null!==At&&Bt(At)&&(At=null),null!==Mt&&Bt(Mt)&&(Mt=null),null!==kt&&Bt(kt)&&(kt=null),Lt.forEach(zt),Dt.forEach(zt)}function jt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function Ft(e){function t(t){return jt(t,e)}if(0<Tt.length){jt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&jt(At,e),null!==Mt&&jt(Mt,e),null!==kt&&jt(kt,e),Lt.forEach(t),Dt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)$t(n),null===n.blockedOn&&Rt.shift()}var Vt=_.ReactCurrentBatchConfig,Ht=!0;function Gt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=1,qt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function Wt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=4,qt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function qt(e,t,n,r){if(Ht){var i=Yt(e,t,n,r);if(null===i)Hr(e,t,r,Zt,n),It(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return At=Pt(At,e,t,n,r,i),!0;case"dragenter":return Mt=Pt(Mt,e,t,n,r,i),!0;case"mouseover":return kt=Pt(kt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Lt.set(a,Pt(Lt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Dt.set(a,Pt(Dt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Nt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&wt(a),null===(a=Yt(e,t,n,r))&&Hr(e,t,r,Zt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Zt=null;function Yt(e,t,n,r){if(Zt=null,null!==(e=yi(e=we(r))))if(null===(t=Fe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return $(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=an(cn),dn=$({},cn,{view:0,detail:0}),hn=an(dn),fn=$({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(fn),mn=an($({},fn,{dataTransfer:0})),gn=an($({},dn,{relatedTarget:0})),vn=an($({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=$({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(yn),_n=an($({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function On(){return Sn}var Cn=$({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(Cn),An=an($({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=an($({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),kn=an($({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=$({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=an(Ln),Rn=[9,13,27,32],Nn=u&&"CompositionEvent"in window,In=null;u&&"documentMode"in document&&(In=document.documentMode);var Pn=u&&"TextEvent"in window&&!In,$n=u&&(!Nn||In&&8<In&&11>=In),Bn=String.fromCharCode(32),zn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ce(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,qn=null;function Zn(e){Br(e,0)}function Yn(e){if(q(_i(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(u){var Qn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),qn=Wn=null)}function nr(e){if("value"===e.propertyName&&Yn(qn)){var t=[];Gn(t,qn,e,we(e)),Le(Zn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(qn)}function ar(e,t){if("click"===e)return Yn(t)}function or(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ur(n,a);var o=ur(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==Z(r)||(r="selectionStart"in(r=gr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Wr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},xr={},Sr={};function Or(e){if(xr[e])return xr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Cr=Or("animationend"),Tr=Or("animationiteration"),Ar=Or("animationstart"),Mr=Or("transitionend"),kr=new Map,Lr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){kr.set(e,t),l(t,[e])}for(var Rr=0;Rr<Lr.length;Rr++){var Nr=Lr[Rr];Dr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Dr(Cr,"onAnimationEnd"),Dr(Tr,"onAnimationIteration"),Dr(Ar,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(Mr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function $r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(je.apply(this,arguments),Pe){if(!Pe)throw Error(a(198));var u=$e;Pe=!1,$e=null,Be||(Be=!0,ze=u)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;$r(i,s,c),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,c=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;$r(i,s,c),a=l}}}if(Be)throw e=ze,Be=!1,ze=null,e}function zr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var jr="_reactListening"+Math.random().toString(36).slice(2);function Fr(e){if(!e[jr]){e[jr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Pr.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[jr]||(t[jr]=!0,Ur("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(Kt(t)){case 1:var i=Gt;break;case 4:i=Wt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=yi(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}Le((function(){var r=a,i=we(n),o=[];e:{var s=kr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Mn;break;case Cr:case Tr:case Ar:l=vn;break;case Mr:l=kn;break;case"scroll":l=hn;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=De(p,h))&&u.push(Gr(p,m,f))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),o.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[pi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Fe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=An,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:_i(l),f=null==c?s:_i(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,yi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=qr(f))p++;for(f=0,m=h;m;m=qr(m))f++;for(;0<p-f;)u=qr(u),p--;for(;0<f-p;)h=qr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=qr(u),h=qr(h)}u=null}else u=null;null!==l&&Zr(o,s,l,u,!1),null!==c&&null!==d&&Zr(o,d,c,u,!0)}if("select"===(l=(s=r?_i(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Hn(s))if(Xn)g=or;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?Gn(o,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?_i(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,_r(o,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":_r(o,n,i)}var y;if(Nn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Fn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Fn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Fn&&(y=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Fn=!0)),0<(v=Wr(r,b)).length&&(b=new _n(b,e,null,n,i),o.push({event:b,listeners:v}),(y||null!==(y=jn(n)))&&(b.data=y))),(y=Pn?function(e,t){switch(e){case"compositionend":return jn(t);case"keypress":return 32!==t.which?null:(zn=!0,Bn);case"textInput":return(e=t.data)===Bn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Fn)return"compositionend"===e||!Nn&&Un(e,t)?(e=en(),Jt=Qt=Xt=null,Fn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=y)}Br(o,t)}))}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=De(e,n))&&r.unshift(Gr(e,a,i)),null!=(a=De(e,t))&&r.push(Gr(e,a,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,a))&&o.unshift(Gr(n,l,s)):i||null!=(l=De(n,a))&&o.push(Gr(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Yr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(a(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,oi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ft(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ft(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _i(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[fi]||null}var Ei=[],xi=-1;function Si(e){return{current:e}}function Oi(e){0>xi||(e.current=Ei[xi],Ei[xi]=null,xi--)}function Ci(e,t){xi++,Ei[xi]=e.current,e.current=t}var Ti={},Ai=Si(Ti),Mi=Si(!1),ki=Ti;function Li(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Di(e){return null!=e.childContextTypes}function Ri(){Oi(Mi),Oi(Ai)}function Ni(e,t,n){if(Ai.current!==Ti)throw Error(a(168));Ci(Ai,t),Ci(Mi,n)}function Ii(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,V(e)||"Unknown",i));return $({},n,r)}function Pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,ki=Ai.current,Ci(Ai,e),Ci(Mi,Mi.current),!0}function $i(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ii(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,Oi(Mi),Oi(Ai),Ci(Ai,e)):Oi(Mi),Ci(Mi,n)}var Bi=null,zi=!1,Ui=!1;function ji(e){null===Bi?Bi=[e]:Bi.push(e)}function Fi(){if(!Ui&&null!==Bi){Ui=!0;var e=0,t=bt;try{var n=Bi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,zi=!1}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),qe(Je,Fi),t}finally{bt=t,Ui=!1}}return null}var Vi=[],Hi=0,Gi=null,Wi=0,qi=[],Zi=0,Yi=null,Ki=1,Xi="";function Qi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Gi=e,Wi=t}function Ji(e,t,n){qi[Zi++]=Ki,qi[Zi++]=Xi,qi[Zi++]=Yi,Yi=e;var r=Ki;e=Xi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ki=1<<32-ot(t)+i|n<<i|r,Xi=a+e}else Ki=1<<a|n<<i|r,Xi=e}function ea(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function ta(e){for(;e===Gi;)Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===Yi;)Yi=qi[--Zi],qi[Zi]=null,Xi=qi[--Zi],qi[Zi]=null,Ki=qi[--Zi],qi[Zi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Dc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Dc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function la(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ca(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(la(e))throw Error(a(418));t=ci(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function da(e){if(e!==na)return!1;if(!ia)return ua(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(la(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=ci(t.nextSibling)}if(ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ci(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=ci(e.nextSibling)}function fa(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var ma=_.ReactCurrentBatchConfig;function ga(e,t){if(e&&e.defaultProps){for(var n in t=$({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var va=Si(null),ya=null,ba=null,_a=null;function wa(){_a=ba=ya=null}function Ea(e){var t=va.current;Oi(va),e._currentValue=t}function xa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){ya=e,_a=ba=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(_s=!0),e.firstContext=null)}function Oa(e){var t=e._currentValue;if(_a!==e)if(e={context:e,memoizedValue:t,next:null},null===ba){if(null===ya)throw Error(a(308));ba=e,ya.dependencies={lanes:0,firstContext:e}}else ba=ba.next=e;return t}var Ca=null;function Ta(e){null===Ca?Ca=[e]:Ca.push(e)}function Aa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ma(e,r)}function Ma(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var ka=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Da(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ra(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Ml)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ma(e,n)}return null===(i=r.interleaved)?(t.next=t,Ta(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ma(e,n)}function Ia(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var i=e.updateQueue;ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===o?a=c:o.next=c,o=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(o=0,u=c=l=null,s=a;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=$({},d,h);break e;case 2:ka=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);$l|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var za=(new r.Component).refs;function Ua(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ja={isMounted:function(e){return!!(e=e._reactInternals)&&Fe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Ra(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=Na(e,a,i))&&(rc(t,e,i,r),Ia(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Ra(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Na(e,a,i))&&(rc(t,e,i,r),Ia(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),i=Ra(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Na(e,i,r))&&(rc(t,e,r,n),Ia(t,e,r))}};function Fa(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,a))}function Va(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"==typeof a&&null!==a?a=Oa(a):(i=Di(t)?ki:Ai.current,a=(r=null!=(r=t.contextTypes))?Li(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ja,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ja.enqueueReplaceState(t,t.state,null)}function Ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=za,La(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Oa(a):(a=Di(t)?ki:Ai.current,i.context=Li(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Ua(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ja.enqueueReplaceState(i,i.state,null),$a(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===za&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Za(e){return(0,e._init)(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Bc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===D&&Za(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Ic(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Bc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ic(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case E:return(t=zc(t,e.mode,n)).return=e,t;case D:return h(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Pc(t,e.mode,n,null)).return=e,t;qa(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?c(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null;case D:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||I(n))return null!==i?null:d(e,t,n,r,null);qa(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case D:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||I(r))return d(t,e=e.get(n)||null,r,i,null);qa(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),ia&&Qi(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return ia&&Qi(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),ia&&Qi(i,m),c}function g(i,s,l,c){var u=I(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),ia&&Qi(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,c))&&(s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return ia&&Qi(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Qi(i,g),u}return function e(r,a,o,l){if("object"==typeof o&&null!==o&&o.type===x&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,u=a;null!==u;){if(u.key===c){if((c=o.type)===x){if(7===u.tag){n(r,u.sibling),(a=i(u,o.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&Za(c)===u.type){n(r,u.sibling),(a=i(u,o.props)).ref=Wa(r,u,o),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}o.type===x?((a=Pc(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Ic(o.type,o.key,o.props,null,r.mode,l)).ref=Wa(r,a,o),l.return=r,r=l)}return s(r);case E:e:{for(u=o.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=zc(o,r.mode,l)).return=r,r=a}return s(r);case D:return e(r,a,(u=o._init)(o._payload),l)}if(te(o))return m(r,a,o,l);if(I(o))return g(r,a,o,l);qa(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Bc(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Ka=Ya(!0),Xa=Ya(!1),Qa={},Ja=Si(Qa),eo=Si(Qa),to=Si(Qa);function no(e){if(e===Qa)throw Error(a(174));return e}function ro(e,t){switch(Ci(to,t),Ci(eo,e),Ci(Ja,Qa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Oi(Ja),Ci(Ja,t)}function io(){Oi(Ja),Oi(eo),Oi(to)}function ao(e){no(to.current);var t=no(Ja.current),n=le(t,e.type);t!==n&&(Ci(eo,e),Ci(Ja,n))}function oo(e){eo.current===e&&(Oi(Ja),Oi(eo))}var so=Si(0);function lo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=[];function uo(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var ho=_.ReactCurrentDispatcher,fo=_.ReactCurrentBatchConfig,po=0,mo=null,go=null,vo=null,yo=!1,bo=!1,_o=0,wo=0;function Eo(){throw Error(a(321))}function xo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,o){if(po=o,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ho.current=null===e||null===e.memoizedState?ss:ls,e=n(r,i),bo){o=0;do{if(bo=!1,_o=0,25<=o)throw Error(a(301));o+=1,vo=go=null,t.updateQueue=null,ho.current=cs,e=n(r,i)}while(bo)}if(ho.current=os,t=null!==go&&null!==go.next,po=0,vo=go=mo=null,yo=!1,t)throw Error(a(300));return e}function Oo(){var e=0!==_o;return _o=0,e}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vo?mo.memoizedState=vo=e:vo=vo.next=e,vo}function To(){if(null===go){var e=mo.alternate;e=null!==e?e.memoizedState:null}else e=go.next;var t=null===vo?mo.memoizedState:vo.next;if(null!==t)vo=t,go=e;else{if(null===e)throw Error(a(310));e={memoizedState:(go=e).memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},null===vo?mo.memoizedState=vo=e:vo=vo.next=e}return vo}function Ao(e,t){return"function"==typeof t?t(e):t}function Mo(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=go,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,c=null,u=o;do{var d=u.lane;if((po&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,mo.lanes|=d,$l|=d}u=u.next}while(null!==u&&u!==o);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(_s=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,mo.lanes|=o,$l|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ko(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(_s=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(){}function Do(e,t){var n=mo,r=To(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,_s=!0),r=r.queue,Ho(Io.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==vo&&1&vo.memoizedState.tag){if(n.flags|=2048,zo(9,No.bind(null,n,r,i,t),void 0,null),null===kl)throw Error(a(349));0!=(30&po)||Ro(n,t,i)}return i}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function No(e,t,n,r){t.value=n,t.getSnapshot=r,Po(t)&&$o(e)}function Io(e,t,n){return n((function(){Po(t)&&$o(e)}))}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function $o(e){var t=Ma(e,1);null!==t&&rc(t,e,1,-1)}function Bo(e){var t=Co();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,mo,e),[t.memoizedState,e]}function zo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Uo(){return To().memoizedState}function jo(e,t,n,r){var i=Co();mo.flags|=e,i.memoizedState=zo(1|t,n,void 0,void 0===r?null:r)}function Fo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==go){var o=go.memoizedState;if(a=o.destroy,null!==r&&xo(r,o.deps))return void(i.memoizedState=zo(t,n,a,r))}mo.flags|=e,i.memoizedState=zo(1|t,n,a,r)}function Vo(e,t){return jo(8390656,8,e,t)}function Ho(e,t){return Fo(2048,8,e,t)}function Go(e,t){return Fo(4,2,e,t)}function Wo(e,t){return Fo(4,4,e,t)}function qo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Zo(e,t,n){return n=null!=n?n.concat([e]):null,Fo(4,4,qo.bind(null,t,e),n)}function Yo(){}function Ko(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qo(e,t,n){return 0==(21&po)?(e.baseState&&(e.baseState=!1,_s=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),mo.lanes|=n,$l|=n,e.baseState=!0),t)}function Jo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=fo.transition;fo.transition={};try{e(!1),t()}finally{bt=n,fo.transition=r}}function es(){return To().memoizedState}function ts(e,t,n){var r=nc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e)?is(t,n):null!==(n=Aa(e,t,n,r))&&(rc(n,e,r,tc()),as(n,t,r))}function ns(e,t,n){var r=nc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var l=t.interleaved;return null===l?(i.next=i,Ta(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Aa(e,t,i,r))&&(rc(n,e,r,i=tc()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===mo||null!==t&&t===mo}function is(e,t){bo=yo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var os={readContext:Oa,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useInsertionEffect:Eo,useLayoutEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useMutableSource:Eo,useSyncExternalStore:Eo,useId:Eo,unstable_isNewReconciler:!1},ss={readContext:Oa,useCallback:function(e,t){return Co().memoizedState=[e,void 0===t?null:t],e},useContext:Oa,useEffect:Vo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,jo(4194308,4,qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jo(4194308,4,e,t)},useInsertionEffect:function(e,t){return jo(4,2,e,t)},useMemo:function(e,t){var n=Co();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Co();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Co().memoizedState=e},useState:Bo,useDebugValue:Yo,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=Bo(!1),t=e[0];return e=Jo.bind(null,e[1]),Co().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mo,i=Co();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===kl)throw Error(a(349));0!=(30&po)||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Vo(Io.bind(null,r,o,e),[e]),r.flags|=2048,zo(9,No.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Co(),t=kl.identifierPrefix;if(ia){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-ot(Ki)-1)).toString(32)+n),0<(n=_o++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Oa,useCallback:Ko,useContext:Oa,useEffect:Ho,useImperativeHandle:Zo,useInsertionEffect:Go,useLayoutEffect:Wo,useMemo:Xo,useReducer:Mo,useRef:Uo,useState:function(){return Mo(Ao)},useDebugValue:Yo,useDeferredValue:function(e){return Qo(To(),go.memoizedState,e)},useTransition:function(){return[Mo(Ao)[0],To().memoizedState]},useMutableSource:Lo,useSyncExternalStore:Do,useId:es,unstable_isNewReconciler:!1},cs={readContext:Oa,useCallback:Ko,useContext:Oa,useEffect:Ho,useImperativeHandle:Zo,useInsertionEffect:Go,useLayoutEffect:Wo,useMemo:Xo,useReducer:ko,useRef:Uo,useState:function(){return ko(Ao)},useDebugValue:Yo,useDeferredValue:function(e){var t=To();return null===go?t.memoizedState=e:Qo(t,go.memoizedState,e)},useTransition:function(){return[ko(Ao)[0],To().memoizedState]},useMutableSource:Lo,useSyncExternalStore:Do,useId:es,unstable_isNewReconciler:!1};function us(e,t){try{var n="",r=t;do{n+=j(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Ra(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gl||(Gl=!0,Wl=r),hs(0,t)},n}function ms(e,t,n){(n=Ra(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Cc.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ra(-1,1)).tag=2,Na(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bs=_.ReactCurrentOwner,_s=!1;function ws(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Ka(t,e.child,n,r)}function Es(e,t,n,r,i){n=n.render;var a=t.ref;return Sa(t,i),r=So(e,t,n,r,a,i),n=Oo(),null===e||_s?(ia&&n&&ea(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function xs(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Rc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ic(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ss(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(o,r)&&e.ref===t.ref)return Gs(e,t,i)}return t.flags|=1,(e=Nc(a,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Gs(e,t,i);0!=(131072&e.flags)&&(_s=!0)}}return Ts(e,t,n,r,i)}function Os(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Nl,Rl),Rl|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Nl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ci(Nl,Rl),Rl|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ci(Nl,Rl),Rl|=r;return ws(e,t,i,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,i){var a=Di(n)?ki:Ai.current;return a=Li(t,a),Sa(t,i),n=So(e,t,n,r,a,i),r=Oo(),null===e||_s?(ia&&r&&ea(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function As(e,t,n,r,i){if(Di(n)){var a=!0;Pi(t)}else a=!1;if(Sa(t,i),null===t.stateNode)Hs(e,t),Va(t,n,r),Ga(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?Oa(c):Li(t,c=Di(n)?ki:Ai.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&Ha(t,o,r,c),ka=!1;var h=t.memoizedState;o.state=h,$a(t,r,o,i),l=t.memoizedState,s!==r||h!==l||Mi.current||ka?("function"==typeof u&&(Ua(t,n,u,r),l=t.memoizedState),(s=ka||Fa(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Da(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ga(t.type,s),o.props=c,d=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?Oa(l):Li(t,l=Di(n)?ki:Ai.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&Ha(t,o,r,l),ka=!1,h=t.memoizedState,o.state=h,$a(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||Mi.current||ka?("function"==typeof f&&(Ua(t,n,f,r),p=t.memoizedState),(c=ka||Fa(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ms(e,t,n,r,a,i)}function Ms(e,t,n,r,i,a){Cs(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&$i(t,n,!1),Gs(e,t,a);r=t.stateNode,bs.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,s,a)):ws(e,t,s,a),t.memoizedState=r.state,i&&$i(t,n,!0),t.child}function ks(e){var t=e.stateNode;t.pendingContext?Ni(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ni(0,t.context,!1),ro(e,t.containerInfo)}function Ls(e,t,n,r,i){return fa(),pa(i),t.flags|=256,ws(e,t,n,r),t.child}var Ds,Rs,Ns,Is,Ps={dehydrated:null,treeContext:null,retryLane:0};function $s(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ci(so,1&o),null===e)return ca(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=$c(l,i,0,null),e=Pc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=$s(n),t.memoizedState=Ps,e):zs(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Us(e,t,s,r=ds(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$c({mode:"visible",children:r.children},i,0,null),(o=Pc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&Ka(t,e.child,null,s),t.child.memoizedState=$s(s),t.memoizedState=Ps,o);if(0==(1&t.mode))return Us(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Us(e,t,s,r=ds(o=Error(a(419)),r,void 0))}if(l=0!=(s&e.childLanes),_s||l){if(null!==(r=kl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ma(e,i),rc(r,e,i,-1))}return gc(),Us(e,t,s,r=ds(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(qi[Zi++]=Ki,qi[Zi++]=Xi,qi[Zi++]=Yi,Ki=e.id,Xi=e.overflow,Yi=t),(t=zs(t,r.children)).flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Nc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Nc(r,s):(s=Pc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?$s(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ps,i}return e=(s=e.child).sibling,i=Nc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function zs(e,t){return(t=$c({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Us(e,t,n,r){return null!==r&&pa(r),Ka(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xa(e.return,t,n)}function Fs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Vs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),0!=(2&(r=so.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,n,t);else if(19===e.tag)js(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(so,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===lo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===lo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,a);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),$l|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ws(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zs(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(t),null;case 1:case 17:return Di(t.type)&&Ri(),qs(t),null;case 3:return r=t.stateNode,io(),Oi(Mi),Oi(Ai),uo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==aa&&(sc(aa),aa=null))),Rs(e,t),qs(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return qs(t),null}if(e=no(Ja.current),da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[fi]=o,e=0!=(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<Ir.length;i++)zr(Ir[i],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":K(r,o),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zr("invalid",r);break;case"textarea":ie(r,o),zr("invalid",r)}for(var l in ye(n,o),i=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&zr("scroll",r)}switch(n){case"input":W(r),J(r,o,!0);break;case"textarea":W(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ds(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ir.length;i++)zr(Ir[i],e);i=r;break;case"source":zr("error",e),i=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),i=r;break;case"details":zr("toggle",e),i=r;break;case"input":K(e,r),i=Y(e,r),zr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$({},r,{value:void 0}),zr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),zr("invalid",e)}for(o in ye(n,i),c=i)if(c.hasOwnProperty(o)){var u=c[o];"style"===o?ge(e,u):"dangerouslySetInnerHTML"===o?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===o?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=u&&"onScroll"===o&&zr("scroll",e):null!=u&&b(e,o,u,l))}switch(n){case"input":W(e),J(e,r,!1);break;case"textarea":W(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qs(t),null;case 6:if(e&&null!=t.stateNode)Is(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Ja.current),da(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Qr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return qs(t),null;case 13:if(Oi(so),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!=(1&t.mode)&&0==(128&t.flags))ha(),fa(),t.flags|=98560,o=!1;else if(o=da(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[hi]=t}else fa(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qs(t),o=!1}else null!==aa&&(sc(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&so.current)?0===Il&&(Il=3):gc())),null!==t.updateQueue&&(t.flags|=4),qs(t),null);case 4:return io(),Rs(e,t),null===e&&Fr(t.stateNode.containerInfo),qs(t),null;case 10:return Ea(t.type._context),qs(t),null;case 19:if(Oi(so),null===(o=t.memoizedState))return qs(t),null;if(r=0!=(128&t.flags),null===(l=o.rendering))if(r)Ws(o,!1);else{if(0!==Il||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=lo(e))){for(t.flags|=128,Ws(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>Vl&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=lo(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ws(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ia)return qs(t),null}else 2*Xe()-o.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=so.current,Ci(so,r?1&n|2:1&n),t):(qs(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Rl)&&(qs(t),6&t.subtreeFlags&&(t.flags|=8192)):qs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ys(e,t){switch(ta(t),t.tag){case 1:return Di(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Oi(Mi),Oi(Ai),uo(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Oi(so),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Oi(so),null;case 4:return io(),null;case 10:return Ea(t.type._context),null;case 22:case 23:return hc(),null;default:return null}}Ds=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rs=function(){},Ns=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Ja.current);var a,o=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),o=[];break;case"select":i=$({},i,{value:void 0}),r=$({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&zr("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},Is=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ks=!1,Xs=!1,Qs="function"==typeof WeakSet?WeakSet:Set,Js=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Oc(e,t,n)}else n.current=null}function tl(e,t,n){try{n()}catch(n){Oc(e,t,n)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&tl(t,n,a)}i=i.next}while(i!==r)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,hl=!1;function fl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xs||el(n,t);case 6:var r=dl,i=hl;dl=null,fl(e,t,n),hl=i,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ft(e)):li(dl,n.stateNode));break;case 4:r=dl,i=hl,dl=n.stateNode.containerInfo,hl=!0,fl(e,t,n),dl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Xs&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&tl(n,t,o),i=i.next}while(i!==r)}fl(e,t,n);break;case 1:if(!Xs&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Oc(n,t,e)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,fl(e,t,n),Xs=r):fl(e,t,n);break;default:fl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var r=Mc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,hl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===dl)throw Error(a(160));pl(o,s,i),dl=null,hl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Oc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&r){try{rl(3,e,e.return),il(3,e)}catch(t){Oc(e,e.return,t)}try{rl(5,e,e.return)}catch(t){Oc(e,e.return,t)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Oc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&X(i,o),be(l,s);var u=be(l,o);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,o);break;case"textarea":ae(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[fi]=o}catch(t){Oc(e,e.return,t)}}break;case 6:if(gl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Oc(e,e.return,t)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ft(t.containerInfo)}catch(t){Oc(e,e.return,t)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Fl=Xe())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(u=Xs)||d,gl(t,e),Xs=u):gl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(p=(f=Js).child,f.tag){case 0:case 11:case 14:case 15:rl(4,f,f.return);break;case 1:el(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Oc(r,n,e)}}break;case 5:el(f,f.return);break;case 22:if(null!==f.memoizedState){El(h);continue}}null!==p?(p.return=f,Js=p):El(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(t){Oc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Oc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ul(e,ll(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;cl(e,ll(e),o);break;default:throw Error(a(161))}}catch(t){Oc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,_l(e,t,n)}function _l(e,t,n){for(var r=0!=(1&e.mode);null!==Js;){var i=Js,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Ks;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Xs;s=Ks;var c=Xs;if(Ks=o,(Xs=l)&&!c)for(Js=i;null!==Js;)l=(o=Js).child,22===o.tag&&null!==o.memoizedState?xl(i):null!==l?(l.return=o,Js=l):xl(i);for(;null!==a;)Js=a,_l(a,t,n),a=a.sibling;Js=i,Ks=s,Xs=c}wl(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,Js=a):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xs||il(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ga(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ba(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ba(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ft(h)}}}break;default:throw Error(a(163))}Xs||512&t.flags&&al(t)}catch(e){Oc(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function El(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Oc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Oc(t,i,e)}}var a=t.return;try{al(t)}catch(e){Oc(t,a,e)}break;case 5:var o=t.return;try{al(t)}catch(e){Oc(t,o,e)}}}catch(e){Oc(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Sl,Ol=Math.ceil,Cl=_.ReactCurrentDispatcher,Tl=_.ReactCurrentOwner,Al=_.ReactCurrentBatchConfig,Ml=0,kl=null,Ll=null,Dl=0,Rl=0,Nl=Si(0),Il=0,Pl=null,$l=0,Bl=0,zl=0,Ul=null,jl=null,Fl=0,Vl=1/0,Hl=null,Gl=!1,Wl=null,ql=null,Zl=!1,Yl=null,Kl=0,Xl=0,Ql=null,Jl=-1,ec=0;function tc(){return 0!=(6&Ml)?Xe():-1!==Jl?Jl:Jl=Xe()}function nc(e){return 0==(1&e.mode)?1:0!=(2&Ml)&&0!==Dl?Dl&-Dl:null!==ma.transition?(0===ec&&(ec=mt()),ec):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function rc(e,t,n,r){if(50<Xl)throw Xl=0,Ql=null,Error(a(185));vt(e,n,r),0!=(2&Ml)&&e===kl||(e===kl&&(0==(2&Ml)&&(Bl|=n),4===Il&&lc(e,Dl)),ic(e,r),1===n&&0===Ml&&0==(1&t.mode)&&(Vl=Xe()+500,zi&&Fi()))}function ic(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=i[o];-1===l?0!=(s&n)&&0==(s&r)||(i[o]=ft(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===kl?Dl:0);if(0===r)null!==n&&Ze(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ze(n),1===t)0===e.tag?function(e){zi=!0,ji(e)}(cc.bind(null,e)):ji(cc.bind(null,e)),oi((function(){0==(6&Ml)&&Fi()})),n=null;else{switch(_t(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=kc(n,ac.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ac(e,t){if(Jl=-1,ec=0,0!=(6&Ml))throw Error(a(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=ht(e,e===kl?Dl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=vc(e,r);else{t=r;var i=Ml;Ml|=2;var o=mc();for(kl===e&&Dl===t||(Hl=null,Vl=Xe()+500,fc(e,t));;)try{bc();break}catch(t){pc(e,t)}wa(),Cl.current=o,Ml=i,null!==Ll?t=0:(kl=null,Dl=0,t=Il)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=oc(e,i)),1===t)throw n=Pl,fc(e,0),lc(e,r),ic(e,Xe()),n;if(6===t)lc(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!sr(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=vc(e,r))&&0!==(o=pt(e))&&(r=o,t=oc(e,o)),1===t))throw n=Pl,fc(e,0),lc(e,r),ic(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Ec(e,jl,Hl);break;case 3:if(lc(e,r),(130023424&r)===r&&10<(t=Fl+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Ec.bind(null,e,jl,Hl),t);break}Ec(e,jl,Hl);break;case 4:if(lc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ol(r/1960))-r)){e.timeoutHandle=ri(Ec.bind(null,e,jl,Hl),r);break}Ec(e,jl,Hl);break;default:throw Error(a(329))}}}return ic(e,Xe()),e.callbackNode===n?ac.bind(null,e):null}function oc(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(fc(e,t).flags|=256),2!==(e=vc(e,t))&&(t=jl,jl=n,null!==t&&sc(t)),e}function sc(e){null===jl?jl=e:jl.push.apply(jl,e)}function lc(e,t){for(t&=~zl,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function cc(e){if(0!=(6&Ml))throw Error(a(327));xc();var t=ht(e,0);if(0==(1&t))return ic(e,Xe()),null;var n=vc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Pl,fc(e,0),lc(e,t),ic(e,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ec(e,jl,Hl),ic(e,Xe()),null}function uc(e,t){var n=Ml;Ml|=1;try{return e(t)}finally{0===(Ml=n)&&(Vl=Xe()+500,zi&&Fi())}}function dc(e){null!==Yl&&0===Yl.tag&&0==(6&Ml)&&xc();var t=Ml;Ml|=1;var n=Al.transition,r=bt;try{if(Al.transition=null,bt=1,e)return e()}finally{bt=r,Al.transition=n,0==(6&(Ml=t))&&Fi()}}function hc(){Rl=Nl.current,Oi(Nl)}function fc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ll)for(n=Ll.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:io(),Oi(Mi),Oi(Ai),uo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Oi(so);break;case 10:Ea(r.type._context);break;case 22:case 23:hc()}n=n.return}if(kl=e,Ll=e=Nc(e.current,null),Dl=Rl=t,Il=0,Pl=null,zl=Bl=$l=0,jl=Ul=null,null!==Ca){for(t=0;t<Ca.length;t++)if(null!==(r=(n=Ca[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Ca=null}return e}function pc(e,t){for(;;){var n=Ll;try{if(wa(),ho.current=os,yo){for(var r=mo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}yo=!1}if(po=0,vo=go=mo=null,bo=!1,_o=0,Tl.current=null,null===n||null===n.return){Il=1,Pl=t,Ll=null;break}e:{var o=e,s=n.return,l=n,c=t;if(t=Dl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vs(s);if(null!==p){p.flags&=-257,ys(p,s,l,0,t),1&p.mode&&gs(o,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){gs(o,u,t),gc();break e}c=Error(a(426))}else if(ia&&1&l.mode){var v=vs(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ys(v,s,l,0,t),pa(us(c,l));break e}}o=c=us(c,l),4!==Il&&(Il=2),null===Ul?Ul=[o]:Ul.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Pa(o,ps(0,c,t));break e;case 1:l=c;var y=o.type,b=o.stateNode;if(0==(128&o.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===ql||!ql.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Pa(o,ms(o,l,t));break e}}o=o.return}while(null!==o)}wc(n)}catch(e){t=e,Ll===n&&null!==n&&(Ll=n=n.return);continue}break}}function mc(){var e=Cl.current;return Cl.current=os,null===e?os:e}function gc(){0!==Il&&3!==Il&&2!==Il||(Il=4),null===kl||0==(268435455&$l)&&0==(268435455&Bl)||lc(kl,Dl)}function vc(e,t){var n=Ml;Ml|=2;var r=mc();for(kl===e&&Dl===t||(Hl=null,fc(e,t));;)try{yc();break}catch(t){pc(e,t)}if(wa(),Ml=n,Cl.current=r,null!==Ll)throw Error(a(261));return kl=null,Dl=0,Il}function yc(){for(;null!==Ll;)_c(Ll)}function bc(){for(;null!==Ll&&!Ye();)_c(Ll)}function _c(e){var t=Sl(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?wc(e):Ll=t,Tl.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Zs(n,t,Rl)))return void(Ll=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Ll=n);if(null===e)return Il=6,void(Ll=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ll=t);Ll=t=e}while(null!==t);0===Il&&(Il=5)}function Ec(e,t,n){var r=bt,i=Al.transition;try{Al.transition=null,bt=1,function(e,t,n,r){do{xc()}while(null!==Yl);if(0!=(6&Ml))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===kl&&(Ll=kl=null,Dl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Zl||(Zl=!0,kc(tt,(function(){return xc(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Al.transition,Al.transition=null;var s=bt;bt=1;var l=Ml;Ml|=4,Tl.current=null,function(e,t){if(ei=Ht,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ga(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(a(163))}}catch(e){Oc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=nl,nl=!1}(e,n),vl(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,bl(n,e,i),Ke(),Ml=l,bt=s,Al.transition=o}else e.current=n;if(Zl&&(Zl=!1,Yl=e,Kl=i),0===(o=e.pendingLanes)&&(ql=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),ic(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Gl)throw Gl=!1,e=Wl,Wl=null,e;0!=(1&Kl)&&0!==e.tag&&xc(),0!=(1&(o=e.pendingLanes))?e===Ql?Xl++:(Xl=0,Ql=e):Xl=0,Fi()}(e,t,n,r)}finally{Al.transition=i,bt=r}return null}function xc(){if(null!==Yl){var e=_t(Kl),t=Al.transition,n=bt;try{if(Al.transition=null,bt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Kl=0,0!=(6&Ml))throw Error(a(331));var i=Ml;for(Ml|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(0!=(16&Js.flags)){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:rl(8,d,o)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var f=(d=Js).sibling,p=d.return;if(ol(d),d===u){Js=null;break}if(null!==f){f.return=p,Js=f;break}Js=p}}}var m=o.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Js=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,Js=s;else e:for(;null!==Js;){if(0!=(2048&(o=Js).flags))switch(o.tag){case 0:case 11:case 15:rl(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Js=y;break e}Js=o.return}}var b=e.current;for(Js=b;null!==Js;){var _=(s=Js).child;if(0!=(2064&s.subtreeFlags)&&null!==_)_.return=s,Js=_;else e:for(s=b;null!==Js;){if(0!=(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Oc(l,l.return,e)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Ml=i,Fi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Al.transition=t}}return!1}function Sc(e,t,n){e=Na(e,t=ps(0,t=us(n,t),1),1),t=tc(),null!==e&&(vt(e,1,t),ic(e,t))}function Oc(e,t,n){if(3===e.tag)Sc(e,e,n);else for(;null!==t;){if(3===t.tag){Sc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r))){t=Na(t,e=ms(t,e=us(n,e),1),1),e=tc(),null!==t&&(vt(t,1,e),ic(t,e));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,kl===e&&(Dl&n)===n&&(4===Il||3===Il&&(130023424&Dl)===Dl&&500>Xe()-Fl?fc(e,0):zl|=n),ic(e,t)}function Tc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=tc();null!==(e=Ma(e,t))&&(vt(e,t,n),ic(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tc(e,n)}function Mc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Tc(e,n)}function kc(e,t){return qe(e,t)}function Lc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dc(e,t,n,r){return new Lc(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Dc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ic(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Rc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Pc(n.children,i,o,t);case S:s=8,i|=8;break;case O:return(e=Dc(12,n,t,2|i)).elementType=O,e.lanes=o,e;case M:return(e=Dc(13,n,t,i)).elementType=M,e.lanes=o,e;case k:return(e=Dc(19,n,t,i)).elementType=k,e.lanes=o,e;case R:return $c(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case T:s=9;break e;case A:s=11;break e;case L:s=14;break e;case D:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Dc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Pc(e,t,n,r){return(e=Dc(7,e,r,t)).lanes=n,e}function $c(e,t,n,r){return(e=Dc(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Bc(e,t,n){return(e=Dc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=Dc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jc(e,t,n,r,i,a,o,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Dc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},La(a),e}function Fc(e){if(!e)return Ti;e:{if(Fe(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Di(n))return Ii(e,n,t)}return t}function Vc(e,t,n,r,i,a,o,s,l){return(e=jc(n,r,!0,e,0,a,0,s,l)).context=Fc(null),n=e.current,(a=Ra(r=tc(),i=nc(n))).callback=null!=t?t:null,Na(n,a,i),e.current.lanes=i,vt(e,i,r),ic(e,r),e}function Hc(e,t,n,r){var i=t.current,a=tc(),o=nc(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ra(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Na(i,t,o))&&(rc(e,i,o,a),Ia(e,i,o)),o}function Gc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qc(e,t){Wc(e,t),(e=e.alternate)&&Wc(e,t)}Sl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Mi.current)_s=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return _s=!1,function(e,t,n){switch(t.tag){case 3:ks(t),fa();break;case 5:ao(t);break;case 1:Di(t.type)&&Pi(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(va,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(so,1&so.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Bs(e,t,n):(Ci(so,1&so.current),null!==(e=Gs(e,t,n))?e.sibling:null);Ci(so,1&so.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Vs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(so,so.current),r)break;return null;case 22:case 23:return t.lanes=0,Os(e,t,n)}return Gs(e,t,n)}(e,t,n);_s=0!=(131072&e.flags)}else _s=!1,ia&&0!=(1048576&t.flags)&&Ji(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Li(t,Ai.current);Sa(t,n),i=So(null,t,r,e,i,n);var o=Oo();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(r)?(o=!0,Pi(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,La(t),i.updater=ja,t.stateNode=i,i._reactInternals=t,Ga(t,r,e,n),t=Ms(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Rc(e)?1:0;if(null!=e){if((e=e.$$typeof)===A)return 11;if(e===L)return 14}return 2}(r),e=ga(r,e),i){case 0:t=Ts(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=Es(null,t,r,e,n);break e;case 14:t=xs(null,t,r,ga(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 1:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 3:e:{if(ks(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Da(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ls(e,t,r,n,i=us(Error(a(423)),t));break e}if(r!==i){t=Ls(e,t,r,n,i=us(Error(a(424)),t));break e}for(ra=ci(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fa(),r===i){t=Gs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&ca(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Cs(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Bs(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ka(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Es(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ci(va,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Mi.current){t=Gs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Ra(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),xa(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),xa(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sa(t,n),r=r(i=Oa(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ga(r=t.type,t.pendingProps),xs(e,t,r,i=ga(r.type,i),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ga(r,i),Hs(e,t),t.tag=1,Di(r)?(e=!0,Pi(t)):e=!1,Sa(t,n),Va(t,r,i),Ga(t,r,i,n),Ms(null,t,r,!0,e,n);case 19:return Vs(e,t,n);case 22:return Os(e,t,n)}throw Error(a(156,t.tag))};var Zc="function"==typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function eu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=Gc(o);s.call(e)}}Hc(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=Gc(o);a.call(e)}}var o=Vc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=o,e[pi]=o.current,Fr(8===e.nodeType?e.parentNode:e),dc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Gc(l);s.call(e)}}var l=jc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[pi]=l.current,Fr(8===e.nodeType?e.parentNode:e),dc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return Gc(o)}Kc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hc(e,t,null,null)},Kc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc((function(){Hc(null,e,null,null)})),t[pi]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&$t(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ic(t,Xe()),0==(6&Ml)&&(Vl=Xe()+500,Fi()))}break;case 13:dc((function(){var t=Ma(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}})),qc(e,1)}},Et=function(e){if(13===e.tag){var t=Ma(e,134217728);null!==t&&rc(t,e,134217728,tc()),qc(e,134217728)}},xt=function(e){if(13===e.tag){var t=nc(e),n=Ma(e,t);null!==n&&rc(n,e,t,tc()),qc(e,t)}},St=function(){return bt},Ot=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ee=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));q(r),Q(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=uc,Me=dc;var tu={usingClientEntryPoint:!1,Events:[bi,_i,wi,Ce,Te,uc]},nu={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(ru),at=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xc(e))throw Error(a(299));var n=!1,r="",i=Zc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Fr(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Zc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Vc(t,null,e,1,null!=n?n:null,i,0,o,s),e[pi]=t.current,Fr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Kc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(a(40));return!!e._reactRootContainer&&(dc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=uc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},8316:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},6475:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,R(E);else{var t=r(u);null!==t&&N(w,t.startTime-e)}}function E(e,n){m=!1,g&&(g=!1,y(C),C=-1),p=!0;var a=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!M());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&N(w,d.startTime-n),l=!1}return l}finally{h=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,O=null,C=-1,T=5,A=-1;function M(){return!(t.unstable_now()-A<T)}function k(){if(null!==O){var e=t.unstable_now();A=e;var n=!0;try{n=O(!0,e)}finally{n?x():(S=!1,O=null)}}else S=!1}if("function"==typeof b)x=function(){b(k)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,D=L.port2;L.port1.onmessage=k,x=function(){D.postMessage(null)}}else x=function(){v(k,0)};function R(e){O=e,S||(S=!0,x())}function N(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,R(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(C),C=-1):g=!0,N(w,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,R(E))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},7210:(e,t,n)=>{"use strict";var r=n(2870),i=(r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.Array,r.Type.ConceptUuid,r.Type.String,r.Type.String,r.Type.Number,r.validators.inRange(0,10),r.Type.Number,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.Boolean,n(7900)),a=n.n(i),o=n(4924),s=n(9449),l=n(5508),c=n(2074),u=n(4556),d=n(3255);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=(0,r.useConfig)(),o=a.encounterTypes,s=a.data,l=o.length?"&encounter.type=".concat(o.toString()):"",c="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(e,"&code=").concat(s.map((function(e){return e.concept})).join(","),"&_summary=data&_sort=-date&_count=").concat(100).concat(l);i&&(c+="&_include=Observation:encounter");var u,f=(0,d.ZP)(c,r.openmrsFetch),p=f.data,m=f.error,g=f.isLoading,v=f.isValidating,y=i?null==(u=null==p||null===(t=p.data)||void 0===t?void 0:t.entry)?void 0:u.filter((function(e){var t;return"Encounter"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})).map((function(e){var t,n,r,i;return{reference:"Encounter/".concat(e.resource.id),display:(null===(i=e.resource.type)||void 0===i||null===(r=i[0])||void 0===r||null===(n=r.coding)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.display)||"--"}})):[],b=function(e,t){var n;return(null==e||null===(n=e.filter((function(e){var t;return"Observation"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})))||void 0===n?void 0:n.map((function(e){var n,r,i,a,o=e.resource,s=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}({},o),a=null!=(a={conceptUuid:null===(n=o.code.coding.find((function(e){return 36===e.code.length})))||void 0===n?void 0:n.code})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(a)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))})),i);return o.hasOwnProperty("valueDateTime")&&(s.dataType="DateTime"),e.resource.hasOwnProperty("valueString")&&(s.dataType="Text"),e.resource.hasOwnProperty("valueQuantity")&&(s.dataType="Number"),e.resource.hasOwnProperty("valueCodeableConcept")&&(s.dataType="Coded"),s.encounter.name=null===(r=t.find((function(e){return e.reference===o.encounter.reference})))||void 0===r?void 0:r.display,s})))||[]}(null==p||null===(n=p.data)||void 0===n?void 0:n.entry,y);return{data:b,error:m,isLoading:g,isValidating:v}}var p=n(2779),m=n.n(p),g=n(419),v=n(321),y=n.n(v),b=n(1195),_=n.n(b),w=n(3275),E=n.n(w),x=n(7162),S=n.n(x),O=n(2094),C=n.n(O),T=n(757),A=n.n(T),M=n(4512),k={};k.styleTagTransform=A(),k.setAttributes=S(),k.insert=E().bind(null,"head"),k.domAPI=_(),k.insertStyleElement=C(),y()(M.Z,k);const L=M.Z&&M.Z.locals?M.Z.locals:void 0;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R;!function(e){e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio"}(R||(R={}));const N=function(e){var t,n,l,c,u=e.patientUuid,d=(0,o.useTranslation)().t,h=(0,r.useConfig)(),p=f(u).data,v=(l=a().useState({label:null===(t=h.data[0])||void 0===t?void 0:t.label,uuid:null===(n=h.data[0])||void 0===n?void 0:n.concept}),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(l,c)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=v[0],b=v[1],_=(0,i.useMemo)((function(){var e=p.filter((function(e){return e.conceptUuid===y.uuid&&"Number"===e.dataType})).map((function(e){return{group:y.label,key:(0,r.formatDate)(new Date(e.effectiveDateTime),{year:!0,time:!1}),value:e.valueQuantity.value}}));return h.graphOldestFirst&&e.reverse(),e}),[p,h.graphOldestFirst,y.uuid,y.label]),w=Object.fromEntries(h.data.map((function(e){return[e.label,e.color]}))),E={axes:{bottom:{title:"Date",mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:y.label,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:w},height:"400px"};return a().createElement(a().Fragment,null,a().createElement("div",{className:L.graphContainer},a().createElement("div",{className:L.conceptPickerTabs},a().createElement("label",{className:L.conceptLabel,htmlFor:"concept-tab-group"},d("displaying","Displaying")),a().createElement(s.mQc,{id:"concept-tab-group",className:L.verticalTabs,type:"default"},a().createElement(s.tdY,{className:L.tablist,"aria-label":"Obs tabs"},h.data.map((function(e,t){var n,r,i,o=e.concept,l=e.label,c=m()(L.tab,L.bodyLong01,(n={},r=L.selectedTab,i=y.label===l,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));return a().createElement(s.OK9,{key:o,className:c,onClick:function(){return b({label:l,uuid:o})}},l)}))))),a().createElement("div",{className:L.lineChartContainer},a().createElement(g.LineChart,{data:_.flat(),options:E}))),h.interpretationSlot?a().createElement("div",null,a().createElement(r.ExtensionSlot,{name:h.interpretationSlot,style:{gridTemplateColumns:"1fr"}})):null)};var I=n(5136),P={};P.styleTagTransform=A(),P.setAttributes=S(),P.insert=E().bind(null,"head"),P.domAPI=_(),P.insertStyleElement=C(),y()(I.Z,P);const $=I.Z&&I.Z.locals?I.Z.locals:void 0;function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){z(e,t,n[t])}))}return e}function j(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const F=function(e){var t=e.patientUuid,n=(0,o.useTranslation)().t,i=(0,r.useConfig)(),l=f(t,i.showEncounterType),c=l.data,d=(l.error,l.isLoading,l.isValidating,j(new Set(c.map((function(e){return e.issued})))).sort().map((function(e){return c.filter((function(t){return t.issued===e}))}))),h=[{key:"date",header:n("dateAndTime","Date and time"),isSortable:!0}].concat(j(i.data.map((function(e){return{key:e.concept,header:e.label}}))));i.showEncounterType&&h.splice(1,0,{key:"encounter",header:n("encounterType","Encounter type"),isSortable:!0});var p=a().useMemo((function(){return null==d?void 0:d.map((function(e,t){var n={id:"".concat(t),date:(0,r.formatDatetime)(new Date(e[0].effectiveDateTime),{mode:"wide"}),encounter:e[0].encounter.name},a=!0,o=!1,s=void 0;try{for(var l,c=function(){var e=l.value;switch(e.dataType){case"Text":n[e.conceptUuid]=e.valueString;break;case"Number":var t,a,o,s,c,u=null===(t=i.data.find((function(t){return t.concept===e.conceptUuid})))||void 0===t?void 0:t.decimalPlaces;(null===(a=e.valueQuantity)||void 0===a?void 0:a.value)%1!=0?n[e.conceptUuid]=u>0?null===(o=e.valueQuantity)||void 0===o?void 0:o.value.toFixed(u):null===(s=e.valueQuantity)||void 0===s?void 0:s.value.toFixed(2):n[e.conceptUuid]=null===(c=e.valueQuantity)||void 0===c?void 0:c.value;break;case"Coded":var d,h;n[e.conceptUuid]=null===(h=e.valueCodeableConcept)||void 0===h||null===(d=h.coding[0])||void 0===d?void 0:d.display;break;case"DateTime":"dateTime"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"}):"time"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatTime)(new Date(e.valueDateTime)):"date"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDate)(new Date(e.valueDateTime),{mode:"standard"}):n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"})}},u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0)c()}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return n}))}),[i,d]),m=(0,r.usePagination)(p,i.table.pageSize),g=m.results,v=m.goTo,y=m.currentPage;return a().createElement("div",null,a().createElement(s.wQF,{rows:g,headers:h,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var t,n,r=e.rows,i=e.headers,o=e.getHeaderProps,l=e.getTableProps;return a().createElement(s.xJi,null,a().createElement(s.iA_,(t=U({},l()),n=null!=(n={className:$.customRow})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t),a().createElement(s.ssF,null,a().createElement(s.SCH,null,i.map((function(e){var t,n;return a().createElement(s.xDH,U({className:$.tableHeader},o({header:e,isSortable:e.isSortable})),null!==(n=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==n?n:e.header)})))),a().createElement(s.RMI,null,r.map((function(e){return a().createElement(s.SCH,{key:e.id},e.cells.map((function(e){var t,n,r;return a().createElement(s.pj1,{key:e.id},null!==(r=null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)&&void 0!==r?r:"--")})))})))))})),a().createElement(u.PatientChartPagination,{pageNumber:y,totalItems:p.length,currentItems:g.length,pageSize:i.table.pageSize,onPageNumberChange:function(e){var t=e.page;return v(t)}}))};var V=n(1897),H={};H.styleTagTransform=A(),H.setAttributes=S(),H.insert=E().bind(null,"head"),H.domAPI=_(),H.insertStyleElement=C(),y()(V.Z,H);const G=V.Z&&V.Z.locals?V.Z.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}n(3979);var Y={featureName:"Generic widgets",moduleName:"@openmrs/esm-generic-patient-widgets-app"};(0,r.getSyncLifecycle)((function(e){var t,n,i=e.patientUuid,d=(0,o.useTranslation)().t,h=(0,r.useConfig)(),p=(t=a().useState(h.showGraphByDefault),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],g=p[1],v=f(i),y=v.data,b=v.error,_=v.isLoading,w=v.isValidating,E=y.find((function(e){return"Number"===e.dataType}));return a().createElement(a().Fragment,null,_?a().createElement(s.gqd,{role:"progressbar"}):b?a().createElement(u.ErrorState,{error:b,headerTitle:h.title}):(null==y?void 0:y.length)?a().createElement("div",{className:G.widgetContainer},a().createElement(u.CardHeader,{title:h.title},a().createElement("div",{className:G.backgroundDataFetchingIndicator},a().createElement("span",null,w?a().createElement(s.lSo,null):null)),E?a().createElement("div",{className:G.headerActionItems},a().createElement("div",{className:G.toggleButtons},a().createElement(s.zxk,{className:G.toggle,size:"md",kind:m?"ghost":"tertiary",hasIconOnly:!0,renderIcon:function(e){return a().createElement(l.iA,Z({size:16},e))},iconDescription:d("tableView","Table View"),onClick:function(){return g(!1)}}),a().createElement(s.zxk,{className:G.toggle,size:"md",kind:m?"tertiary":"ghost",hasIconOnly:!0,renderIcon:function(e){return a().createElement(c.eA,Z({size:16},e))},iconDescription:d("chartView","Chart View"),onClick:function(){return g(!0)}}))):null),m&&E?a().createElement(N,{patientUuid:i}):a().createElement(F,{patientUuid:i})):a().createElement(u.EmptyState,{displayText:h.resultsName,headerTitle:h.title}))}),Y)},452:(e,t,n)=>{"use strict";var r=n(7900),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),o((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},3100:(e,t,n)=>{"use strict";e.exports=n(452)},3883:function(e,t,n){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||this},3979:(e,t,n)=>{var r={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},3255:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(7900),i=n(3100),a=n(3325);const o=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),s={dedupe:!0},l=(a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),(0,a.withArgs)(((e,t,n)=>{const{cache:l,compare:c,suspense:u,fallbackData:d,revalidateOnMount:h,revalidateIfStale:f,refreshInterval:p,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=n,[y,b,_,w]=a.SWRGlobalState.get(l),[E,x]=(0,a.serialize)(e),S=(0,r.useRef)(!1),O=(0,r.useRef)(!1),C=(0,r.useRef)(E),T=(0,r.useRef)(t),A=(0,r.useRef)(n),M=()=>A.current,k=()=>M().isVisible()&&M().isOnline(),[L,D,R,N]=(0,a.createCacheHelper)(l,E),I=(0,r.useRef)({}).current,P=(0,a.isUndefined)(d)?n.fallback[E]:d,$=(e,t)=>{for(const n in I){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!c(W,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},B=(0,r.useMemo)((()=>{const e=!!E&&!!t&&((0,a.isUndefined)(h)?!M().isPaused()&&!u&&(!!(0,a.isUndefined)(f)||f):h),n=t=>{const n=(0,a.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=L(),i=N(),o=n(r),s=r===i?o:n(i);let l=o;return[()=>{const e=n(L());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]}),[l,E]),z=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>R(E,((t,n)=>{$(n,t)||e()}))),[l,E]),B[0],B[1]),U=!S.current,j=y[E]&&y[E].length>0,F=z.data,V=(0,a.isUndefined)(F)?P:F,H=z.error,G=(0,r.useRef)(V),W=v?(0,a.isUndefined)(F)?G.current:F:V,q=!(j&&!(0,a.isUndefined)(H))&&(U&&!(0,a.isUndefined)(h)?h:!M().isPaused()&&(u?!(0,a.isUndefined)(V)&&f:(0,a.isUndefined)(V)||f)),Z=!!(E&&t&&U&&q),Y=(0,a.isUndefined)(z.isValidating)?Z:z.isValidating,K=(0,a.isUndefined)(z.isLoading)?Z:z.isLoading,X=(0,r.useCallback)((async e=>{const t=T.current;if(!E||!t||O.current||M().isPaused())return!1;let r,i,o=!0;const s=e||{},l=!_[E]||!s.dedupe,u=()=>a.IS_REACT_LEGACY?!O.current&&E===C.current&&S.current:E===C.current,d={isValidating:!1,isLoading:!1},h=()=>{D(d)},f=()=>{const e=_[E];e&&e[1]===i&&delete _[E]},p={isValidating:!0};(0,a.isUndefined)(L().data)&&(p.isLoading=!0);try{if(l&&(D(p),n.loadingTimeout&&(0,a.isUndefined)(L().data)&&setTimeout((()=>{o&&u()&&M().onLoadingSlow(E,n)}),n.loadingTimeout),_[E]=[t(x),(0,a.getTimestamp)()]),[r,i]=_[E],r=await r,l&&setTimeout(f,n.dedupingInterval),!_[E]||_[E][1]!==i)return l&&u()&&M().onDiscarded(E),!1;d.error=a.UNDEFINED;const e=b[E];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return h(),l&&u()&&M().onDiscarded(E),!1;const s=L().data;d.data=c(s,r)?s:r,l&&u()&&M().onSuccess(r,E,n)}catch(e){f();const t=M(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,l&&u()&&(t.onError(e,E,t),(!0===n||(0,a.isFunction)(n)&&n(e))&&k()&&t.onErrorRetry(e,E,t,(e=>{const t=y[E];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,h(),!0}),[E,l]),Q=(0,r.useCallback)(((...e)=>(0,a.internalMutate)(l,C.current,...e)),[]);if((0,a.useIsomorphicLayoutEffect)((()=>{T.current=t,A.current=n,(0,a.isUndefined)(F)||(G.current=F)})),(0,a.useIsomorphicLayoutEffect)((()=>{if(!E)return;const e=X.bind(a.UNDEFINED,s);let t=0;const n=(0,a.subscribeCallback)(E,y,((n,r={})=>{if(n==a.revalidateEvents.FOCUS_EVENT){const n=Date.now();M().revalidateOnFocus&&n>t&&k()&&(t=n+M().focusThrottleInterval,e())}else if(n==a.revalidateEvents.RECONNECT_EVENT)M().revalidateOnReconnect&&k()&&e();else{if(n==a.revalidateEvents.MUTATE_EVENT)return X();if(n==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}}));return O.current=!1,C.current=E,S.current=!0,D({_k:x}),q&&((0,a.isUndefined)(V)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{O.current=!0,n()}}),[E]),(0,a.useIsomorphicLayoutEffect)((()=>{let e;function t(){const t=(0,a.isFunction)(p)?p(L().data):p;t&&-1!==e&&(e=setTimeout(n,t))}function n(){L().error||!m&&!M().isVisible()||!g&&!M().isOnline()?t():X(s).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[p,m,g,E]),(0,r.useDebugValue)(W),u&&(0,a.isUndefined)(V)&&E){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");T.current=t,A.current=n,O.current=!1;const e=w[E];if(!(0,a.isUndefined)(e)){const t=Q(e);o(t)}if(!(0,a.isUndefined)(H))throw H;{const e=X(s);(0,a.isUndefined)(W)||(e.status="fulfilled",e.value=!0),o(e)}}return{mutate:Q,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}})))}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-generic-patient-widgets-app:",i.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var s,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+a),s.src=n),e[n]=[r];var h=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var a=t[n];if(a||(a=t[n]={}),!(r.indexOf(a)>=0)){if(r.push(a),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var o=i.S[n],s="@openmrs/esm-generic-patient-widgets-app",l=(e,t,n,r)=>{var i=o[e]=o[e]||{},a=i[t];(!a||!a.loaded&&(!r!=!a.eager?r:s>a.from))&&(i[t]={get:n,from:s,eager:!!r})},c=[];return"default"===n&&(l("@openmrs/esm-framework","5.2.1-pre.1156",(()=>Promise.all([i.e(130),i.e(900)]).then((()=>()=>i(130))))),l("@openmrs/esm-patient-common-lib","5.1.1-pre.3021",(()=>Promise.all([i.e(255),i.e(750),i.e(779),i.e(900),i.e(325),i.e(545),i.e(496)]).then((()=>()=>i(9545))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(553),i.e(900)]).then((()=>()=>i(9553))))),l("react-router-dom","6.16.0",(()=>Promise.all([i.e(591),i.e(900)]).then((()=>()=>i(6591))))),l("react","18.2.0",(()=>i.e(784).then((()=>()=>i(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([i.e(729),i.e(900)]).then((()=>()=>i(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([i.e(255),i.e(900),i.e(325),i.e(303)]).then((()=>()=>i(2303)))))),e[n]=c.length?Promise.all(c).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,a=1;a<e.length;a++)i--,r+="u"==(typeof(s=e[a]))[0]?"-":(i>0?".":"")+(i=2,s);return r}var o=[];for(a=1;a<e.length;a++){var s=e[a];o.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?o.pop()+" "+o.pop():t(s))}return l();function l(){return o.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],a=i<0;a&&(i=-i-1);for(var o=0,s=1,l=!0;;s++,o++){var c,u,d=s<t.length?(typeof t[s])[0]:"";if(o>=r.length||"o"==(u=(typeof(c=r[o]))[0]))return!l||("u"==d?s>i&&!a:""==d!=a);if("u"==u){if(!l||"u"!=d)return!1}else if(l)if(d==u)if(s<=i){if(c!=t[s])return!1}else{if(a?c>t[s]:c<t[s])return!1;c!=t[s]&&(l=!1)}else if("s"!=d&&"n"!=d){if(a||s<=i)return!1;l=!1,s--}else{if(s<=i||u<d!=a)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,s--)}}var h=[],f=h.pop.bind(h);for(o=1;o<t.length;o++){var p=t[o];h.push(1==p?f()|f():2==p?f()&f():p?n(p,r):!f())}return!!f()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],a=(typeof i)[0];if(r>=n.length)return"u"==a;var o=n[r],s=(typeof o)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&i!=o)return i<o;r++}})(t,n)?n:t),0)},a=(e,i,a,l)=>{var c=r(e,a);return n(l,c)||o(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,a,c,l)),s(e[a][c])},o=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},s=e=>(e.loaded=1,e.get()),l=e=>function(t,n,r,a){var o=i.I(t);return o&&o.then?o.then(e.bind(e,t,i.S[t],n,r,a)):e(t,i.S[t],n,r,a)},c=l(((e,t,n,a)=>t&&i.o(t,n)?((e,t,n,i)=>{var a=r(e,n);return s(e[n][a])})(t,0,n):a())),u=l(((e,t,n,r,o)=>t&&i.o(t,n)?a(t,0,n,r):o())),d={},h={6081:()=>c("default","@openmrs/esm-framework/src/internal",(()=>i.e(130).then((()=>()=>i(130))))),8744:()=>u("default","react-router-dom",[1,6],(()=>i.e(591).then((()=>()=>i(6591))))),9198:()=>u("default","swr/immutable",[1,2],(()=>i.e(152).then((()=>()=>i(2303))))),7900:()=>u("default","react",[1,18,2,0],(()=>i.e(784).then((()=>()=>i(2784))))),3325:()=>u("default","swr/_internal",[1,2],(()=>i.e(729).then((()=>()=>i(4729))))),2870:()=>u("default","@openmrs/esm-framework",[1,5],(()=>i.e(130).then((()=>()=>i(130))))),4556:()=>u("default","@openmrs/esm-patient-common-lib",[1,5],(()=>Promise.all([i.e(779),i.e(545)]).then((()=>()=>i(9545))))),4924:()=>u("default","react-i18next",[1,11],(()=>i.e(553).then((()=>()=>i(9553)))))};[2870,7900,4924,4556,3325].forEach((e=>{i.m[e]=t=>{d[e]=0,delete i.c[e];var n=h[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var f={325:[3325],496:[2870,4556,4924],545:[6081,8744,9198],900:[7900]};i.f.consumes=(e,t)=>{i.o(f,e)&&f[e].forEach((e=>{if(i.o(d,e))return t.push(d[e]);var n=t=>{d[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete d[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var a=h[e]();a.then?t.push(d[e]=a.then(n).catch(r)):n(a)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,496:0,900:0,210:0,255:0,750:0,904:0,325:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(325|496|900)$/.test(t))e[t]=0;else{var a=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=a);var o=i.p+i.u(t),s=new Error;i.l(o,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,s,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);l&&l(i)}for(t&&t(n);c<o.length;c++)a=o[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(7210)})();
|
|
2
|
+
(()=>{var e,t,n={8988:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.AlluvialChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2313:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.StackedAreaChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2409:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.AreaChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},9252:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.GroupedBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5481:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.SimpleBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8886:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.StackedBarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5899:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this,r=t.options,i=t.data;return r||console.error("Missing options!"),i||console.error("Missing data!"),n.data=t.data||[],n.options=t.options||{},Object.assign(n,n.chart),n}return i(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props.data!==e.data||this.props.options!==e.options},t.prototype.componentDidUpdate=function(){this.chart.model.setData(this.props.data),this.chart.model.setOptions(this.props.options)},t}(a(n(7900)).default.Component);t.default=o},9076:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BoxplotChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},2490:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BubbleChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4587:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.BulletChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},3439:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.CirclePackChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},176:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.ComboChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7125:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.DonutChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},1965:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.GaugeChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7768:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.HeatmapChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5777:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.HistogramChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},419:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeatmapChart=t.AlluvialChart=t.WordCloudChart=t.CirclePackChart=t.TreemapChart=t.TreeChart=t.ComboChart=t.RadarChart=t.MeterChart=t.ScatterChart=t.PieChart=t.LollipopChart=t.LineChart=t.HistogramChart=t.GaugeChart=t.DonutChart=t.BulletChart=t.BubbleChart=t.BoxplotChart=t.StackedBarChart=t.SimpleBarChart=t.GroupedBarChart=t.StackedAreaChart=t.AreaChart=void 0;var i=r(n(2409));t.AreaChart=i.default;var a=r(n(2313));t.StackedAreaChart=a.default;var o=r(n(9252));t.GroupedBarChart=o.default;var s=r(n(5481));t.SimpleBarChart=s.default;var l=r(n(8886));t.StackedBarChart=l.default;var c=r(n(9076));t.BoxplotChart=c.default;var u=r(n(2490));t.BubbleChart=u.default;var d=r(n(4587));t.BulletChart=d.default;var h=r(n(7125));t.DonutChart=h.default;var f=r(n(1965));t.GaugeChart=f.default;var p=r(n(5777));t.HistogramChart=p.default;var m=r(n(5998));t.LineChart=m.default;var g=r(n(4397));t.LollipopChart=g.default;var v=r(n(5108));t.PieChart=v.default;var y=r(n(4617));t.ScatterChart=y.default;var b=r(n(3064));t.MeterChart=b.default;var _=r(n(8507));t.RadarChart=_.default;var w=r(n(176));t.ComboChart=w.default;var E=r(n(7930));t.TreeChart=E.default;var x=r(n(1087));t.TreemapChart=x.default;var S=r(n(3439));t.CirclePackChart=S.default;var O=r(n(257));t.WordCloudChart=O.default;var C=r(n(8988));t.AlluvialChart=C.default;var T=r(n(7768));t.HeatmapChart=T.default},5998:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.LineChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4397:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.LollipopChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},3064:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.MeterChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},5108:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.PieChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8507:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.RadarChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},4617:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.ScatterChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},7930:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.TreeChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},1087:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.TreemapChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},6978:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasChartBeenInitialized=void 0,t.hasChartBeenInitialized=function(e){return!!e.querySelector("div.bx--cc--chart-wrapper")}},257:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(n(7900)),s=n(8132),l=a(n(5899)),c=n(6978),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.componentDidMount=function(){!1===c.hasChartBeenInitialized(this.chartRef)&&(this.chart=new s.WordCloudChart(this.chartRef,{data:this.props.data,options:this.props.options}))},t.prototype.render=function(){var e=this;return o.default.createElement("div",{ref:function(t){return e.chartRef=t},className:"chart-holder"})},t}(l.default);t.default=u},8132:function(e,t,n){e=n.nmd(e),function(t){"use strict";function r(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function i(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a(e){let t,n,a;function s(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}return 2!==e.length?(t=r,n=(t,n)=>r(e(t),n),a=(t,n)=>e(t)-n):(t=e===r||e===i?e:o,n=e,a=e),{left:s,center:function(e,t,n=0,r=e.length){const i=s(e,t,n,r-1);return i>n&&a(e[i-1],t)>-a(e[i],t)?i-1:i},right:function(e,r,i=0,a=e.length){if(i<a){if(0!==t(r,r))return a;do{const t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}}}function o(){return 0}const s=a(r).right;a((function(e){return null===e?NaN:+e})).center;const l=s;function c(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)null!=(a=t(a,++i,e))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class u{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=t[r],a=e+i,o=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);o&&(t[n++]=o),e=a}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,a=0;if(i>0){for(a=e[--i];i>0&&(t=a,n=e[--i],a=t+n,r=n-(a-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=a+n,n==t-a&&(a=t))}return a}}class d extends Map{constructor(e,t=f){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(h(this,e))}has(e){return super.has(h(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function h({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function f(e){return null!==e&&"object"==typeof e?e.valueOf():e}function p(e){return e}function m(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}var g=Array.prototype.slice;function v(e){return()=>e}const y=Math.sqrt(50),b=Math.sqrt(10),_=Math.sqrt(2);function w(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=y?10:a>=b?5:a>=_?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?w(e,t,2*n):[s,l,c]}function E(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,a,o]=r?w(t,e,n):w(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let e=0;e<s;++e)l[e]=(a-e)/-o;else for(let e=0;e<s;++e)l[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)l[e]=(i+e)/-o;else for(let e=0;e<s;++e)l[e]=(i+e)*o;return l}function x(e,t,n){return w(e=+e,t=+t,n=+n)[2]}function S(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?x(t,e,n):x(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function O(e){return Math.max(1,Math.ceil(Math.log(function(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}(e))/Math.LN2)+1)}function C(){var e=p,t=c,n=O;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,o,s=r.length,u=new Array(s);for(i=0;i<s;++i)u[i]=e(r[i],i,r);var d=t(u),h=d[0],f=d[1],p=n(u,h,f);if(!Array.isArray(p)){const e=f,n=+p;if(t===c&&([h,f]=function(e,t,n){let r;for(;;){const i=x(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}(h,f,n)),(p=E(h,f,n))[0]<=h&&(o=x(h,f,n)),p[p.length-1]>=f)if(e>=f&&t===c){const e=x(h,f,n);isFinite(e)&&(e>0?f=(Math.floor(f/e)+1)*e:e<0&&(f=(Math.ceil(f*-e)+1)/-e))}else p.pop()}for(var m=p.length,g=0,v=m;p[g]<=h;)++g;for(;p[v-1]>f;)--v;(g||v<m)&&(p=p.slice(g,v),m=v-g);var y,b=new Array(m+1);for(i=0;i<=m;++i)(y=b[i]=[]).x0=i>0?p[i-1]:h,y.x1=i<m?p[i]:f;if(isFinite(o)){if(o>0)for(i=0;i<s;++i)null!=(a=u[i])&&h<=a&&a<=f&&b[Math.min(m,Math.floor((a-h)/o))].push(r[i]);else if(o<0)for(i=0;i<s;++i)if(null!=(a=u[i])&&h<=a&&a<=f){const e=Math.floor((h-a)*o);b[Math.min(m,e+(p[e]<=a))].push(r[i])}}else for(i=0;i<s;++i)null!=(a=u[i])&&h<=a&&a<=f&&b[l(p,a,0,m)].push(r[i]);return b}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:v(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:v([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:v(Array.isArray(e)?g.call(e):e),r):n},r}function T(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function A(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function M(e,t,n=0,i=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(a=void 0===a?m:function(e=r){if(e===r)return m;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);i>n;){if(i-n>600){const r=i-n+1,o=t-n+1,s=Math.log(r),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(r-l)/r)*(o-r/2<0?-1:1);M(e,t,Math.max(n,Math.floor(t-o*l/r+c)),Math.min(i,Math.floor(t+(r-o)*l/r+c)),a)}const r=e[t];let o=n,s=i;for(k(e,n,t),a(e[i],r)>0&&k(e,n,i);o<s;){for(k(e,o,s),++o,--s;a(e[o],r)<0;)++o;for(;a(e[s],r)>0;)--s}0===a(e[n],r)?k(e,n,s):(++s,k(e,s,i)),s<=t&&(n=s+1),t<=s&&(i=s-1)}return e}function k(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function L(e,t,n){if((r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length)&&!isNaN(t=+t)){if(t<=0||r<2)return A(e);if(t>=1)return T(e);var r,i=(r-1)*t,a=Math.floor(i),o=T(M(e,a).subarray(0,a+1));return o+(A(e.subarray(a+1))-o)*(i-a)}}function D(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function R(e){return e}var N=1,I=2,P=3,$=4,B=1e-6;function z(e){return"translate("+e+",0)"}function U(e){return"translate(0,"+e+")"}function j(e){return t=>+e(t)}function F(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function V(){return!this.__axis}function H(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===N||e===$?-1:1,u=e===$||e===I?"x":"y",d=e===N||e===P?z:U;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):R),m=Math.max(a,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?F:j)(t.copy(),l),_=h.selection?h.selection():h,w=_.selectAll(".domain").data([null]),E=_.selectAll(".tick").data(f,t).order(),x=E.exit(),S=E.enter().append("g").attr("class","tick"),O=E.select("line"),C=E.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(S),O=O.merge(S.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(S.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===N?"0em":e===P?"0.71em":"0.32em")),h!==_&&(w=w.transition(h),E=E.transition(h),O=O.transition(h),C=C.transition(h),x=x.transition(h).attr("opacity",B).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),S.attr("opacity",B).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),w.attr("d",e===$||e===I?o?"M"+c*o+","+v+"H"+l+"V"+y+"H"+c*o:"M"+l+","+v+"V"+y:o?"M"+v+","+c*o+"V"+l+"H"+y+"V"+c*o:"M"+v+","+l+"H"+y),E.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),O.attr(u+"2",c*a),C.attr(u,c*m).text(p),_.filter(V).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===I?"start":e===$?"end":"middle"),_.each((function(){this.__axis=b}))}return h.scale=function(e){return arguments.length?(t=e,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),h):n.slice()},h.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),h):r&&r.slice()},h.tickFormat=function(e){return arguments.length?(i=e,h):i},h.tickSize=function(e){return arguments.length?(a=o=+e,h):a},h.tickSizeInner=function(e){return arguments.length?(a=+e,h):a},h.tickSizeOuter=function(e){return arguments.length?(o=+e,h):o},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function G(e){return H(N,e)}function W(e){return H(I,e)}function q(e){return H(P,e)}function Z(e){return H($,e)}var Y={value:()=>{}};function K(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new X(r)}function X(e){this._=e}function Q(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function J(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Y,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}X.prototype=K.prototype={constructor:X,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=J(r[n],e.name,t);else if(null==t)for(n in r)r[n]=J(r[n],e.name,null);return this}for(;++a<o;)if((n=(e=i[a]).type)&&(n=Q(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new X(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var ee="http://www.w3.org/1999/xhtml";const te={svg:"http://www.w3.org/2000/svg",xhtml:ee,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),te.hasOwnProperty(t)?{space:te[t],local:e}:e}function re(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ee&&t.documentElement.namespaceURI===ee?t.createElement(e):t.createElementNS(n,e)}}function ie(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ae(e){var t=ne(e);return(t.local?ie:re)(t)}function oe(){}function se(e){return null==e?oe:function(){return this.querySelector(e)}}function le(){return[]}function ce(e){return null==e?le:function(){return this.querySelectorAll(e)}}function ue(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function de(e){return function(){return this.matches(e)}}function he(e){return function(t){return t.matches(e)}}var fe=Array.prototype.find;function pe(){return this.firstElementChild}var me=Array.prototype.filter;function ge(){return Array.from(this.children)}function ve(e){return new Array(e.length)}function ye(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function be(e,t,n,r,i,a){for(var o,s=0,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new ye(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function _e(e,t,n,r,i,a,o){var s,l,c,u=new Map,d=t.length,h=a.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=o.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=o.call(e,a[s],s,a)+"",(l=u.get(c))?(r[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new ye(e,a[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function we(e){return e.__data__}function Ee(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function xe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Se(e){return function(){this.removeAttribute(e)}}function Oe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ce(e,t){return function(){this.setAttribute(e,t)}}function Te(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ae(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Me(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function ke(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Le(e){return function(){this.style.removeProperty(e)}}function De(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Re(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Ne(e,t){return e.style.getPropertyValue(t)||ke(e).getComputedStyle(e,null).getPropertyValue(t)}function Ie(e){return function(){delete this[e]}}function Pe(e,t){return function(){this[e]=t}}function $e(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Be(e){return e.trim().split(/^|\s+/)}function ze(e){return e.classList||new Ue(e)}function Ue(e){this._node=e,this._names=Be(e.getAttribute("class")||"")}function je(e,t){for(var n=ze(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fe(e,t){for(var n=ze(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ve(e){return function(){je(this,e)}}function He(e){return function(){Fe(this,e)}}function Ge(e,t){return function(){(t.apply(this,arguments)?je:Fe)(this,e)}}function We(){this.textContent=""}function qe(e){return function(){this.textContent=e}}function Ze(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ye(){this.innerHTML=""}function Ke(e){return function(){this.innerHTML=e}}function Xe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Qe(){this.nextSibling&&this.parentNode.appendChild(this)}function Je(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(){return null}function tt(){var e=this.parentNode;e&&e.removeChild(this)}function nt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function it(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function at(e,t,n){return function(){var r,i=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(r):this.__on=[r]}}function ot(e,t,n){var r=ke(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function st(e,t){return function(){return ot(this,e,t)}}function lt(e,t){return function(){return ot(this,e,t.apply(this,arguments))}}ye.prototype={constructor:ye,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Ue.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ct=[null];function ut(e,t){this._groups=e,this._parents=t}function dt(){return new ut([[document.documentElement]],ct)}function ht(e){return"string"==typeof e?new ut([[document.querySelector(e)]],[document.documentElement]):new ut([[e]],ct)}function ft(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}ut.prototype=dt.prototype={constructor:ut,select:function(e){"function"!=typeof e&&(e=se(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(a=s[u])&&(o=e.call(a,a.__data__,u,s))&&("__data__"in a&&(o.__data__=a.__data__),c[u]=o);return new ut(r,this._parents)},selectAll:function(e){e="function"==typeof e?ue(e):ce(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o,s=t[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(r.push(e.call(o,o.__data__,c,s)),i.push(o));return new ut(r,i)},selectChild:function(e){return this.select(null==e?pe:function(e){return function(){return fe.call(this.children,e)}}("function"==typeof e?e:he(e)))},selectChildren:function(e){return this.selectAll(null==e?ge:function(e){return function(){return me.call(this.children,e)}}("function"==typeof e?e:he(e)))},filter:function(e){"function"!=typeof e&&(e=de(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&e.call(a,a.__data__,c,o)&&l.push(a);return new ut(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,we);var n=t?_e:be,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var a=i.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=i[c],h=d.length,f=Ee(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=o[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,_=0;b<p;++b)if(v=m[b]){for(b>=_&&(_=b+1);!(y=g[_])&&++_<p;);v._next=y||null}}return(o=new ut(o,r))._enter=s,o._exit=l,o},enter:function(){return new ut(this._enter||this._groups.map(ve),this._parents)},exit:function(){return new ut(this._exit||this._groups.map(ve),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),l=0;l<o;++l)for(var c,u=n[l],d=r[l],h=u.length,f=s[l]=new Array(h),p=0;p<h;++p)(c=u[p]||d[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new ut(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=xe);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],l=s.length,c=i[a]=new Array(l),u=0;u<l;++u)(o=s[u])&&(c[u]=o);c.sort(t)}return new ut(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,a=t[n],o=0,s=a.length;o<s;++o)(i=a[o])&&e.call(i,i.__data__,o,a);return this},attr:function(e,t){var n=ne(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Oe:Se:"function"==typeof t?n.local?Me:Ae:n.local?Te:Ce)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Le:"function"==typeof t?Re:De)(e,t,n??"")):Ne(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Ie:"function"==typeof t?$e:Pe)(e,t)):this.node()[e]},classed:function(e,t){var n=Be(e+"");if(arguments.length<2){for(var r=ze(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Ge:t?Ve:He)(n,t))},text:function(e){return arguments.length?this.each(null==e?We:("function"==typeof e?Ze:qe)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Ye:("function"==typeof e?Xe:Ke)(e)):this.node().innerHTML},raise:function(){return this.each(Qe)},lower:function(){return this.each(Je)},append:function(e){var t="function"==typeof e?e:ae(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:ae(e),r=null==t?et:"function"==typeof t?t:se(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(tt)},clone:function(e){return this.select(e?rt:nt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,a=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),o=a.length;if(!(arguments.length<2)){for(s=t?at:it,r=0;r<o;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<o;++r)if((i=a[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?lt:st)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const pt={capture:!0,passive:!1};function mt(e){e.preventDefault(),e.stopImmediatePropagation()}function gt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yt(){}var bt=.7,_t=1/bt,wt="\\s*([+-]?\\d+)\\s*",Et="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",St=/^#([0-9a-f]{3,8})$/,Ot=new RegExp(`^rgb\\(${wt},${wt},${wt}\\)$`),Ct=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Tt=new RegExp(`^rgba\\(${wt},${wt},${wt},${Et}\\)$`),At=new RegExp(`^rgba\\(${xt},${xt},${xt},${Et}\\)$`),Mt=new RegExp(`^hsl\\(${Et},${xt},${xt}\\)$`),kt=new RegExp(`^hsla\\(${Et},${xt},${xt},${Et}\\)$`),Lt={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 Dt(){return this.rgb().formatHex()}function Rt(){return this.rgb().formatRgb()}function Nt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=St.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?It(t):3===n?new Bt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Pt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Pt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ot.exec(e))?new Bt(t[1],t[2],t[3],1):(t=Ct.exec(e))?new Bt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Tt.exec(e))?Pt(t[1],t[2],t[3],t[4]):(t=At.exec(e))?Pt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Mt.exec(e))?Ht(t[1],t[2]/100,t[3]/100,1):(t=kt.exec(e))?Ht(t[1],t[2]/100,t[3]/100,t[4]):Lt.hasOwnProperty(e)?It(Lt[e]):"transparent"===e?new Bt(NaN,NaN,NaN,0):null}function It(e){return new Bt(e>>16&255,e>>8&255,255&e,1)}function Pt(e,t,n,r){return r<=0&&(e=t=n=NaN),new Bt(e,t,n,r)}function $t(e,t,n,r){return 1===arguments.length?function(e){return e instanceof yt||(e=Nt(e)),e?new Bt((e=e.rgb()).r,e.g,e.b,e.opacity):new Bt}(e):new Bt(e,t,n,r??1)}function Bt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function zt(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}`}function Ut(){const e=jt(this.opacity);return`${1===e?"rgb(":"rgba("}${Ft(this.r)}, ${Ft(this.g)}, ${Ft(this.b)}${1===e?")":`, ${e})`}`}function jt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ft(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vt(e){return((e=Ft(e))<16?"0":"")+e.toString(16)}function Ht(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qt(e,t,n,r)}function Gt(e){if(e instanceof qt)return new qt(e.h,e.s,e.l,e.opacity);if(e instanceof yt||(e=Nt(e)),!e)return new qt;if(e instanceof qt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new qt(o,s,l,e.opacity)}function Wt(e,t,n,r){return 1===arguments.length?Gt(e):new qt(e,t,n,r??1)}function qt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Zt(e){return(e=(e||0)%360)<0?e+360:e}function Yt(e){return Math.max(0,Math.min(1,e||0))}function Kt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}gt(yt,Nt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dt,formatHex:Dt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Gt(this).formatHsl()},formatRgb:Rt,toString:Rt}),gt(Bt,$t,vt(yt,{brighter(e){return e=null==e?_t:Math.pow(_t,e),new Bt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?bt:Math.pow(bt,e),new Bt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bt(Ft(this.r),Ft(this.g),Ft(this.b),jt(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:zt,formatHex:zt,formatHex8:function(){return`#${Vt(this.r)}${Vt(this.g)}${Vt(this.b)}${Vt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ut,toString:Ut})),gt(qt,Wt,vt(yt,{brighter(e){return e=null==e?_t:Math.pow(_t,e),new qt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?bt:Math.pow(bt,e),new qt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Bt(Kt(e>=240?e-240:e+120,i,r),Kt(e,i,r),Kt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new qt(Zt(this.h),Yt(this.s),Yt(this.l),jt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=jt(this.opacity);return`${1===e?"hsl(":"hsla("}${Zt(this.h)}, ${100*Yt(this.s)}%, ${100*Yt(this.l)}%${1===e?")":`, ${e})`}`}}));const Xt=e=>()=>e;function Qt(e){return 1==(e=+e)?Jt:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Xt(isNaN(t)?n:t)}}function Jt(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Xt(isNaN(e)?t:e)}const en=function e(t){var n=Qt(t);function r(e,t){var r=n((e=$t(e)).r,(t=$t(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Jt(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function tn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function nn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=un(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}function rn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function an(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function on(e,t){var n,r={},i={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=un(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var sn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ln=new RegExp(sn.source,"g");function cn(e,t){var n,r,i,a=sn.lastIndex=ln.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(n=sn.exec(e))&&(r=ln.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:an(n,r)})),a=ln.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function un(e,t){var n,r=typeof t;return null==t||"boolean"===r?Xt(t):("number"===r?an:"string"===r?(n=Nt(t))?(t=n,en):cn:t instanceof Nt?en:t instanceof Date?rn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?tn:Array.isArray(t)?nn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?on:an)(e,t)}function dn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hn,fn=180/Math.PI,pn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mn(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*fn,skewX:Math.atan(l)*fn,scaleX:o,scaleY:s}}function gn(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(a,o){var s=[],l=[];return a=e(a),o=e(o),function(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push("translate(",null,t,null,n);s.push({i:l-4,x:an(e,i)},{i:l-2,x:an(r,a)})}else(i||a)&&o.push("translate("+i+t+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:an(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:an(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,l),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:an(e,n)},{i:s-2,x:an(t,r)})}else(1!==n||1!==r)&&a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var vn=gn((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?pn:mn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),yn=gn((function(e){return null!=e&&(hn||(hn=document.createElementNS("http://www.w3.org/2000/svg","g")),hn.setAttribute("transform",e),e=hn.transform.baseVal.consolidate())?mn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):pn}),", ",")",")");var bn,_n,wn=0,En=0,xn=0,Sn=1e3,On=0,Cn=0,Tn=0,An="object"==typeof performance&&performance.now?performance:Date,Mn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kn(){return Cn||(Mn(Ln),Cn=An.now()+Tn)}function Ln(){Cn=0}function Dn(){this._call=this._time=this._next=null}function Rn(e,t,n){var r=new Dn;return r.restart(e,t,n),r}function Nn(){Cn=(On=An.now())+Tn,wn=En=0;try{!function(){kn(),++wn;for(var e,t=bn;t;)(e=Cn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--wn}()}finally{wn=0,function(){for(var e,t,n=bn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:bn=t);_n=e,Pn(r)}(),Cn=0}}function In(){var e=An.now(),t=e-On;t>Sn&&(Tn-=t,On=e)}function Pn(e){wn||(En&&(En=clearTimeout(En)),e-Cn>24?(e<1/0&&(En=setTimeout(Nn,e-An.now()-Tn)),xn&&(xn=clearInterval(xn))):(xn||(On=An.now(),xn=setInterval(In,Sn)),wn=1,Mn(Nn)))}function $n(e,t,n){var r=new Dn;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Dn.prototype=Rn.prototype={constructor:Dn,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?kn():+n)+(null==t?0:+t),!this._next&&_n!==this&&(_n?_n._next=this:bn=this,_n=this),this._call=e,this._time=n,Pn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pn())}};var Bn=K("start","end","cancel","interrupt"),zn=[],Un=0,jn=1,Fn=2,Vn=3,Hn=4,Gn=5,Wn=6;function qn(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(e){n.state=jn,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var c,u,d,h;if(n.state!==jn)return l();for(c in i)if((h=i[c]).name===n.name){if(h.state===Vn)return $n(o);h.state===Hn?(h.state=Wn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=Wn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if($n((function(){n.state===Vn&&(n.state=Hn,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=Fn,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Fn){for(n.state=Vn,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function s(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=Gn,1),a=-1,o=r.length;++a<o;)r[a].call(e,i);n.state===Gn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=Wn,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Rn(a,0,n.time)}(e,n,{name:t,index:r,group:i,on:Bn,tween:zn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Un})}function Zn(e,t){var n=Kn(e,t);if(n.state>Un)throw new Error("too late; already scheduled");return n}function Yn(e,t){var n=Kn(e,t);if(n.state>Vn)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Xn(e,t){var n,r,i,a=e.__transition,o=!0;if(a){for(i in t=null==t?null:t+"",a)(n=a[i]).name===t?(r=n.state>Fn&&n.state<Gn,n.state=Wn,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete e.__transition}}function Qn(e,t){var n,r;return function(){var i=Yn(this,e),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===t){(r=r.slice()).splice(o,1);break}i.tween=r}}function Jn(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Yn(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}a.tween=i}}function er(e,t,n){var r=e._id;return e.each((function(){var e=Yn(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Kn(e,r).value[t]}}function tr(e,t){var n;return("number"==typeof t?an:t instanceof Nt?en:(n=Nt(t))?(t=n,en):cn)(e,t)}function nr(e){return function(){this.removeAttribute(e)}}function rr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ir(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}}function ar(e,t,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}function or(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttribute(e):(o=this.getAttribute(e))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}function sr(e,t,n){var r,i,a;return function(){var o,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:o===r&&s===i?a:(i=s,a=t(r=o,l))}}function lr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function cr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function ur(e,t){return function(){Zn(this,e).delay=+t.apply(this,arguments)}}function dr(e,t){return t=+t,function(){Zn(this,e).delay=t}}function hr(e,t){return function(){Yn(this,e).duration=+t.apply(this,arguments)}}function fr(e,t){return t=+t,function(){Yn(this,e).duration=t}}var pr=dt.prototype.constructor;function mr(e){return function(){this.style.removeProperty(e)}}var gr=0;function vr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yr(){return++gr}var br=dt.prototype;vr.prototype={constructor:vr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=se(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=r[o],u=c.length,d=a[o]=new Array(u),h=0;h<u;++h)(s=c[h])&&(l=e.call(s,s.__data__,h,c))&&("__data__"in s&&(l.__data__=s.__data__),d[h]=l,qn(d[h],t,n,h,d,Kn(s,n)));return new vr(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=ce(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var h,f=e.call(l,l.__data__,d,c),p=Kn(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&qn(h,t,n,m,f,p);a.push(f),o.push(l)}return new vr(a,o,t,n)},selectChild:br.selectChild,selectChildren:br.selectChildren,filter:function(e){"function"!=typeof e&&(e=de(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a,o=t[i],s=o.length,l=r[i]=[],c=0;c<s;++c)(a=o[c])&&e.call(a,a.__data__,c,o)&&l.push(a);return new vr(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var l,c=t[s],u=n[s],d=c.length,h=o[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)o[s]=t[s];return new vr(o,this._parents,this._name,this._id)},selection:function(){return new pr(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=yr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var u=Kn(o,t);qn(o,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new vr(r,this._parents,e,n)},call:br.call,nodes:br.nodes,node:br.node,size:br.size,empty:br.empty,each:br.each,on:function(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Zn:Yn;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}(n,e,t))},attr:function(e,t){var n=ne(e),r="transform"===n?yn:tr;return this.attrTween(e,"function"==typeof t?(n.local?sr:or)(n,r,er(this,"attr."+e,t)):null==t?(n.local?rr:nr)(n):(n.local?ar:ir)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=ne(e);return this.tween(n,(r.local?lr:cr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vn:tr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var a=Ne(this,e),o=(this.style.removeProperty(e),Ne(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}(e,r)).on("end.style."+e,mr(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,a;return function(){var o=Ne(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Ne(this,e)),o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s))}}(e,r,er(this,"style."+e,t))).each(function(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var l=Yn(this,e),c=l.on,u=null==l.value[o]?a||(a=mr(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,a=n+"";return function(){var o=Ne(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(er(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Kn(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===e)return r.value;return null}return this.each((null==t?Qn:Jn)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ur:dr)(t,e)):Kn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?hr:fr)(t,e)):Kn(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Yn(this,e).ease=t}}(t,e)):Kn(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Yn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},l={value:function(){0==--i&&a()}};n.each((function(){var n=Yn(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&a()}))},[Symbol.iterator]:br[Symbol.iterator]};const _r=e=>+e;function wr(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Er={time:null,delay:0,duration:250,ease:wr};function xr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}dt.prototype.interrupt=function(e){return this.each((function(){Xn(this,e)}))},dt.prototype.transition=function(e){var t,n;e instanceof vr?(t=e._id,e=e._name):(t=yr(),(n=Er).time=kn(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],l=s.length,c=0;c<l;++c)(o=s[c])&&qn(o,e,t,c,s,n||xr(o,t));return new vr(r,this._parents,e,t)};const Sr=e=>()=>e;function Or(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Cr(e){e.preventDefault(),e.stopImmediatePropagation()}var Tr={name:"drag"},Ar={name:"space"},Mr={name:"handle"},kr={name:"center"};const{abs:Lr,max:Dr,min:Rr}=Math;function Nr(e){return[+e[0],+e[1]]}function Ir(e){return[Nr(e[0]),Nr(e[1])]}var Pr={name:"x",handles:["w","e"].map(Vr),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},$r={name:"y",handles:["n","s"].map(Vr),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},Br={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zr={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Ur={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},jr={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Fr={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Vr(e){return{type:e}}function Hr(e){return!e.ctrlKey&&!e.button}function Gr(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Wr(){return navigator.maxTouchPoints||"ontouchstart"in this}function qr(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Zr(){return function(e){var t,n=Gr,r=Hr,i=Wr,a=!0,o=K("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([Vr("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Br.overlay).merge(n).each((function(){var e=qr(this).extent;ht(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([Vr("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Br.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return Br[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=ht(this),t=qr(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new d(e,t,n):r}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function h(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,o,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,_="selection"===(a&&n.metaKey?b="overlay":b)?Tr:a&&n.altKey?kr:Mr,w=e===$r?null:jr[b],E=e===Pr?null:Fr[b],x=qr(y),S=x.extent,O=x.selection,C=S[0][0],T=S[0][1],A=S[1][0],M=S[1][1],k=0,L=0,D=w&&E&&a&&n.shiftKey,R=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=ft(e,y)).point0=e.slice(),e.identifier=t,e}));Xn(y);var N=u(y,arguments,!0).beforestart();if("overlay"===b){O&&(m=!0);const t=[R[0],R[1]||R[0]];x.selection=O=[[i=e===$r?C:Rr(t[0][0],t[1][0]),s=e===Pr?T:Rr(t[0][1],t[1][1])],[d=e===$r?A:Dr(t[0][0],t[1][0]),f=e===Pr?M:Dr(t[0][1],t[1][1])]],R.length>1&&z(n)}else i=O[0][0],s=O[0][1],d=O[1][0],f=O[1][1];o=i,l=s,h=d,p=f;var I=ht(y).attr("pointer-events","none"),P=I.selectAll(".overlay").attr("cursor",Br[b]);if(n.touches)N.moved=B,N.ended=U;else{var $=ht(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",U,!0);a&&$.on("keydown.brush",j,!0).on("keyup.brush",F,!0),function(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",mt,pt);"onselectstart"in t?n.on("selectstart.drag",mt,pt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),N.start(n,_.name)}function B(e){for(const t of e.changedTouches||[e])for(const e of R)e.identifier===t.identifier&&(e.cur=ft(t,y));if(D&&!g&&!v&&1===R.length){const e=R[0];Lr(e.cur[0]-e[0])>Lr(e.cur[1]-e[1])?v=!0:g=!0}for(const e of R)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,Cr(e),z(e)}function z(e){const t=R[0],n=t.point0;var r;switch(k=t[0]-n[0],L=t[1]-n[1],_){case Ar:case Tr:w&&(k=Dr(C-i,Rr(A-d,k)),o=i+k,h=d+k),E&&(L=Dr(T-s,Rr(M-f,L)),l=s+L,p=f+L);break;case Mr:R[1]?(w&&(o=Dr(C,Rr(A,R[0][0])),h=Dr(C,Rr(A,R[1][0])),w=1),E&&(l=Dr(T,Rr(M,R[0][1])),p=Dr(T,Rr(M,R[1][1])),E=1)):(w<0?(k=Dr(C-i,Rr(A-i,k)),o=i+k,h=d):w>0&&(k=Dr(C-d,Rr(A-d,k)),o=i,h=d+k),E<0?(L=Dr(T-s,Rr(M-s,L)),l=s+L,p=f):E>0&&(L=Dr(T-f,Rr(M-f,L)),l=s,p=f+L));break;case kr:w&&(o=Dr(C,Rr(A,i-k*w)),h=Dr(C,Rr(A,d+k*w))),E&&(l=Dr(T,Rr(M,s-L*E)),p=Dr(T,Rr(M,f+L*E)))}h<o&&(w*=-1,r=i,i=d,d=r,r=o,o=h,h=r,b in zr&&P.attr("cursor",Br[b=zr[b]])),p<l&&(E*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in Ur&&P.attr("cursor",Br[b=Ur[b]])),x.selection&&(O=x.selection),g&&(o=O[0][0],h=O[1][0]),v&&(l=O[0][1],p=O[1][1]),(O[0][0]!==o||O[0][1]!==l||O[1][0]!==h||O[1][1]!==p)&&(x.selection=[[o,l],[h,p]],c.call(y),N.brush(e,_.name))}function U(e){if(function(e){e.stopImmediatePropagation()}(e),e.touches){if(e.touches.length)return;t&&clearTimeout(t),t=setTimeout((function(){t=null}),500)}else(function(e,t){var n=e.document.documentElement,r=ht(e).on("dragstart.drag",null);t&&(r.on("click.drag",mt,pt),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(e.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),P.attr("cursor",Br.overlay),x.selection&&(O=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(O)&&(x.selection=null,c.call(y)),N.end(e,_.name)}function j(e){switch(e.keyCode){case 16:D=w&&E;break;case 18:_===Mr&&(w&&(d=h-k*w,i=o+k*w),E&&(f=p-L*E,s=l+L*E),_=kr,z(e));break;case 32:(_===Mr||_===kr)&&(w<0?d=h-k:w>0&&(i=o-k),E<0?f=p-L:E>0&&(s=l-L),_=Ar,P.attr("cursor",Br.selection),z(e));break;default:return}Cr(e)}function F(e){switch(e.keyCode){case 16:D&&(g=v=D=!1,z(e));break;case 18:_===kr&&(w<0?d=h:w>0&&(i=o),E<0?f=p:E>0&&(s=l),_=Mr,z(e));break;case 32:_===Ar&&(e.altKey?(w&&(d=h-k*w,i=o+k*w),E&&(f=p-L*E,s=l+L*E),_=kr):(w<0?d=h:w>0&&(i=o),E<0?f=p:E>0&&(s=l),_=Mr),P.attr("cursor",Br[b]),z(e));break;default:return}Cr(e)}}function f(e){u(this,arguments).moved(e)}function p(e){u(this,arguments).ended(e)}function m(){var t=this.__brush||{selection:null};return t.extent=Ir(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n,r){t.tween?t.on("start.brush",(function(e){u(this,arguments).beforestart().start(e)})).on("interrupt.brush end.brush",(function(e){u(this,arguments).end(e)})).tween("brush",(function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=un(a,o);function l(e){r.selection=1===e&&null===o?null:s(e),c.call(t),i.brush()}return null!==a&&null!==o?l:l(1)})):t.each((function(){var t=this,i=arguments,a=t.__brush,o=e.input("function"==typeof n?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();Xn(t),a.selection=null===o?null:o,c.call(t),s.start(r).brush(r).end(r)}))},l.clear=function(e,t){l.move(e,null,t)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0==--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var i=ht(this.that).datum();o.call(t,this.that,new Or(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:o}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:Sr(Ir(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:Sr(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:Sr(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(a=!!e,l):a},l.on=function(){var e=o.on.apply(o,arguments);return e===o?l:e},l}(Pr)}const Yr=Math.PI,Kr=2*Yr,Xr=1e-6,Qr=Kr-Xr;function Jr(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let ei=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Jr:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jr;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Xr)if(Math.abs(u*s-l*c)>Xr&&i){let h=n-a,f=r-o,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Yr-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,_=y/g;Math.abs(b-1)>Xr&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+_*s},${this._y1=t+_*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Xr||Math.abs(this._y1-c)>Xr)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Kr+Kr),d>Qr?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Xr&&this._append`A${n},${n},0,${+(d>=Yr)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function ti(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ni(e){return(e=ti(Math.abs(e)))?e[1]:NaN}var ri,ii=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ai(e){if(!(t=ii.exec(e)))throw new Error("invalid format: "+e);var t;return new oi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function oi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function si(e,t){var n=ti(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}ai.prototype=oi.prototype,oi.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};const li={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>si(100*e,t),r:si,s:function(e,t){var n=ti(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(ri=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ti(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ci(e){return e}var ui,di,hi,fi=Array.prototype.map,pi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mi(e){var t=void 0===e.grouping||void 0===e.thousands?ci:function(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}(fi.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?ci:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(fi.call(e.numerals,String)),o=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=ai(e)).fill,u=e.align,d=e.sign,h=e.symbol,f=e.zero,p=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):li[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var b="$"===h?n:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===h?r:/[%p]/.test(y)?o:"",w=li[y],E=/[defgprs%]/.test(y);function x(e){var n,r,o,h=b,x=_;if("c"===y)x=w(e)+x,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),h=(S?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?pi[8+ri/3]:"")+x+(S&&"("===d?")":""),E)for(n=-1,r=e.length;++n<r;)if(48>(o=e.charCodeAt(n))||o>57){x=(46===o?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var O=h.length+e.length+x.length,C=O<p?new Array(p-O+1).join(c):"";switch(m&&f&&(e=t(C+e,C.length?p-x.length:1/0),C=""),u){case"<":e=h+e+x+C;break;case"=":e=h+C+e+x;break;case"^":e=C.slice(0,O=C.length>>1)+h+e+x+C.slice(O);break;default:e=C+h+e+x}return a(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return e+""},x}return{format:c,formatPrefix:function(e,t){var n=c(((e=ai(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(ni(t)/3))),i=Math.pow(10,-r),a=pi[8+r/3];return function(e){return n(i*e)+a}}}}!function(e){ui=mi(e),di=ui.format,hi=ui.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});var gi=1e-6,vi=1e-12,yi=Math.PI,bi=yi/2,_i=yi/4,wi=2*yi,Ei=180/yi,xi=yi/180,Si=Math.abs,Oi=Math.atan,Ci=Math.atan2,Ti=Math.cos,Ai=Math.exp,Mi=Math.log,ki=Math.sin,Li=Math.sign||function(e){return e>0?1:e<0?-1:0},Di=Math.sqrt,Ri=Math.tan;function Ni(e){return e>1?bi:e<-1?-bi:Math.asin(e)}function Ii(){}function Pi(e,t){e&&Bi.hasOwnProperty(e.type)&&Bi[e.type](e,t)}var $i={Feature:function(e,t){Pi(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Pi(n[r].geometry,t)}},Bi={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){zi(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)zi(n[r],t,0)},Polygon:function(e,t){Ui(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ui(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Pi(n[r],t)}};function zi(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function Ui(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)zi(e[n],t,1);t.polygonEnd()}function ji(e,t){e&&$i.hasOwnProperty(e.type)?$i[e.type](e,t):Pi(e,t)}function Fi(e){return[Ci(e[1],e[0]),Ni(e[2])]}function Vi(e){var t=e[0],n=e[1],r=Ti(n);return[r*Ti(t),r*ki(t),ki(n)]}function Hi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Gi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wi(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function qi(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Zi(e){var t=Di(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Yi(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function Ki(e,t){return Si(e)>yi&&(e-=Math.round(e/wi)*wi),[e,t]}function Xi(e,t,n){return(e%=wi)?t||n?Yi(Ji(e),ea(t,n)):Ji(e):t||n?ea(t,n):Ki}function Qi(e){return function(t,n){return Si(t+=e)>yi&&(t-=Math.round(t/wi)*wi),[t,n]}}function Ji(e){var t=Qi(e);return t.invert=Qi(-e),t}function ea(e,t){var n=Ti(e),r=ki(e),i=Ti(t),a=ki(t);function o(e,t){var o=Ti(t),s=Ti(e)*o,l=ki(e)*o,c=ki(t),u=c*n+s*r;return[Ci(l*i-u*a,s*n-c*r),Ni(u*i+l*a)]}return o.invert=function(e,t){var o=Ti(t),s=Ti(e)*o,l=ki(e)*o,c=ki(t),u=c*i-l*a;return[Ci(l*i+c*a,s*n+u*r),Ni(u*n-s*r)]},o}function ta(e,t){(t=Vi(t))[0]-=e,Zi(t);var n=function(e){return e>1?0:e<-1?yi:Math.acos(e)}(-t[1]);return((-t[2]<0?-n:n)+wi-gi)%wi}function na(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:Ii,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function ra(e,t){return Si(e[0]-t[0])<gi&&Si(e[1]-t[1])<gi}function ia(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function aa(e,t,n,r,i){var a,o,s=[],l=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if(ra(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);return void i.lineEnd()}o[0]+=2*gi}s.push(n=new ia(r,e,null,!0)),l.push(n.o=new ia(r,null,n,!1)),s.push(n=new ia(o,e,null,!1)),l.push(n.o=new ia(o,null,n,!0))}})),s.length){for(l.sort(t),oa(s),oa(l),a=0,o=l.length;a<o;++a)l[a].e=n=!n;for(var c,u,d=s[0];;){for(var h=d,f=!0;h.v;)if((h=h.n)===d)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(a=0,o=c.length;a<o;++a)i.point((u=c[a])[0],u[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(c=h.p.z,a=c.length-1;a>=0;--a)i.point((u=c[a])[0],u[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,f=!f}while(!h.v);i.lineEnd()}}}function oa(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function sa(e){return Si(e[0])<=yi?e[0]:Li(e[0])*((Si(e[0])+yi)%wi-yi)}function la(e,t,n,r){return function(i){var a,o,s,l=t(i),c=na(),d=t(c),h=!1,f={point:p,lineStart:g,lineEnd:v,polygonStart:function(){f.point=y,f.lineStart=b,f.lineEnd=_,o=[],a=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=v,o=D(o);var e=function(e,t){var n=sa(t),r=t[1],i=ki(r),a=[ki(n),-Ti(n),0],o=0,s=0,l=new u;1===i?r=bi+gi:-1===i&&(r=-bi-gi);for(var c=0,d=e.length;c<d;++c)if(f=(h=e[c]).length)for(var h,f,p=h[f-1],m=sa(p),g=p[1]/2+_i,v=ki(g),y=Ti(g),b=0;b<f;++b,m=w,v=x,y=S,p=_){var _=h[b],w=sa(_),E=_[1]/2+_i,x=ki(E),S=Ti(E),O=w-m,C=O>=0?1:-1,T=C*O,A=T>yi,M=v*x;if(l.add(Ci(M*C*ki(T),y*S+M*Ti(T))),o+=A?O+C*wi:O,A^m>=n^w>=n){var k=Gi(Vi(p),Vi(_));Zi(k);var L=Gi(a,k);Zi(L);var D=(A^O>=0?-1:1)*Ni(L[2]);(r>D||r===D&&(k[0]||k[1]))&&(s+=A^O>=0?1:-1)}}return(o<-gi||o<gi&&l<-vi)^1&s}(a,r);o.length?(h||(i.polygonStart(),h=!0),aa(o,ua,e,n,i)):e&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){l.point(e,t)}function g(){f.point=m,l.lineStart()}function v(){f.point=p,l.lineEnd()}function y(e,t){s.push([e,t]),d.point(e,t)}function b(){d.lineStart(),s=[]}function _(){y(s[0][0],s[0][1]),d.lineEnd();var e,t,n,r,l=d.clean(),u=c.result(),f=u.length;if(s.pop(),a.push(s),s=null,f){if(1&l){if((t=(n=u[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}return}f>1&&2&l&&u.push(u.pop().concat(u.shift())),o.push(u.filter(ca))}}return f}}function ca(e){return e.length>1}function ua(e,t){return((e=e.x)[0]<0?e[1]-bi-gi:bi-e[1])-((t=t.x)[0]<0?t[1]-bi-gi:bi-t[1])}Ki.invert=Ki;const da=la((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?yi:-yi,l=Si(a-n);Si(l-yi)<gi?(e.point(n,r=(r+o)/2>0?bi:-bi),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&l>=yi&&(Si(n-i)<gi&&(n-=i*gi),Si(a-s)<gi&&(a-=s*gi),r=function(e,t,n,r){var i,a,o=ki(e-n);return Si(o)>gi?Oi((ki(t)*(a=Ti(r))*ki(n)-ki(r)*(i=Ti(t))*ki(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*bi,r.point(-yi,i),r.point(0,i),r.point(yi,i),r.point(yi,0),r.point(yi,-i),r.point(0,-i),r.point(-yi,-i),r.point(-yi,0),r.point(-yi,i);else if(Si(e[0]-t[0])>gi){var a=e[0]<t[0]?yi:-yi;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-yi,-bi]);function ha(e){var t=Ti(e),n=6*xi,r=t>0,i=Si(t)>gi;function a(e,n){return Ti(e)*Ti(n)>t}function o(e,n,r){var i=[1,0,0],a=Gi(Vi(e),Vi(n)),o=Hi(a,a),s=a[0],l=o-s*s;if(!l)return!r&&e;var c=t*o/l,u=-t*s/l,d=Gi(i,a),h=qi(i,c);Wi(h,qi(a,u));var f=d,p=Hi(h,f),m=Hi(f,f),g=p*p-m*(Hi(h,h)-1);if(!(g<0)){var v=Di(g),y=qi(f,(-p-v)/m);if(Wi(y,h),y=Fi(y),!r)return y;var b,_=e[0],w=n[0],E=e[1],x=n[1];w<_&&(b=_,_=w,w=b);var S=w-_,O=Si(S-yi)<gi;if(!O&&x<E&&(b=E,E=x,x=b),O||S<gi?O?E+x>0^y[1]<(Si(y[0]-_)<gi?E:x):E<=y[1]&&y[1]<=x:S>yi^(_<=y[0]&&y[0]<=w)){var C=qi(f,(-p+v)/m);return Wi(C,h),[y,Fi(C)]}}}function s(t,n){var i=r?e:yi-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return la(a,(function(e){var t,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(d,h){var f,p=[d,h],m=a(d,h),g=r?m?0:s(d,h):m?s(d+(d<0?yi:-yi),h):0;if(!t&&(c=l=m)&&e.lineStart(),m!==l&&(!(f=o(t,p))||ra(t,f)||ra(p,f))&&(p[2]=1),m!==l)u=0,m?(e.lineStart(),f=o(p,t),e.point(f[0],f[1])):(f=o(t,p),e.point(f[0],f[1],2),e.lineEnd()),t=f;else if(i&&t&&r^m){var v;!(g&n)&&(v=o(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}m&&(!t||!ra(t,p))&&e.point(p[0],p[1]),t=p,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,r,i,a){!function(e,t,n,r,i,a){if(n){var o=Ti(t),s=ki(t),l=r*n;null==i?(i=t+r*wi,a=t-l/2):(i=ta(o,i),a=ta(o,a),(r>0?i<a:i>a)&&(i+=r*wi));for(var c,u=i;r>0?u>a:u<a;u-=l)c=Fi([o,-s*Ti(u),-s*ki(u)]),e.point(c[0],c[1])}}(a,e,n,i,t,r)}),r?[0,-e]:[-yi,e-yi])}var fa=1e9,pa=-fa;function ma(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,c){var u=0,d=0;if(null==i||(u=o(i,s))!==(d=o(a,s))||l(i,a)<0^s>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+s+4)%4)!==d);else c.point(a[0],a[1])}function o(r,i){return Si(r[0]-e)<gi?i>0?0:3:Si(r[0]-n)<gi?i>0?2:1:Si(r[1]-t)<gi?i>0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var l,c,u,d,h,f,p,m,g,v,y,b=o,_=na(),w={point:E,lineStart:function(){w.point=x,c&&c.push(u=[]),v=!0,g=!1,p=m=NaN},lineEnd:function(){l&&(x(d,h),f&&g&&_.rejoin(),l.push(_.result())),w.point=E,g&&b.lineEnd()},polygonStart:function(){b=_,l=[],c=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],l=1,u=s.length,d=s[0],h=d[0],f=d[1];l<u;++l)a=h,o=f,h=(d=s[l])[0],f=d[1],o<=r?f>r&&(h-a)*(r-o)>(f-o)*(e-a)&&++t:f<=r&&(h-a)*(r-o)<(f-o)*(e-a)&&--t;return t}(),n=y&&t,i=(l=D(l)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&aa(l,s,t,a,o),o.polygonEnd()),b=o,l=c=u=null}};function E(e,t){i(e,t)&&b.point(e,t)}function x(a,o){var s=i(a,o);if(c&&u.push([a,o]),v)d=a,h=o,f=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var l=[p=Math.max(pa,Math.min(fa,p)),m=Math.max(pa,Math.min(fa,m))],_=[a=Math.max(pa,Math.min(fa,a)),o=Math.max(pa,Math.min(fa,o))];!function(e,t,n,r,i,a){var o,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,h=t[1]-l;if(o=n-s,d||!(o>0)){if(o/=d,d<0){if(o<c)return;o<u&&(u=o)}else if(d>0){if(o>u)return;o>c&&(c=o)}if(o=i-s,d||!(o<0)){if(o/=d,d<0){if(o>u)return;o>c&&(c=o)}else if(d>0){if(o<c)return;o<u&&(u=o)}if(o=r-l,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<u&&(u=o)}else if(h>0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<u&&(u=o)}return c>0&&(e[0]=s+c*d,e[1]=l+c*h),u<1&&(t[0]=s+u*d,t[1]=l+u*h),!0}}}}}(l,_,e,t,n,r)?s&&(b.lineStart(),b.point(a,o),y=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(_[0],_[1]),s||b.lineEnd(),y=!1)}p=a,m=o,g=s}return w}}const ga=e=>e;var va,ya,ba,_a,wa=new u,Ea=new u,xa={point:Ii,lineStart:Ii,lineEnd:Ii,polygonStart:function(){xa.lineStart=Sa,xa.lineEnd=Ta},polygonEnd:function(){xa.lineStart=xa.lineEnd=xa.point=Ii,wa.add(Si(Ea)),Ea=new u},result:function(){var e=wa/2;return wa=new u,e}};function Sa(){xa.point=Oa}function Oa(e,t){xa.point=Ca,va=ba=e,ya=_a=t}function Ca(e,t){Ea.add(_a*e-ba*t),ba=e,_a=t}function Ta(){Ca(va,ya)}const Aa=xa;var Ma=1/0,ka=Ma,La=-Ma,Da=La;const Ra={point:function(e,t){e<Ma&&(Ma=e),e>La&&(La=e),t<ka&&(ka=t),t>Da&&(Da=t)},lineStart:Ii,lineEnd:Ii,polygonStart:Ii,polygonEnd:Ii,result:function(){var e=[[Ma,ka],[La,Da]];return La=Da=-(ka=Ma=1/0),e}};var Na,Ia,Pa,$a,Ba=0,za=0,Ua=0,ja=0,Fa=0,Va=0,Ha=0,Ga=0,Wa=0,qa={point:Za,lineStart:Ya,lineEnd:Qa,polygonStart:function(){qa.lineStart=Ja,qa.lineEnd=eo},polygonEnd:function(){qa.point=Za,qa.lineStart=Ya,qa.lineEnd=Qa},result:function(){var e=Wa?[Ha/Wa,Ga/Wa]:Va?[ja/Va,Fa/Va]:Ua?[Ba/Ua,za/Ua]:[NaN,NaN];return Ba=za=Ua=ja=Fa=Va=Ha=Ga=Wa=0,e}};function Za(e,t){Ba+=e,za+=t,++Ua}function Ya(){qa.point=Ka}function Ka(e,t){qa.point=Xa,Za(Pa=e,$a=t)}function Xa(e,t){var n=e-Pa,r=t-$a,i=Di(n*n+r*r);ja+=i*(Pa+e)/2,Fa+=i*($a+t)/2,Va+=i,Za(Pa=e,$a=t)}function Qa(){qa.point=Za}function Ja(){qa.point=to}function eo(){no(Na,Ia)}function to(e,t){qa.point=no,Za(Na=Pa=e,Ia=$a=t)}function no(e,t){var n=e-Pa,r=t-$a,i=Di(n*n+r*r);ja+=i*(Pa+e)/2,Fa+=i*($a+t)/2,Va+=i,Ha+=(i=$a*e-Pa*t)*(Pa+e),Ga+=i*($a+t),Wa+=3*i,Za(Pa=e,$a=t)}const ro=qa;function io(e){this._context=e}io.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,wi)}},result:Ii};var ao,oo,so,lo,co,uo=new u,ho={point:Ii,lineStart:function(){ho.point=fo},lineEnd:function(){ao&&po(oo,so),ho.point=Ii},polygonStart:function(){ao=!0},polygonEnd:function(){ao=null},result:function(){var e=+uo;return uo=new u,e}};function fo(e,t){ho.point=po,oo=lo=e,so=co=t}function po(e,t){lo-=e,co-=t,uo.add(Di(lo*lo+co*co)),lo=e,co=t}const mo=ho;let go,vo,yo,bo;class _o{constructor(e){this._append=null==e?wo:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return wo;if(t!==go){const e=10**t;go=t,vo=function(t){let n=1;this._+=t[0];for(const r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return vo}(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==yo||this._append!==vo){const e=this._radius,t=this._;this._="",this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,yo=e,vo=this._append,bo=this._,this._=t}this._+=bo}}result(){const e=this._;return this._="",e.length?e:null}}function wo(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Eo(e){return function(t){var n=new xo;for(var r in e)n[r]=e[r];return n.stream=t,n}}function xo(){}function So(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),ji(n,e.stream(Ra)),t(Ra.result()),null!=r&&e.clipExtent(r),e}function Oo(e,t,n){return So(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}xo.prototype={constructor:xo,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Co=16,To=Ti(30*xi);function Ao(e,t){return+t?function(e,t){function n(r,i,a,o,s,l,c,u,d,h,f,p,m,g){var v=c-r,y=u-i,b=v*v+y*y;if(b>4*t&&m--){var _=o+h,w=s+f,E=l+p,x=Di(_*_+w*w+E*E),S=Ni(E/=x),O=Si(Si(E)-1)<gi||Si(a-d)<gi?(a+d)/2:Ci(w,_),C=e(O,S),T=C[0],A=C[1],M=T-r,k=A-i,L=y*M-v*k;(L*L/b>t||Si((v*M+y*k)/b-.5)>.3||o*h+s*f+l*p<To)&&(n(r,i,a,o,s,l,T,A,O,_/=x,w/=x,E,m,g),g.point(T,A),n(T,A,O,_,w,E,c,u,d,h,f,p,m,g))}}return function(t){var r,i,a,o,s,l,c,u,d,h,f,p,m={point:g,lineStart:v,lineEnd:b,polygonStart:function(){t.polygonStart(),m.lineStart=_},polygonEnd:function(){t.polygonEnd(),m.lineStart=v}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){u=NaN,m.point=y,t.lineStart()}function y(r,i){var a=Vi([r,i]),o=e(r,i);n(u,d,c,h,f,p,u=o[0],d=o[1],c=r,h=a[0],f=a[1],p=a[2],Co,t),t.point(u,d)}function b(){m.point=g,t.lineEnd()}function _(){v(),m.point=w,m.lineEnd=E}function w(e,t){y(r=e,t),i=u,a=d,o=h,s=f,l=p,m.point=y}function E(){n(u,d,c,h,f,p,i,a,r,o,s,l,Co,t),m.lineEnd=b,b()}return m}}(e,t):function(e){return Eo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var Mo=Eo({point:function(e,t){this.stream.point(e*xi,t*xi)}});function ko(e,t,n,r,i,a){if(!a)return function(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}(e,t,n,r,i);var o=Ti(a),s=ki(a),l=o*e,c=s*e,u=o/e,d=s/e,h=(s*n-o*t)/e,f=(s*t+o*n)/e;function p(e,a){return[l*(e*=r)-c*(a*=i)+t,n-c*e-l*a]}return p.invert=function(e,t){return[r*(u*e-d*t+h),i*(f-d*e-u*t)]},p}function Lo(e){return Do((function(){return e}))()}function Do(e){var t,n,r,i,a,o,s,l,c,u,d=150,h=480,f=250,p=0,m=0,g=0,v=0,y=0,b=0,_=1,w=1,E=null,x=da,S=null,O=ga,C=.5;function T(e){return l(e[0]*xi,e[1]*xi)}function A(e){return(e=l.invert(e[0],e[1]))&&[e[0]*Ei,e[1]*Ei]}function M(){var e=ko(d,0,0,_,w,b).apply(null,t(p,m)),r=ko(d,h-e[0],f-e[1],_,w,b);return n=Xi(g,v,y),s=Yi(t,r),l=Yi(n,s),o=Ao(s,C),k()}function k(){return c=u=null,T}return T.stream=function(e){return c&&u===e?c:c=Mo(function(e){return Eo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(x(o(O(u=e)))))},T.preclip=function(e){return arguments.length?(x=e,E=void 0,k()):x},T.postclip=function(e){return arguments.length?(O=e,S=r=i=a=null,k()):O},T.clipAngle=function(e){return arguments.length?(x=+e?ha(E=e*xi):(E=null,da),k()):E*Ei},T.clipExtent=function(e){return arguments.length?(O=null==e?(S=r=i=a=null,ga):ma(S=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),k()):null==S?null:[[S,r],[i,a]]},T.scale=function(e){return arguments.length?(d=+e,M()):d},T.translate=function(e){return arguments.length?(h=+e[0],f=+e[1],M()):[h,f]},T.center=function(e){return arguments.length?(p=e[0]%360*xi,m=e[1]%360*xi,M()):[p*Ei,m*Ei]},T.rotate=function(e){return arguments.length?(g=e[0]%360*xi,v=e[1]%360*xi,y=e.length>2?e[2]%360*xi:0,M()):[g*Ei,v*Ei,y*Ei]},T.angle=function(e){return arguments.length?(b=e%360*xi,M()):b*Ei},T.reflectX=function(e){return arguments.length?(_=e?-1:1,M()):_<0},T.reflectY=function(e){return arguments.length?(w=e?-1:1,M()):w<0},T.precision=function(e){return arguments.length?(o=Ao(s,C=e*e),k()):Di(C)},T.fitExtent=function(e,t){return Oo(T,e,t)},T.fitSize=function(e,t){return function(e,t,n){return Oo(e,[[0,0],t],n)}(T,e,t)},T.fitWidth=function(e,t){return function(e,t,n){return So(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}(T,e,t)},T.fitHeight=function(e,t){return function(e,t,n){return So(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&A,M()}}function Ro(e){var t=0,n=yi/3,r=Do(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*xi,n=e[1]*xi):[t*Ei,n*Ei]},i}function No(e,t){var n=ki(e),r=(n+ki(t))/2;if(Si(r)<gi)return function(e){var t=Ti(e);function n(e,n){return[e*t,ki(n)/t]}return n.invert=function(e,n){return[e/t,Ni(n*t)]},n}(e);var i=1+n*(2*r-n),a=Di(i)/r;function o(e,t){var n=Di(i-2*r*ki(t))/r;return[n*ki(e*=r),a-n*Ti(e)]}return o.invert=function(e,t){var n=a-t,o=Ci(e,Si(n))*Li(n);return n*r<0&&(o-=yi*Li(e)*Li(n)),[o/r,Ni((i-(e*e+n*n)*r*r)/(2*r))]},o}function Io(){return Ro(No).scale(155.424).center([0,33.6442])}function Po(e,t){return[e,Mi(Ri((bi+t)/2))]}function $o(){return function(e){var t,n,r,i=Lo(e),a=i.center,o=i.scale,s=i.translate,l=i.clipExtent,c=null;function u(){var a=yi*o(),s=i(function(e){function t(t){return(t=e(t[0]*xi,t[1]*xi))[0]*=Ei,t[1]*=Ei,t}return e=Xi(e[0]*xi,e[1]*xi,e.length>2?e[2]*xi:0),t.invert=function(t){return(t=e.invert(t[0]*xi,t[1]*xi))[0]*=Ei,t[1]*=Ei,t},t}(i.rotate()).invert([0,0]));return l(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:e===Po?[[Math.max(s[0]-a,c),t],[Math.min(s[0]+a,n),r]]:[[c,Math.max(s[1]-a,t)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(e){return arguments.length?(o(e),u()):o()},i.translate=function(e){return arguments.length?(s(e),u()):s()},i.center=function(e){return arguments.length?(a(e),u()):a()},i.clipExtent=function(e){return arguments.length?(null==e?c=t=n=r=null:(c=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),u()):null==c?null:[[c,t],[n,r]]},u()}(Po).scale(961/wi)}function Bo(e,t){return[e,t]}function zo(e,t){var n=Ti(e),r=e===t?ki(e):(n-Ti(t))/(t-e),i=n/r+e;if(Si(r)<gi)return Bo;function a(e,t){var n=i-t,a=r*e;return[n*ki(a),i-n*Ti(a)]}return a.invert=function(e,t){var n=i-t,a=Ci(e,Si(n))*Li(n);return n*r<0&&(a-=yi*Li(e)*Li(n)),[a/r,i-Li(r)*Di(e*e+n*n)]},a}Po.invert=function(e,t){return[e,2*Oi(Ai(t))-bi]},Bo.invert=Bo;var Uo=1.340264,jo=-.081106,Fo=893e-6,Vo=.003796,Ho=Di(3)/2;function Go(e,t){var n=Ni(Ho*ki(t)),r=n*n,i=r*r*r;return[e*Ti(n)/(Ho*(Uo+3*jo*r+i*(7*Fo+9*Vo*r))),n*(Uo+jo*r+i*(Fo+Vo*r))]}function Wo(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function qo(e,t){return e.parent===t.parent?1:2}function Zo(e,t){return e+t.x}function Yo(e,t){return Math.max(e,t.y)}function Ko(){var e=qo,t=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(Zo,0)/e.length}(n),t.y=function(e){return 1+e.reduce(Yo,0)}(n)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=s.x-e(s,l)/2,u=l.x+e(l,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function Xo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Qo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=es)):void 0===t&&(t=Jo);for(var n,r,i,a,o,s=new rs(e),l=[s];n=l.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)l.push(r=i[a]=new rs(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(ns)}function Jo(e){return e.children}function es(e){return Array.isArray(e)?e[1]:null}function ts(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function ns(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function rs(e){this.data=e,this.depth=this.height=0,this.parent=null}function is(e){if("function"!=typeof e)throw new Error;return e}function as(){return 0}function os(e){return function(){return e}}Go.invert=function(e,t){for(var n,r=t,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Uo+jo*i+a*(Fo+Vo*i))-t)/(Uo+3*jo*i+a*(7*Fo+9*Vo*i)))*r)*i*i,!(Si(n)<vi));++o);return[Ho*e*(Uo+3*jo*i+a*(7*Fo+9*Vo*i))/Ti(r),Ni(ki(r)/Ho)]},Wo.invert=function(e,t){var n,r=t,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-t)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Si(n)>gi&&--i>0);return[e/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},rs.prototype=Qo.prototype={constructor:rs,count:function(){return this.eachAfter(Xo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)e.call(t,a,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,a=[i],o=-1;i=a.pop();)if(e.call(t,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Qo(this).eachBefore(ts)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}};const ss=1664525,ls=1013904223,cs=4294967296;function us(e,t){var n,r;if(fs(t,e))return[t];for(n=0;n<e.length;++n)if(ds(t,e[n])&&fs(ms(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(ds(ms(e[n],e[r]),t)&&ds(ms(e[n],t),e[r])&&ds(ms(e[r],t),e[n])&&fs(gs(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function ds(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function hs(e,t){var n=e.r-t.r+1e-9*Math.max(e.r,t.r,1),r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function fs(e,t){for(var n=0;n<t.length;++n)if(!hs(e,t[n]))return!1;return!0}function ps(e){switch(e.length){case 1:return function(e){return{x:e.x,y:e.y,r:e.r}}(e[0]);case 2:return ms(e[0],e[1]);case 3:return gs(e[0],e[1],e[2])}}function ms(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,l=a-n,c=o-r,u=s-i,d=Math.sqrt(l*l+c*c);return{x:(n+a+l/d*u)/2,y:(r+o+c/d*u)/2,r:(d+i+s)/2}}function gs(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-o,f=r-c,p=i-s,m=i-u,g=l-a,v=d-a,y=r*r+i*i-a*a,b=y-o*o-s*s+l*l,_=y-c*c-u*u+d*d,w=f*p-h*m,E=(p*_-m*b)/(2*w)-r,x=(m*g-p*v)/w,S=(f*b-h*_)/(2*w)-i,O=(h*v-f*g)/w,C=x*x+O*O-1,T=2*(a+E*x+S*O),A=E*E+S*S-a*a,M=-(Math.abs(C)>1e-6?(T+Math.sqrt(T*T-4*C*A))/(2*C):A/T);return{x:r+E+x*M,y:i+S+O*M,r:M}}function vs(e,t,n){var r,i,a,o,s=e.x-t.x,l=e.y-t.y,c=s*s+l*l;c?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=e.x-r*s-a*l,n.y=e.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*s-a*l,n.y=t.y+r*l+a*s)):(n.x=t.x+n.r,n.y=t.y)}function ys(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function bs(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function _s(e){this._=e,this.next=null,this.previous=null}function ws(e,t){if(!(a=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,r,i,a,o,s,l,c,u,d,h;if((n=e[0]).x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;vs(r,n,i=e[2]),n=new _s(n),r=new _s(r),i=new _s(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(l=3;l<a;++l){vs(n._,r._,i=e[l]),i=new _s(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do{if(d<=h){if(ys(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue e}d+=c._.r,c=c.next}else{if(ys(u._,i._)){(n=u).next=r,r.previous=n,--l;continue e}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=bs(n);(i=i.next)!==r;)(s=bs(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=function(e,t){for(var n,r,i=0,a=(e=function(e,t){let n,r,i=e.length;for(;i;)r=t()*i--|0,n=e[i],e[i]=e[r],e[r]=n;return e}(Array.from(e),t)).length,o=[];i<a;)n=e[i],r&&hs(r,n)?++i:(r=ps(o=us(o,n)),i=0);return r}(n,t),l=0;l<a;++l)(n=e[l]).x-=i.x,n.y-=i.y;return i.r}function Es(e){return Math.sqrt(e.value)}function xs(){var e=null,t=1,n=1,r=as;function i(i){const a=function(){let e=1;return()=>(e=(ss*e+ls)%cs)/cs}();return i.x=t/2,i.y=n/2,e?i.eachBefore(Ss(e)).eachAfter(Os(r,.5,a)).eachBefore(Cs(1)):i.eachBefore(Ss(Es)).eachAfter(Os(as,1,a)).eachAfter(Os(r,i.r/Math.min(t,n),a)).eachBefore(Cs(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:is(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:os(+e),i):r},i}function Ss(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Os(e,t,n){return function(r){if(i=r.children){var i,a,o,s=i.length,l=e(r)*t||0;if(l)for(a=0;a<s;++a)i[a].r+=l;if(o=ws(i,n),l)for(a=0;a<s;++a)i[a].r-=l;r.r=o+l}}}function Cs(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Ts(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function As(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,c=e.value&&(r-t)/e.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function Ms(e,t){return e.parent===t.parent?1:2}function ks(e){var t=e.children;return t?t[0]:e.t}function Ls(e){var t=e.children;return t?t[t.length-1]:e.t}function Ds(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Rs(e,t,n){return e.a.parent===t.parent?e.a:n}function Ns(e,t){this._=e,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=t}function Is(){var e=Ms,t=1,n=1,r=null;function i(i){var l=function(e){for(var t,n,r,i,a,o=new Ns(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new Ns(r[i],i)),n.parent=t;return(o.parent=new Ns(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),r)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.x<c.x&&(c=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)}));var h=c===u?1:e(c,u)/2,f=h-c.x,p=t/(u.x+h+f),m=n/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+f)*p,e.y=e.depth*m}))}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,a=t,o=t,s=n,l=a.parent.children[0],c=a.m,u=o.m,d=s.m,h=l.m;s=Ls(s),a=ks(a),s&&a;)l=ks(l),(o=Ls(o)).a=t,(i=s.z+d-a.z-c+e(s._,a._))>0&&(Ds(Rs(s,t,r),t,i),c+=i,u+=i),d+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!Ls(o)&&(o.t=s,o.m+=d-u),a&&!ks(l)&&(l.t=a,l.m+=c-h,r=t)}return r}(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function Ps(e,t,n,r,i){for(var a,o=e.children,s=-1,l=o.length,c=e.value&&(i-n)/e.value;++s<l;)(a=o[s]).x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Ns.prototype=Object.create(rs.prototype);const $s=function e(t){function n(e,n,r,i,a){!function(e,t,n,r,i,a){for(var o,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,_=0,w=y.length,E=t.value;b<w;){l=i-n,c=a-r;do{u=y[_++].value}while(!u&&_<w);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(E*e)),p=Math.max(h/g,g/d);_<w;++_){if(u+=s=y[_].value,s<d&&(d=s),s>h&&(h=s),g=u*u*m,(f=Math.max(h/g,g/d))>p){u-=s;break}p=f}v.push(o={value:u,dice:l<c,children:y.slice(b,_)}),o.dice?As(o,n,r,i,E?r+=c*u/E:a):Ps(o,n,r,E?n+=l*u/E:i,a),E-=u,b=_}}(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2);function Bs(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const zs=Symbol("implicit");function Us(){var e=new d,t=[],n=[],r=zs;function i(i){let a=e.get(i);if(void 0===a){if(r!==zs)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new d;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Us(t,n).unknown(r)},Bs.apply(i,arguments),i}function js(){var e,t,n=Us().unknown(void 0),r=n.domain,i=n.range,a=0,o=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=o<a,h=d?o:a,f=d?a:o;e=(f-h)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),h+=(f-h-e*(n-l))*u,t=e*(1-l),s&&(h=Math.round(h),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}(n).map((function(t){return h+e*t}));return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([a,o]=e,a=+a,o=+o,d()):[a,o]},n.rangeRound=function(e){return[a,o]=e,a=+a,o=+o,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return js(r(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(u)},Bs.apply(d(),arguments)}function Fs(e){return+e}var Vs=[0,1];function Hs(e){return e}function Gs(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Ws(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Gs(i,r),a=n(o,a)):(r=Gs(r,i),a=n(a,o)),function(e){return a(r(e))}}function qs(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Gs(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=l(e,t,1,r)-1;return a[n](i[n](t))}}function Zs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ys(){var e,t,n,r,i,a,o=Vs,s=Vs,l=un,c=Hs;function u(){var e=Math.min(o.length,s.length);return c!==Hs&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?qs:Ws,i=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,o.map(e),an)))(n)))},d.domain=function(e){return arguments.length?(o=Array.from(e,Fs),u()):o.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=dn,u()},d.clamp=function(e){return arguments.length?(c=!!e||Hs,u()):c!==Hs},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Ks(){return Ys()(Hs,Hs)}function Xs(e,t,n,r){var i,a=S(e,t,n);switch((r=ai(r??",f")).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ni(t)/3)))-ni(Math.abs(e)))}(a,o))&&(r.precision=i),hi(r,o);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ni(t)-ni(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(i=function(e){return Math.max(0,-ni(Math.abs(e)))}(a))&&(r.precision=i-2*("%"===r.type))}return di(r)}function Qs(e){var t=e.domain;return e.ticks=function(e){var n=t();return E(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Xs(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,a=t(),o=0,s=a.length-1,l=a[o],c=a[s],u=10;for(c<l&&(i=l,l=c,c=i,i=o,o=s,s=i);u-- >0;){if((i=x(l,c,n))===r)return a[o]=l,a[s]=c,t(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Js(){var e=Ks();return e.copy=function(){return Zs(e,Js())},Bs.apply(e,arguments),Qs(e)}function el(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),e[r]=t.floor(a),e[i]=t.ceil(o),e}function tl(e){return Math.log(e)}function nl(e){return Math.exp(e)}function rl(e){return-Math.log(-e)}function il(e){return-Math.exp(-e)}function al(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ol(e){return(t,n)=>-e(-t,n)}function sl(e){const t=e(tl,nl),n=t.domain;let r,i,a=10;function o(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),i=function(e){return 10===e?al:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=ol(r),i=ol(i),e(rl,il)):e(tl,nl),t}return t.base=function(e){return arguments.length?(a=+e,o()):a},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{const t=n();let o=t[0],s=t[t.length-1];const l=s<o;l&&([o,s]=[s,o]);let c,u,d=r(o),h=r(s);const f=null==e?10:+e;let p=[];if(!(a%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),o>0){for(;d<=h;++d)for(c=1;c<a;++c)if(u=d<0?c/i(-d):c*i(d),!(u<o)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=a-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<o)){if(u>s)break;p.push(u)}2*p.length<f&&(p=E(o,s,f))}else p=E(d,h,Math.min(h-d,f)).map(i);return l?p.reverse():p},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(!(a%1)&&null==(n=ai(n)).precision&&(n.trim=!0),n=di(n)),e===1/0)return n;const o=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*a<a-.5&&(t*=a),t<=o?n(e):""}},t.nice=()=>n(el(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function ll(){const e=sl(Ys()).domain([1,10]);return e.copy=()=>Zs(e,ll()).base(e.base()),Bs.apply(e,arguments),e}function cl(){var e,t=0,n=1,r=1,i=[.5],a=[0,1];function o(t){return null!=t&&t<=t?a[l(i,t,0,r)]:e}function s(){var e=-1;for(i=new Array(r);++e<r;)i[e]=((e+1)*n-(e-r)*t)/(r+1);return o}return o.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},o.range=function(e){return arguments.length?(r=(a=Array.from(e)).length-1,s()):a.slice()},o.invertExtent=function(e){var o=a.indexOf(e);return o<0?[NaN,NaN]:o<1?[t,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(t){return arguments.length&&(e=t),o},o.thresholds=function(){return i.slice()},o.copy=function(){return cl().domain([t,n]).range(a).unknown(e)},Bs.apply(Qs(o),arguments)}const ul=new Date,dl=new Date;function hl(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,a)=>{const o=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return o;let s;do{o.push(s=new Date(+n)),t(n,a),e(n)}while(s<n&&n<r);return o},i.filter=n=>hl((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(ul.setTime(+t),dl.setTime(+r),e(ul),e(dl),Math.floor(n(ul,dl))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const fl=hl((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));fl.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?hl((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):fl:null),fl.range;const pl=1e3,ml=6e4,gl=60*ml,vl=24*gl,yl=7*vl,bl=30*vl,_l=365*vl,wl=hl((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*pl)}),((e,t)=>(t-e)/pl),(e=>e.getUTCSeconds()));wl.range;const El=hl((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pl)}),((e,t)=>{e.setTime(+e+t*ml)}),((e,t)=>(t-e)/ml),(e=>e.getMinutes()));El.range,hl((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*ml)}),((e,t)=>(t-e)/ml),(e=>e.getUTCMinutes())).range;const xl=hl((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pl-e.getMinutes()*ml)}),((e,t)=>{e.setTime(+e+t*gl)}),((e,t)=>(t-e)/gl),(e=>e.getHours()));xl.range,hl((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*gl)}),((e,t)=>(t-e)/gl),(e=>e.getUTCHours())).range;const Sl=hl((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ml)/vl),(e=>e.getDate()-1));Sl.range;const Ol=hl((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/vl),(e=>e.getUTCDate()-1));function Cl(e){return hl((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ml)/yl))}Ol.range,hl((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/vl),(e=>Math.floor(e/vl))).range;const Tl=Cl(0),Al=Cl(1),Ml=Cl(2),kl=Cl(3),Ll=Cl(4),Dl=Cl(5),Rl=Cl(6);function Nl(e){return hl((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/yl))}Tl.range,Al.range,Ml.range,kl.range,Ll.range,Dl.range,Rl.range;const Il=Nl(0),Pl=Nl(1),$l=Nl(2),Bl=Nl(3),zl=Nl(4),Ul=Nl(5),jl=Nl(6);Il.range,Pl.range,$l.range,Bl.range,zl.range,Ul.range,jl.range;const Fl=hl((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Fl.range,hl((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())).range;const Vl=hl((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));Vl.every=e=>isFinite(e=Math.floor(e))&&e>0?hl((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,Vl.range;const Hl=hl((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Hl.every=e=>isFinite(e=Math.floor(e))&&e>0?hl((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Hl.range;const[Gl,Wl]=function(e,t,n,r,i,o){const s=[[wl,1,pl],[wl,5,5e3],[wl,15,15e3],[wl,30,3e4],[o,1,ml],[o,5,5*ml],[o,15,15*ml],[o,30,30*ml],[i,1,gl],[i,3,3*gl],[i,6,6*gl],[i,12,12*gl],[r,1,vl],[r,2,2*vl],[n,1,yl],[t,1,bl],[t,3,3*bl],[e,1,_l]];function l(t,n,r){const i=Math.abs(n-t)/r,o=a((([,,e])=>e)).right(s,i);if(o===s.length)return e.every(S(t/_l,n/_l,r));if(0===o)return fl.every(Math.max(S(t,n,r),1));const[l,c]=s[i/s[o-1][2]<s[o][2]/i?o-1:o];return l.every(c)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:l(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a},l]}(Vl,Fl,Tl,Sl,xl,El);function ql(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Zl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Yl(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Kl,Xl,Ql={"-":"",_:" ",0:"0"},Jl=/^\s*\d+/,ec=/^%/,tc=/[\\^$*+?|[\]().{}]/g;function nc(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function rc(e){return e.replace(tc,"\\$&")}function ic(e){return new RegExp("^(?:"+e.map(rc).join("|")+")","i")}function ac(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function oc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function cc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function uc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function dc(e,t,n){var r=Jl.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function fc(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function pc(e,t,n){var r=Jl.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function mc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function gc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vc(e,t,n){var r=Jl.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function yc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function bc(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _c(e,t,n){var r=Jl.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wc(e,t,n){var r=Jl.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ec(e,t,n){var r=Jl.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function xc(e,t,n){var r=ec.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Sc(e,t,n){var r=Jl.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Oc(e,t,n){var r=Jl.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Cc(e,t){return nc(e.getDate(),t,2)}function Tc(e,t){return nc(e.getHours(),t,2)}function Ac(e,t){return nc(e.getHours()%12||12,t,2)}function Mc(e,t){return nc(1+Sl.count(Vl(e),e),t,3)}function kc(e,t){return nc(e.getMilliseconds(),t,3)}function Lc(e,t){return kc(e,t)+"000"}function Dc(e,t){return nc(e.getMonth()+1,t,2)}function Rc(e,t){return nc(e.getMinutes(),t,2)}function Nc(e,t){return nc(e.getSeconds(),t,2)}function Ic(e){var t=e.getDay();return 0===t?7:t}function Pc(e,t){return nc(Tl.count(Vl(e)-1,e),t,2)}function $c(e){var t=e.getDay();return t>=4||0===t?Ll(e):Ll.ceil(e)}function Bc(e,t){return e=$c(e),nc(Ll.count(Vl(e),e)+(4===Vl(e).getDay()),t,2)}function zc(e){return e.getDay()}function Uc(e,t){return nc(Al.count(Vl(e)-1,e),t,2)}function jc(e,t){return nc(e.getFullYear()%100,t,2)}function Fc(e,t){return nc((e=$c(e)).getFullYear()%100,t,2)}function Vc(e,t){return nc(e.getFullYear()%1e4,t,4)}function Hc(e,t){var n=e.getDay();return nc((e=n>=4||0===n?Ll(e):Ll.ceil(e)).getFullYear()%1e4,t,4)}function Gc(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nc(t/60|0,"0",2)+nc(t%60,"0",2)}function Wc(e,t){return nc(e.getUTCDate(),t,2)}function qc(e,t){return nc(e.getUTCHours(),t,2)}function Zc(e,t){return nc(e.getUTCHours()%12||12,t,2)}function Yc(e,t){return nc(1+Ol.count(Hl(e),e),t,3)}function Kc(e,t){return nc(e.getUTCMilliseconds(),t,3)}function Xc(e,t){return Kc(e,t)+"000"}function Qc(e,t){return nc(e.getUTCMonth()+1,t,2)}function Jc(e,t){return nc(e.getUTCMinutes(),t,2)}function eu(e,t){return nc(e.getUTCSeconds(),t,2)}function tu(e){var t=e.getUTCDay();return 0===t?7:t}function nu(e,t){return nc(Il.count(Hl(e)-1,e),t,2)}function ru(e){var t=e.getUTCDay();return t>=4||0===t?zl(e):zl.ceil(e)}function iu(e,t){return e=ru(e),nc(zl.count(Hl(e),e)+(4===Hl(e).getUTCDay()),t,2)}function au(e){return e.getUTCDay()}function ou(e,t){return nc(Pl.count(Hl(e)-1,e),t,2)}function su(e,t){return nc(e.getUTCFullYear()%100,t,2)}function lu(e,t){return nc((e=ru(e)).getUTCFullYear()%100,t,2)}function cu(e,t){return nc(e.getUTCFullYear()%1e4,t,4)}function uu(e,t){var n=e.getUTCDay();return nc((e=n>=4||0===n?zl(e):zl.ceil(e)).getUTCFullYear()%1e4,t,4)}function du(){return"+0000"}function hu(){return"%"}function fu(e){return+e}function pu(e){return Math.floor(+e/1e3)}function mu(e){return new Date(e)}function gu(e){return e instanceof Date?+e:+new Date(+e)}function vu(e,t,n,r,i,a,o,s,l,c){var u=Ks(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),_=c("%Y");function w(e){return(l(e)<e?f:s(e)<e?p:o(e)<e?m:a(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:_)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,gu)):h().map(mu)},u.ticks=function(t){var n=h();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=h();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?h(el(n,e)):u},u.copy=function(){return Zs(u,vu(e,t,n,r,i,a,o,s,l,c))},u}function yu(){return Bs.apply(vu(Gl,Wl,Vl,Fl,Tl,Sl,xl,El,wl,Xl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bu(e){return function(){return e}}!function(e){Kl=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=ic(i),u=ac(i),d=ic(a),h=ac(a),f=ic(o),p=ac(o),m=ic(s),g=ac(s),v=ic(l),y=ac(l),b={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Cc,e:Cc,f:Lc,g:Fc,G:Hc,H:Tc,I:Ac,j:Mc,L:kc,m:Dc,M:Rc,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:fu,s:pu,S:Nc,u:Ic,U:Pc,V:Bc,w:zc,W:Uc,x:null,X:null,y:jc,Y:Vc,Z:Gc,"%":hu},_={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Wc,e:Wc,f:Xc,g:lu,G:uu,H:qc,I:Zc,j:Yc,L:Kc,m:Qc,M:Jc,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:fu,s:pu,S:eu,u:tu,U:nu,V:iu,w:au,W:ou,x:null,X:null,y:su,Y:cu,Z:du,"%":hu},w={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:gc,e:gc,f:Ec,g:hc,G:dc,H:yc,I:yc,j:vc,L:wc,m:mc,M:bc,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:pc,Q:Sc,s:Oc,S:_c,u:sc,U:lc,V:cc,w:oc,W:uc,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:hc,Y:dc,Z:fc,"%":xc};function E(e,t){return function(n){var r,i,a,o=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(o.push(e.slice(l,s)),null!=(i=Ql[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(a=t[r])&&(r=a(n,i)),o.push(r),l=s+1);return o.push(e.slice(l,s)),o.join("")}}function x(e,t){return function(n){var r,i,a=Yl(1900,void 0,1);if(S(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Zl(Yl(a.y,0,1))).getUTCDay(),r=i>4||0===i?Pl.ceil(r):Pl(r),r=Ol.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=ql(Yl(a.y,0,1))).getDay(),r=i>4||0===i?Al.ceil(r):Al(r),r=Sl.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Zl(Yl(a.y,0,1)).getUTCDay():ql(Yl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Zl(a)):ql(a)}}function S(e,t,n,r){for(var i,a,o=0,s=t.length,l=n.length;o<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=w[i in Ql?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),_.x=E(n,_),_.X=E(r,_),_.c=E(t,_),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}(e),Xl=Kl.format,Kl.parse,Kl.utcFormat,Kl.utcParse}({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"]});const _u=Math.abs,wu=Math.atan2,Eu=Math.cos,xu=Math.max,Su=Math.min,Ou=Math.sin,Cu=Math.sqrt,Tu=1e-12,Au=Math.PI,Mu=Au/2,ku=2*Au;function Lu(e){return e>=1?Mu:e<=-1?-Mu:Math.asin(e)}function Du(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ei(t)}function Ru(e){return e.innerRadius}function Nu(e){return e.outerRadius}function Iu(e){return e.startAngle}function Pu(e){return e.endAngle}function $u(e){return e&&e.padAngle}function Bu(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/Cu(s*s+l*l),u=c*l,d=-c*s,h=e+u,f=t+d,p=n+u,m=r+d,g=(h+p)/2,v=(f+m)/2,y=p-h,b=m-f,_=y*y+b*b,w=i-a,E=h*m-p*f,x=(b<0?-1:1)*Cu(xu(0,w*w*_-E*E)),S=(E*b-y*x)/_,O=(-E*y-b*x)/_,C=(E*b+y*x)/_,T=(-E*y+b*x)/_,A=S-g,M=O-v,k=C-g,L=T-v;return A*A+M*M>k*k+L*L&&(S=C,O=T),{cx:S,cy:O,x01:-u,y01:-d,x11:S*(i/w-1),y11:O*(i/w-1)}}function zu(){var e=Ru,t=Nu,n=bu(0),r=null,i=Iu,a=Pu,o=$u,s=null,l=Du(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-Mu,p=a.apply(this,arguments)-Mu,m=_u(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>Tu)if(m>ku-Tu)s.moveTo(h*Eu(f),h*Ou(f)),s.arc(0,0,h,f,p,!g),d>Tu&&(s.moveTo(d*Eu(p),d*Ou(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,_=p,w=f,E=p,x=m,S=m,O=o.apply(this,arguments)/2,C=O>Tu&&(r?+r.apply(this,arguments):Cu(d*d+h*h)),T=Su(_u(h-d)/2,+n.apply(this,arguments)),A=T,M=T;if(C>Tu){var k=Lu(C/d*Ou(O)),L=Lu(C/h*Ou(O));(x-=2*k)>Tu?(w+=k*=g?1:-1,E-=k):(x=0,w=E=(f+p)/2),(S-=2*L)>Tu?(b+=L*=g?1:-1,_-=L):(S=0,b=_=(f+p)/2)}var D=h*Eu(b),R=h*Ou(b),N=d*Eu(E),I=d*Ou(E);if(T>Tu){var P,$=h*Eu(_),B=h*Ou(_),z=d*Eu(w),U=d*Ou(w);if(m<Au)if(P=function(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,d=s-a,h=d*l-u*c;if(!(h*h<Tu))return[e+(h=(u*(t-a)-d*(e-i))/h)*l,t+h*c]}(D,R,z,U,$,B,N,I)){var j=D-P[0],F=R-P[1],V=$-P[0],H=B-P[1],G=1/Ou(function(e){return e>1?0:e<-1?Au:Math.acos(e)}((j*V+F*H)/(Cu(j*j+F*F)*Cu(V*V+H*H)))/2),W=Cu(P[0]*P[0]+P[1]*P[1]);A=Su(T,(d-W)/(G-1)),M=Su(T,(h-W)/(G+1))}else A=M=0}S>Tu?M>Tu?(v=Bu(z,U,D,R,h,M,g),y=Bu($,B,N,I,h,M,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,wu(v.y01,v.x01),wu(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,M,wu(v.y01,v.x01),wu(v.y11,v.x11),!g),s.arc(0,0,h,wu(v.cy+v.y11,v.cx+v.x11),wu(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,M,wu(y.y11,y.x11),wu(y.y01,y.x01),!g))):(s.moveTo(D,R),s.arc(0,0,h,b,_,!g)):s.moveTo(D,R),d>Tu&&x>Tu?A>Tu?(v=Bu(N,I,$,B,d,-A,g),y=Bu(D,R,z,U,d,-A,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,wu(v.y01,v.x01),wu(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,A,wu(v.y01,v.x01),wu(v.y11,v.x11),!g),s.arc(0,0,d,wu(v.cy+v.y11,v.cx+v.x11),wu(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,A,wu(y.y11,y.x11),wu(y.y01,y.x01),!g))):s.arc(0,0,d,E,w,g):s.lineTo(N,I)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Au/2;return[Eu(r)*n,Ou(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:bu(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:bu(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),c):i},c.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:bu(+e),c):a},c.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:bu(+e),c):o},c.context=function(e){return arguments.length?(s=e??null,c):s},c}var Uu=Array.prototype.slice;function ju(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Fu(e){this._context=e}function Vu(e){return new Fu(e)}function Hu(e){return e[0]}function Gu(e){return e[1]}function Wu(e,t){var n=bu(!0),r=null,i=Vu,a=null,o=Du(s);function s(s){var l,c,u,d=(s=ju(s)).length,h=!1;for(null==r&&(a=i(u=o())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(c,l,s),+t(c,l,s));if(u)return a=null,u+""||null}return e="function"==typeof e?e:void 0===e?Hu:bu(e),t="function"==typeof t?t:void 0===t?Gu:bu(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:bu(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=a=null:a=i(r=e),s):r},s}function qu(e,t,n){var r=null,i=bu(!0),a=null,o=Vu,s=null,l=Du(c);function c(c){var u,d,h,f,p,m=(c=ju(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==a&&(s=o(p=l())),u=0;u<=m;++u){if(!(u<m&&i(f=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=d;--h)s.point(v[h],y[h]);s.lineEnd(),s.areaEnd()}g&&(v[u]=+e(f,u,c),y[u]=+t(f,u,c),s.point(r?+r(f,u,c):v[u],n?+n(f,u,c):y[u]))}if(p)return s=null,p+""||null}function u(){return Wu().defined(i).curve(o).context(a)}return e="function"==typeof e?e:void 0===e?Hu:bu(+e),t="function"==typeof t?t:bu(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Gu:bu(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:bu(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:bu(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:bu(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:bu(!!e),c):i},c.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),c):o},c.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),c):a},c}function Zu(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Yu(e){return e}Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Ku=Qu(Vu);function Xu(e){this._curve=e}function Qu(e){function t(t){return new Xu(e(t))}return t._curve=e,t}function Ju(){return function(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(Qu(e)):t()._curve},e}(Wu().curve(Ku))}Xu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};class ed{constructor(e,t){this._context=e,this._x=t}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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function td(e){return new ed(e,!0)}function nd(e){return e.source}function rd(e){return e.target}function id(){return function(e){let t=nd,n=rd,r=Hu,i=Gu,a=null,o=null,s=Du(l);function l(){let l;const c=Uu.call(arguments),u=t.apply(this,c),d=n.apply(this,c);if(null==a&&(o=e(l=s())),o.lineStart(),c[0]=u,o.point(+r.apply(this,c),+i.apply(this,c)),c[0]=d,o.point(+r.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return l.source=function(e){return arguments.length?(t=e,l):t},l.target=function(e){return arguments.length?(n=e,l):n},l.x=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),l):r},l.y=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),l):i},l.context=function(t){return arguments.length?(null==t?a=o=null:o=e(a=t),l):a},l}(td)}function ad(){}function od(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function sd(e){this._context=e}function ld(e){return new sd(e)}function cd(e){this._context=e}function ud(e){return new cd(e)}function dd(e){this._context=e}function hd(e){return new dd(e)}function fd(e,t){this._basis=new sd(e),this._beta=t}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:od(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},cd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:od(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*o),this._beta*t[l]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pd=function e(t){function n(e){return 1===t?new sd(e):new fd(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function md(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function gd(e,t){this._context=e,this._k=(1-t)/6}gd.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:md(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vd=function e(t){function n(e){return new gd(e,t)}return n.tension=function(t){return e(+t)},n}(0);function yd(e,t){this._context=e,this._k=(1-t)/6}yd.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const bd=function e(t){function n(e){return new yd(e,t)}return n.tension=function(t){return e(+t)},n}(0);function _d(e,t){this._context=e,this._k=(1-t)/6}_d.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:md(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const wd=function e(t){function n(e){return new _d(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Ed(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Tu){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Tu){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function xd(e,t){this._context=e,this._alpha=t}xd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Sd=function e(t){function n(e){return t?new xd(e,t):new gd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Od(e,t){this._context=e,this._alpha=t}Od.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Cd=function e(t){function n(e){return t?new Od(e,t):new yd(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Td(e,t){this._context=e,this._alpha=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ed(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ad=function e(t){function n(e){return t?new Td(e,t):new _d(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Md(e){this._context=e}function kd(e){return new Md(e)}function Ld(e){return e<0?-1:1}function Dd(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ld(a)+Ld(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Rd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nd(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Id(e){this._context=e}function Pd(e){this._context=new $d(e)}function $d(e){this._context=e}function Bd(e){return new Id(e)}function zd(e){return new Pd(e)}function Ud(e){this._context=e}function jd(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fd(e){return new Ud(e)}function Vd(e,t){this._context=e,this._t=t}function Hd(e){return new Vd(e,.5)}function Gd(e){return new Vd(e,0)}function Wd(e){return new Vd(e,1)}function qd(e,t){if((i=e.length)>1)for(var n,r,i,a=1,o=e[t[0]],s=o.length;a<i;++a)for(r=o,o=e[t[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Zd(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Yd(e,t){return e[t]}function Kd(e){const t=[];return t.key=e,t}function Xd(){var e=bu([]),t=Zd,n=qd,r=Yd;function i(i){var a,o,s=Array.from(e.apply(this,arguments),Kd),l=s.length,c=-1;for(const e of i)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(e,s[a].key,c,i)]).data=e;for(a=0,o=ju(t(s));a<l;++a)s[o[a]].index=a;return n(s,o),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:bu(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?Zd:"function"==typeof e?e:bu(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??qd,i):n},i}function Qd(e,t){if((s=e.length)>0)for(var n,r,i,a,o,s,l=0,c=e[t[0]].length;l<c;++l)for(a=o=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Jd(e,t,n){this.k=e,this.x=t,this.y=n}Md.prototype={areaStart:ad,areaEnd:ad,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Id.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:Nd(this,this._t0,Rd(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Nd(this,Rd(this,n=Dd(this,e,t)),n);break;default:Nd(this,this._t0,n=Dd(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Pd.prototype=Object.create(Id.prototype)).point=function(e,t){Id.prototype.point.call(this,t,e)},$d.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}},Ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=jd(e),i=jd(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Vd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},Jd.prototype={constructor:Jd,scale:function(e){return 1===e?this:new Jd(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Jd(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Jd.prototype;const eh="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var th="object"==typeof self&&self&&self.Object===Object&&self;const nh=eh||th||Function("return this")(),rh=nh.Symbol;var ih=Object.prototype,ah=ih.hasOwnProperty,oh=ih.toString,sh=rh?rh.toStringTag:void 0;var lh=Object.prototype.toString;var ch="[object Null]",uh="[object Undefined]",dh=rh?rh.toStringTag:void 0;function hh(e){return null==e?void 0===e?uh:ch:dh&&dh in Object(e)?function(e){var t=ah.call(e,sh),n=e[sh];try{e[sh]=void 0;var r=!0}catch{}var i=oh.call(e);return r&&(t?e[sh]=n:delete e[sh]),i}(e):function(e){return lh.call(e)}(e)}function fh(e){return null!=e&&"object"==typeof e}var ph="[object Symbol]";function mh(e){return"symbol"==typeof e||fh(e)&&hh(e)==ph}function gh(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}const vh=Array.isArray;var yh=1/0,bh=rh?rh.prototype:void 0,_h=bh?bh.toString:void 0;function wh(e){if("string"==typeof e)return e;if(vh(e))return gh(e,wh)+"";if(mh(e))return _h?_h.call(e):"";var t=e+"";return"0"==t&&1/e==-yh?"-0":t}var Eh=/\s/;var xh=/^\s+/;function Sh(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Eh.test(e.charAt(t)););return t}(e)+1).replace(xh,"")}function Oh(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ch=NaN,Th=/^[-+]0x[0-9a-f]+$/i,Ah=/^0b[01]+$/i,Mh=/^0o[0-7]+$/i,kh=parseInt;function Lh(e){if("number"==typeof e)return e;if(mh(e))return Ch;if(Oh(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Oh(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Sh(e);var n=Ah.test(e);return n||Mh.test(e)?kh(e.slice(2),n?2:8):Th.test(e)?Ch:+e}function Dh(e){return e}var Rh="[object AsyncFunction]",Nh="[object Function]",Ih="[object GeneratorFunction]",Ph="[object Proxy]";function $h(e){if(!Oh(e))return!1;var t=hh(e);return t==Nh||t==Ih||t==Rh||t==Ph}const Bh=nh["__core-js_shared__"];var zh,Uh=(zh=/[^.]+$/.exec(Bh&&Bh.keys&&Bh.keys.IE_PROTO||""))?"Symbol(src)_1."+zh:"";var jh=Function.prototype.toString;function Fh(e){if(null!=e){try{return jh.call(e)}catch{}try{return e+""}catch{}}return""}var Vh=/^\[object .+?Constructor\]$/,Hh=Function.prototype,Gh=Object.prototype,Wh=Hh.toString,qh=Gh.hasOwnProperty,Zh=RegExp("^"+Wh.call(qh).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yh(e){return!(!Oh(e)||function(e){return!!Uh&&Uh in e}(e))&&($h(e)?Zh:Vh).test(Fh(e))}function Kh(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Yh(n)?n:void 0}const Xh=Kh(nh,"WeakMap");var Qh=Object.create;const Jh=function(){function e(){}return function(t){if(!Oh(t))return{};if(Qh)return Qh(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ef(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var tf=Date.now;function nf(e){return function(){return e}}const rf=function(){try{var e=Kh(Object,"defineProperty");return e({},"",{}),e}catch{}}(),af=function(e){var t=0,n=0;return function(){var r=tf(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(rf?function(e,t){return rf(e,"toString",{configurable:!0,enumerable:!1,value:nf(t),writable:!0})}:Dh);function of(e){return e!=e}function sf(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}(e,of,n)}(e,t,0)>-1}var lf=9007199254740991,cf=/^(?:0|[1-9]\d*)$/;function uf(e,t){var n=typeof e;return!!(t=t??lf)&&("number"==n||"symbol"!=n&&cf.test(e))&&e>-1&&e%1==0&&e<t}function df(e,t,n){"__proto__"==t&&rf?rf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function hf(e,t){return e===t||e!=e&&t!=t}var ff=Object.prototype.hasOwnProperty;function pf(e,t,n){var r=e[t];(!ff.call(e,t)||!hf(r,n)||void 0===n&&!(t in e))&&df(e,t,n)}function mf(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?df(n,s,l):pf(n,s,l)}return n}var gf=Math.max;function vf(e,t){return af(function(e,t,n){return t=gf(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=gf(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,t,Dh),e+"")}var yf=9007199254740991;function bf(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=yf}function _f(e){return null!=e&&bf(e.length)&&!$h(e)}function wf(e,t,n){if(!Oh(n))return!1;var r=typeof t;return!!("number"==r?_f(n)&&uf(t,n.length):"string"==r&&t in n)&&hf(n[t],e)}var Ef=Object.prototype;function xf(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ef)}function Sf(e){return fh(e)&&"[object Arguments]"==hh(e)}var Of=Object.prototype,Cf=Of.hasOwnProperty,Tf=Of.propertyIsEnumerable,Af=Sf(function(){return arguments}())?Sf:function(e){return fh(e)&&Cf.call(e,"callee")&&!Tf.call(e,"callee")};const Mf=Af;var kf="object"==typeof t&&t&&!t.nodeType&&t,Lf=kf&&e&&!e.nodeType&&e,Df=Lf&&Lf.exports===kf?nh.Buffer:void 0;const Rf=(Df?Df.isBuffer:void 0)||function(){return!1};var Nf={};function If(e){return function(t){return e(t)}}Nf["[object Float32Array]"]=Nf["[object Float64Array]"]=Nf["[object Int8Array]"]=Nf["[object Int16Array]"]=Nf["[object Int32Array]"]=Nf["[object Uint8Array]"]=Nf["[object Uint8ClampedArray]"]=Nf["[object Uint16Array]"]=Nf["[object Uint32Array]"]=!0,Nf["[object Arguments]"]=Nf["[object Array]"]=Nf["[object ArrayBuffer]"]=Nf["[object Boolean]"]=Nf["[object DataView]"]=Nf["[object Date]"]=Nf["[object Error]"]=Nf["[object Function]"]=Nf["[object Map]"]=Nf["[object Number]"]=Nf["[object Object]"]=Nf["[object RegExp]"]=Nf["[object Set]"]=Nf["[object String]"]=Nf["[object WeakMap]"]=!1;var Pf="object"==typeof t&&t&&!t.nodeType&&t,$f=Pf&&e&&!e.nodeType&&e,Bf=$f&&$f.exports===Pf&&eh.process;const zf=function(){try{return $f&&$f.require&&$f.require("util").types||Bf&&Bf.binding&&Bf.binding("util")}catch{}}();var Uf=zf&&zf.isTypedArray;const jf=Uf?If(Uf):function(e){return fh(e)&&bf(e.length)&&!!Nf[hh(e)]};var Ff=Object.prototype.hasOwnProperty;function Vf(e,t){var n=vh(e),r=!n&&Mf(e),i=!n&&!r&&Rf(e),a=!n&&!r&&!i&&jf(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||Ff.call(e,c))&&(!o||!("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||uf(c,l)))&&s.push(c);return s}function Hf(e,t){return function(n){return e(t(n))}}const Gf=Hf(Object.keys,Object);var Wf=Object.prototype.hasOwnProperty;function qf(e){if(!xf(e))return Gf(e);var t=[];for(var n in Object(e))Wf.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Zf(e){return _f(e)?Vf(e):qf(e)}var Yf=Object.prototype.hasOwnProperty;function Kf(e){if(!Oh(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=xf(e),n=[];for(var r in e)"constructor"==r&&(t||!Yf.call(e,r))||n.push(r);return n}function Xf(e){return _f(e)?Vf(e,!0):Kf(e)}var Qf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jf=/^\w*$/;function ep(e,t){if(vh(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!mh(e))||Jf.test(e)||!Qf.test(e)||null!=t&&e in Object(t)}const tp=Kh(Object,"create");var np=Object.prototype.hasOwnProperty;var rp=Object.prototype.hasOwnProperty;function ip(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ap(e,t){for(var n=e.length;n--;)if(hf(e[n][0],t))return n;return-1}ip.prototype.clear=function(){this.__data__=tp?tp(null):{},this.size=0},ip.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ip.prototype.get=function(e){var t=this.__data__;if(tp){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return np.call(t,e)?t[e]:void 0},ip.prototype.has=function(e){var t=this.__data__;return tp?void 0!==t[e]:rp.call(t,e)},ip.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tp&&void 0===t?"__lodash_hash_undefined__":t,this};var op=Array.prototype.splice;function sp(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sp.prototype.clear=function(){this.__data__=[],this.size=0},sp.prototype.delete=function(e){var t=this.__data__,n=ap(t,e);return!(n<0||(n==t.length-1?t.pop():op.call(t,n,1),--this.size,0))},sp.prototype.get=function(e){var t=this.__data__,n=ap(t,e);return n<0?void 0:t[n][1]},sp.prototype.has=function(e){return ap(this.__data__,e)>-1},sp.prototype.set=function(e,t){var n=this.__data__,r=ap(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const lp=Kh(nh,"Map");function cp(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function up(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}up.prototype.clear=function(){this.size=0,this.__data__={hash:new ip,map:new(lp||sp),string:new ip}},up.prototype.delete=function(e){var t=cp(this,e).delete(e);return this.size-=t?1:0,t},up.prototype.get=function(e){return cp(this,e).get(e)},up.prototype.has=function(e){return cp(this,e).has(e)},up.prototype.set=function(e,t){var n=cp(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var dp="Expected a function";function hp(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(dp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(hp.Cache||up),n}hp.Cache=up;var fp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pp=/\\(\\)?/g;const mp=function(e){var t=hp(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(fp,(function(e,n,r,i){t.push(r?i.replace(pp,"$1"):n||e)})),t}));function gp(e){return null==e?"":wh(e)}function vp(e,t){return vh(e)?e:ep(e,t)?[e]:mp(gp(e))}var yp=1/0;function bp(e){if("string"==typeof e||mh(e))return e;var t=e+"";return"0"==t&&1/e==-yp?"-0":t}function _p(e,t){for(var n=0,r=(t=vp(t,e)).length;null!=e&&n<r;)e=e[bp(t[n++])];return n&&n==r?e:void 0}function wp(e,t,n){var r=null==e?void 0:_p(e,t);return void 0===r?n:r}function Ep(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var xp=rh?rh.isConcatSpreadable:void 0;function Sp(e){return vh(e)||Mf(e)||!!(xp&&e&&e[xp])}function Op(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Sp),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?Op(s,t-1,n,r,i):Ep(i,s):r||(i[i.length]=s)}return i}function Cp(e){return null!=e&&e.length?Op(e,1):[]}const Tp=Hf(Object.getPrototypeOf,Object);var Ap="[object Object]",Mp=Function.prototype,kp=Object.prototype,Lp=Mp.toString,Dp=kp.hasOwnProperty,Rp=Lp.call(Object);function Np(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}(e,t,n)}var Ip=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Pp(e){return Ip.test(e)}var $p="\\ud800-\\udfff",Bp="["+$p+"]",zp="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Up="\\ud83c[\\udffb-\\udfff]",jp="[^"+$p+"]",Fp="(?:\\ud83c[\\udde6-\\uddff]){2}",Vp="[\\ud800-\\udbff][\\udc00-\\udfff]",Hp="(?:"+zp+"|"+Up+")?",Gp="[\\ufe0e\\ufe0f]?",Wp=Gp+Hp+("(?:\\u200d(?:"+[jp,Fp,Vp].join("|")+")"+Gp+Hp+")*"),qp="(?:"+[jp+zp+"?",zp,Fp,Vp,Bp].join("|")+")",Zp=RegExp(Up+"(?="+Up+")|"+qp+Wp,"g");function Yp(e){return Pp(e)?function(e){return e.match(Zp)||[]}(e):function(e){return e.split("")}(e)}const Kp=function(e){return function(t){var n=Pp(t=gp(t))?Yp(t):void 0,r=n?n[0]:t.charAt(0),i=n?Np(n,1).join(""):t.slice(1);return r[e]()+i}}("toUpperCase");const Xp=function(e){return function(t){return null==e?void 0:e[t]}}({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});var Qp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var em=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var tm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var nm="\\ud800-\\udfff",rm="\\u2700-\\u27bf",im="a-z\\xdf-\\xf6\\xf8-\\xff",am="A-Z\\xc0-\\xd6\\xd8-\\xde",om="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sm="["+om+"]",lm="\\d+",cm="["+rm+"]",um="["+im+"]",dm="[^"+nm+om+lm+rm+im+am+"]",hm="(?:\\ud83c[\\udde6-\\uddff]){2}",fm="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+am+"]",mm="(?:"+um+"|"+dm+")",gm="(?:"+pm+"|"+dm+")",vm="(?:['’](?:d|ll|m|re|s|t|ve))?",ym="(?:['’](?:D|LL|M|RE|S|T|VE))?",bm="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_m="[\\ufe0e\\ufe0f]?",wm=_m+bm+("(?:\\u200d(?:"+["[^"+nm+"]",hm,fm].join("|")+")"+_m+bm+")*"),Em="(?:"+[cm,hm,fm].join("|")+")"+wm,xm=RegExp([pm+"?"+um+"+"+vm+"(?="+[sm,pm,"$"].join("|")+")",gm+"+"+ym+"(?="+[sm,pm+mm,"$"].join("|")+")",pm+"?"+mm+"+"+vm,pm+"+"+ym,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lm,Em].join("|"),"g");function Sm(e,t,n){return e=gp(e),void 0===(t=n?void 0:t)?function(e){return tm.test(e)}(e)?function(e){return e.match(xm)||[]}(e):function(e){return e.match(em)||[]}(e):e.match(t)||[]}var Om=RegExp("['’]","g");function Cm(e){return function(t){return function(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}(Sm(function(e){return(e=gp(e))&&e.replace(Qp,Xp).replace(Jp,"")}(t).replace(Om,"")),e,"")}}const Tm=Cm((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return Kp(gp(e).toLowerCase())}(t):t)}));function Am(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Lh(n))==n?n:0),void 0!==t&&(t=(t=Lh(t))==t?t:0),function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}(Lh(e),t,n)}function Mm(e){var t=this.__data__=new sp(e);this.size=t.size}Mm.prototype.clear=function(){this.__data__=new sp,this.size=0},Mm.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mm.prototype.get=function(e){return this.__data__.get(e)},Mm.prototype.has=function(e){return this.__data__.has(e)},Mm.prototype.set=function(e,t){var n=this.__data__;if(n instanceof sp){var r=n.__data__;if(!lp||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new up(r)}return n.set(e,t),this.size=n.size,this};var km="object"==typeof t&&t&&!t.nodeType&&t,Lm=km&&e&&!e.nodeType&&e,Dm=Lm&&Lm.exports===km?nh.Buffer:void 0,Rm=Dm?Dm.allocUnsafe:void 0;function Nm(e,t){if(t)return e.slice();var n=e.length,r=Rm?Rm(n):new e.constructor(n);return e.copy(r),r}function Im(){return[]}var Pm=Object.prototype.propertyIsEnumerable,$m=Object.getOwnPropertySymbols;const Bm=$m?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}($m(e),(function(t){return Pm.call(e,t)})))}:Im;const zm=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ep(t,Bm(e)),e=Tp(e);return t}:Im;function Um(e,t,n){var r=t(e);return vh(e)?r:Ep(r,n(e))}function jm(e){return Um(e,Zf,Bm)}function Fm(e){return Um(e,Xf,zm)}const Vm=Kh(nh,"DataView"),Hm=Kh(nh,"Promise"),Gm=Kh(nh,"Set");var Wm="[object Map]",qm="[object Promise]",Zm="[object Set]",Ym="[object WeakMap]",Km="[object DataView]",Xm=Fh(Vm),Qm=Fh(lp),Jm=Fh(Hm),eg=Fh(Gm),tg=Fh(Xh),ng=hh;(Vm&&ng(new Vm(new ArrayBuffer(1)))!=Km||lp&&ng(new lp)!=Wm||Hm&&ng(Hm.resolve())!=qm||Gm&&ng(new Gm)!=Zm||Xh&&ng(new Xh)!=Ym)&&(ng=function(e){var t=hh(e),n="[object Object]"==t?e.constructor:void 0,r=n?Fh(n):"";if(r)switch(r){case Xm:return Km;case Qm:return Wm;case Jm:return qm;case eg:return Zm;case tg:return Ym}return t});const rg=ng;var ig=Object.prototype.hasOwnProperty;const ag=nh.Uint8Array;function og(e){var t=new e.constructor(e.byteLength);return new ag(t).set(new ag(e)),t}var sg=/\w*$/;var lg=rh?rh.prototype:void 0,cg=lg?lg.valueOf:void 0;function ug(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var dg="[object Boolean]",hg="[object Date]",fg="[object Map]",pg="[object Number]",mg="[object RegExp]",gg="[object Set]",vg="[object String]",yg="[object Symbol]",bg="[object ArrayBuffer]",_g="[object DataView]",wg="[object Float32Array]",Eg="[object Float64Array]",xg="[object Int8Array]",Sg="[object Int16Array]",Og="[object Int32Array]",Cg="[object Uint8Array]",Tg="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Mg="[object Uint32Array]";function kg(e,t,n){var r=e.constructor;switch(t){case bg:return og(e);case dg:case hg:return new r(+e);case _g:return function(e,t){var n=t?og(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case wg:case Eg:case xg:case Sg:case Og:case Cg:case Tg:case Ag:case Mg:return ug(e,n);case fg:return new r;case pg:case vg:return new r(e);case mg:return function(e){var t=new e.constructor(e.source,sg.exec(e));return t.lastIndex=e.lastIndex,t}(e);case gg:return new r;case yg:return function(e){return cg?Object(cg.call(e)):{}}(e)}}function Lg(e){return"function"!=typeof e.constructor||xf(e)?{}:Jh(Tp(e))}var Dg=zf&&zf.isMap;const Rg=Dg?If(Dg):function(e){return fh(e)&&"[object Map]"==rg(e)};var Ng=zf&&zf.isSet;const Ig=Ng?If(Ng):function(e){return fh(e)&&"[object Set]"==rg(e)};var Pg=1,$g=2,Bg=4,zg="[object Arguments]",Ug="[object Function]",jg="[object GeneratorFunction]",Fg="[object Object]",Vg={};function Hg(e,t,n,r,i,a){var o,s=t&Pg,l=t&$g,c=t&Bg;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!Oh(e))return e;var u=vh(e);if(u){if(o=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ig.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return ef(e,o)}else{var d=rg(e),h=d==Ug||d==jg;if(Rf(e))return Nm(e,s);if(d==Fg||d==zg||h&&!i){if(o=l||h?{}:Lg(e),!s)return l?function(e,t){return mf(e,zm(e),t)}(e,function(e,t){return e&&mf(t,Xf(t),e)}(o,e)):function(e,t){return mf(e,Bm(e),t)}(e,function(e,t){return e&&mf(t,Zf(t),e)}(o,e))}else{if(!Vg[d])return i?e:{};o=kg(e,d,s)}}a||(a=new Mm);var f=a.get(e);if(f)return f;a.set(e,o),Ig(e)?e.forEach((function(r){o.add(Hg(r,t,n,r,e,a))})):Rg(e)&&e.forEach((function(r,i){o.set(i,Hg(r,t,n,i,e,a))}));var p=u?void 0:(c?l?Fm:jm:l?Xf:Zf)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(p||e,(function(r,i){p&&(r=e[i=r]),pf(o,i,Hg(r,t,n,i,e,a))})),o}Vg[zg]=Vg["[object Array]"]=Vg["[object ArrayBuffer]"]=Vg["[object DataView]"]=Vg["[object Boolean]"]=Vg["[object Date]"]=Vg["[object Float32Array]"]=Vg["[object Float64Array]"]=Vg["[object Int8Array]"]=Vg["[object Int16Array]"]=Vg["[object Int32Array]"]=Vg["[object Map]"]=Vg["[object Number]"]=Vg[Fg]=Vg["[object RegExp]"]=Vg["[object Set]"]=Vg["[object String]"]=Vg["[object Symbol]"]=Vg["[object Uint8Array]"]=Vg["[object Uint8ClampedArray]"]=Vg["[object Uint16Array]"]=Vg["[object Uint32Array]"]=!0,Vg["[object Error]"]=Vg[Ug]=Vg["[object WeakMap]"]=!1;var Gg=1,Wg=4;function qg(e){return Hg(e,Gg|Wg)}function Zg(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new up;++t<n;)this.add(e[t])}function Yg(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Kg(e,t){return e.has(t)}Zg.prototype.add=Zg.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Zg.prototype.has=function(e){return this.__data__.has(e)};var Xg=1,Qg=2;function Jg(e,t,n,r,i,a){var o=n&Xg,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Qg?new Zg:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=o?r(m,p,d,t,e,a):r(p,m,d,e,t,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!Yg(t,(function(e,t){if(!Kg(f,t)&&(p===e||i(p,e,n,r,a)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ev(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function tv(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var nv=1,rv=2,iv="[object Boolean]",av="[object Date]",ov="[object Error]",sv="[object Map]",lv="[object Number]",cv="[object RegExp]",uv="[object Set]",dv="[object String]",hv="[object Symbol]",fv="[object ArrayBuffer]",pv="[object DataView]",mv=rh?rh.prototype:void 0,gv=mv?mv.valueOf:void 0;var vv=1,yv=Object.prototype.hasOwnProperty;var bv=1,_v="[object Arguments]",wv="[object Array]",Ev="[object Object]",xv=Object.prototype.hasOwnProperty;function Sv(e,t,n,r,i,a){var o=vh(e),s=vh(t),l=o?wv:rg(e),c=s?wv:rg(t),u=(l=l==_v?Ev:l)==Ev,d=(c=c==_v?Ev:c)==Ev,h=l==c;if(h&&Rf(e)){if(!Rf(t))return!1;o=!0,u=!1}if(h&&!u)return a||(a=new Mm),o||jf(e)?Jg(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case pv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fv:return!(e.byteLength!=t.byteLength||!a(new ag(e),new ag(t)));case iv:case av:case lv:return hf(+e,+t);case ov:return e.name==t.name&&e.message==t.message;case cv:case dv:return e==t+"";case sv:var s=ev;case uv:var l=r&nv;if(s||(s=tv),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=rv,o.set(e,t);var u=Jg(s(e),s(t),r,i,a,o);return o.delete(e),u;case hv:if(gv)return gv.call(e)==gv.call(t)}return!1}(e,t,l,n,r,i,a);if(!(n&bv)){var f=u&&xv.call(e,"__wrapped__"),p=d&&xv.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return a||(a=new Mm),i(m,g,n,r,a)}}return!!h&&(a||(a=new Mm),function(e,t,n,r,i,a){var o=n&vv,s=jm(e),l=s.length;if(l!=jm(t).length&&!o)return!1;for(var c=l;c--;){var u=s[c];if(!(o?u in t:yv.call(t,u)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var f=!0;a.set(e,t),a.set(t,e);for(var p=o;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=o?r(g,m,u,t,e,a):r(m,g,u,e,t,a);if(!(void 0===v?m===g||i(m,g,n,r,a):v)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return a.delete(e),a.delete(t),f}(e,t,n,r,i,a))}function Ov(e,t,n,r,i){return e===t||(null==e||null==t||!fh(e)&&!fh(t)?e!=e&&t!=t:Sv(e,t,n,r,Ov,i))}var Cv=1,Tv=2;function Av(e){return e==e&&!Oh(e)}function Mv(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function kv(e){var t=function(e){for(var t=Zf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Av(i)]}return t}(e);return 1==t.length&&t[0][2]?Mv(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var l=(s=n[i])[0],c=e[l],u=s[1];if(o&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Mm;if(r)var h=r(c,u,l,e,t,d);if(!(void 0===h?Ov(u,c,Cv|Tv,r,d):h))return!1}}return!0}(n,e,t)}}function Lv(e,t){return null!=e&&t in Object(e)}function Dv(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=vp(t,e)).length,a=!1;++r<i;){var o=bp(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&bf(i)&&uf(o,i)&&(vh(e)||Mf(e))}(e,t,Lv)}var Rv=1,Nv=2;function Iv(e){return ep(e)?function(e){return function(t){return null==t?void 0:t[e]}}(bp(e)):function(e){return function(t){return _p(t,e)}}(e)}function Pv(e){return"function"==typeof e?e:null==e?Dh:"object"==typeof e?vh(e)?function(e,t){return ep(e)&&Av(t)?Mv(bp(e),t):function(n){var r=wp(n,e);return void 0===r&&r===t?Dv(n,e):Ov(t,r,Rv|Nv)}}(e[0],e[1]):kv(e):Iv(e)}function $v(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}const Bv=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(a[l],l,a))break}return t}}();const zv=function(e,t){return function(n,r){if(null==n)return n;if(!_f(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(e,t){return e&&Bv(e,t,Zf)}));function Uv(e,t,n,r){return zv(e,(function(e,i,a){t(r,e,n(e),a)})),r}const jv=function(){return nh.Date.now()};var Fv=Math.max,Vv=Math.min;function Hv(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function m(){var e=jv();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Vv(n,a-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,o)}function v(){var e=jv(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),o}return t=Lh(t)||0,Oh(n)&&(u=!!n.leading,a=(d="maxWait"in n)?Fv(Lh(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?o:g(jv())},v}function Gv(e,t,n){(void 0!==n&&!hf(e[t],n)||void 0===n&&!(t in e))&&df(e,t,n)}function Wv(e){return fh(e)&&_f(e)}function qv(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Zv(e,t,n,r,i,a,o){var s=qv(e,n),l=qv(t,n),c=o.get(l);if(c)Gv(e,n,c);else{var u=a?a(s,l,n+"",e,t,o):void 0,d=void 0===u;if(d){var h=vh(l),f=!h&&Rf(l),p=!h&&!f&&jf(l);u=l,h||f||p?vh(s)?u=s:Wv(s)?u=ef(s):f?(d=!1,u=Nm(l,!0)):p?(d=!1,u=ug(l,!0)):u=[]:function(e){if(!fh(e)||hh(e)!=Ap)return!1;var t=Tp(e);if(null===t)return!0;var n=Dp.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Lp.call(n)==Rp}(l)||Mf(l)?(u=s,Mf(s)?u=function(e){return mf(e,Xf(e))}(s):(!Oh(s)||$h(s))&&(u=Lg(l))):d=!1}d&&(o.set(l,u),i(u,l,r,a,o),o.delete(l)),Gv(e,n,u)}}function Yv(e,t,n,r,i){e!==t&&Bv(t,(function(a,o){if(i||(i=new Mm),Oh(a))Zv(e,t,o,n,Yv,r,i);else{var s=r?r(qv(e,o),a,o+"",e,t,i):void 0;void 0===s&&(s=a),Gv(e,o,s)}}),Xf)}function Kv(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Xv(e,t){var n=-1,r=_f(e)?Array(e.length):[];return zv(e,(function(e,i,a){r[++n]=t(e,i,a)})),r}function Qv(e,t){return(vh(e)?gh:Xv)(e,Pv(t))}var Jv=Object.prototype.hasOwnProperty;const ey=function(e,t){return function(n,r){var i=vh(n)?$v:Uv,a=t?t():{};return i(n,e,Pv(r),a)}}((function(e,t,n){Jv.call(e,n)?e[n].push(t):df(e,n,[t])}));var ty="[object Map]",ny="[object Set]",ry=Object.prototype.hasOwnProperty;function iy(e){if(null==e)return!0;if(_f(e)&&(vh(e)||"string"==typeof e||"function"==typeof e.splice||Rf(e)||jf(e)||Mf(e)))return!e.length;var t=rg(e);if(t==ty||t==ny)return!e.size;if(xf(e))return!qf(e).length;for(var n in e)if(ry.call(e,n))return!1;return!0}function ay(e,t){return Ov(e,t)}const oy=Cm((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),sy=function(e){return vf((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&wf(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}((function(e,t,n){Yv(e,t,n)}));function ly(e,t){var n;return zv(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function cy(e,t,n){var r=vh(e)?Yg:ly;return n&&wf(e,t,n)&&(t=void 0),r(e,Pv(t))}const uy=Gm&&1/tv(new Gm([,-0]))[1]==1/0?function(e){return new Gm(e)}:function(){};var dy=200;function hy(e,t,n){var r=-1,i=sf,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=Kv;else if(a>=dy){var c=t?null:uy(e);if(c)return tv(c);o=!1,i=Kg,l=new Zg}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}const fy=vf((function(e){var t=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}(e);return Wv(t)&&(t=void 0),hy(Op(e,1,Wv,!0),Pv(t))}));function py(e){return e&&e.length?hy(e):[]}var my=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(my||{}),gy=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(gy||{}),vy=(e=>(e.UPDATE="model-update",e))(vy||{}),yy=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(yy||{}),by=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(by||{}),_y=(e=>(e.CHANGE="zoom-domain-change",e))(_y||{}),wy=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(wy||{}),Ey=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Ey||{}),xy=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(xy||{}),Sy=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Sy||{}),Oy=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Oy||{}),Cy=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Cy||{}),Ty=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Ty||{}),Ay=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Ay||{}),My=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(My||{}),ky=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(ky||{}),Ly=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(Ly||{}),Dy=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Dy||{}),Ry=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Ry||{}),Ny=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Ny||{}),Iy=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Iy||{}),Py=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Py||{}),$y=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))($y||{}),By=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(By||{}),zy=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(zy||{}),Uy=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Uy||{}),jy=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(jy||{});const Fy=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:By,Area:xy,Axis:Ey,Bar:Ty,Boxplot:Ay,CanvasZoom:wy,Chart:my,Choropleth:jy,CirclePack:$y,Gauge:Cy,Heatmap:Uy,Legend:Py,Line:ky,Meter:zy,Modal:gy,Model:vy,Pie:Oy,Radar:Ly,Scatter:My,Threshold:Iy,Toolbar:yy,Tooltip:Ny,Tree:Dy,Treemap:Ry,WordCloud:Sy,ZoomBar:by,ZoomDomain:_y},Symbol.toStringTag,{value:"Module"}));var Vy=(e=>(e.HTML="html",e.SVG="svg",e))(Vy||{}),Hy=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Hy||{}),Gy=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(Gy||{}),Wy=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(Wy||{}),qy=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(qy||{}),Zy=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Zy||{}),Yy=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Yy||{}),Ky=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Ky||{}),Xy=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Xy||{}),Qy=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Qy||{}),Jy=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Jy||{}),eb=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(eb||{}),tb=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(tb||{}),nb=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(nb||{}),rb=(e=>(e.CENTER="center",e))(rb||{}),ib=(e=>(e.LEFT="left",e.RIGHT="right",e))(ib||{}),ab=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(ab||{}),ob=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(ob||{}),sb=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(sb||{}),lb=(e=>(e.SEMI="semi",e.FULL="full",e))(lb||{}),cb=(e=>(e.UP="up",e.DOWN="down",e))(cb||{}),ub=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(ub||{}),db=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(db||{}),hb=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(hb||{}),fb=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(fb||{}),pb=(e=>(e.LEFT="left",e.RIGHT="right",e))(pb||{}),mb=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(mb||{}),gb=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(gb||{}),vb=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(vb||{}),yb=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(yb||{}),bb=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(bb||{});const _b="cds",wb={unselected:.05,selected:.4},Eb={number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},xb={reference:"value",compareTo:"marker"},Sb=.1,Ob={rectanglePadding:4},Cb={duration:1e3,ease:wr,zoomLevel:3},Tb={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},Ab={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},Mb={radius:4,opacity:{hovered:1,default:.3}},kb={opacity:{hovered:.5,default:.3}},Lb={default:1,thicker:2},Db={defaultBins:10},Rb={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Nb={unselected:.3,selected:1},Ib={selected:2,unselected:1},Pb={paddingRight:5},$b={indicatorSize:16,paddingLeft:15},Bb={paddingLeft:36,paddingRight:24},zb={default:8,proportional:16},Ub=2,jb=-15,Fb=2,Vb=.007,Hb={outerRadiusOffset:3},Gb=30,Wb=20,qb=10,Zb={minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2},Yb={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Kb=4,Xb=24,Qb={unfocus:.3,default:.8,selected:1},Jb=16,e_={size:24},t_={horizontalOffset:10},n_={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},r_={height:{[qy.GRAPH_VIEW]:32,[qy.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},i_=[{type:mb.RADIUS,name:"Radius"},{type:mb.AREA,name:"Poor area"},{type:mb.AREA,name:"Satisfactory area"},{type:mb.AREA,name:"Great area"},{type:mb.QUARTILE,name:"Quartiles"}];function a_(e,t){var n;const r=qg(e),i=Object.keys(t.axes||{});null!=(n=null==t?void 0:t.toolbar)&&n.controls&&delete r.toolbar.controls,0===i.length&&delete r.axes;for(const e in r.axes)if(i.includes(e)){const n=t.axes[e];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===Ky.TIME?n.mapsTo="date":e===Ky.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return u_(r,t),sy(r,t)}function o_(e){if(!e)return;const t=e.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!t)return null;if(t[0]){const e=t[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:e[0],ty:e[1]}}return null}function s_(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const e=t[1].split(",");if(e.length>1)return{x:parseFloat(e[0]),y:parseFloat(e[1])}}return{x:0,y:0}}function l_(e,t,n="value",r=!1){const i=e/t.reduce(((e,t)=>e+t[n]),0)*100;return r?i:i%1!=0?parseFloat(i.toFixed(1)):i}function c_(e,t,n){return n>e.length?e:t===Zy.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===Zy.FRONT_LINE?"..."+e.substr(-n):t===Zy.END_LINE?e.substr(0,n)+"...":void 0}function u_(e,t){const n=d_(e,"legend","additionalItems"),r=d_(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),a=n.map((e=>e.type)),o=i_.filter((e=>a.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=o,t.legend.additionalItems=fy(o,r,"name")}}const d_=(e,...t)=>{let n=e;if(n){for(const e of t){if(null===n[e]||void 0===n[e])return null;n=n[e]}return n}return null},h_=(e,t)=>t===Yy.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,f_=(e,t)=>{const{x0:n,x1:r,y0:i,y1:a}=h_(e,t);return`M${n},${i}L${n},${a}L${r},${a}L${r},${i}L${n},${i}`};function p_(e,t,n){return n===Yy.VERTICAL?[e,t]:[t,e]}function m_(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function g_(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=null!=n&&n.width?String(n.width):i;r=e.formattingValues[a]||e.formattingValues[i]}else{var o=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function v_(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o,s=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(l,(function(e){return e.test(s)}));return o=e.valueCallback?e.valueCallback(c):c,{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(s.length)}}}function y_(e){return(y_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function __(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function w_(e){__(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===y_(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function E_(e,t){__(2,arguments);var n=w_(e),r=b_(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function x_(e,t){__(2,arguments);var n=w_(e),r=b_(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),a=new Date(n.getTime());return a.setMonth(n.getMonth()+r+1,0),i>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),i),n)}function S_(e,t){__(2,arguments);var n=w_(e).getTime(),r=b_(t);return new Date(n+r)}var O_=36e5;function C_(e,t){return __(2,arguments),S_(e,b_(t)*O_)}var T_={};function A_(){return T_}function M_(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function k_(e){__(1,arguments);var t=w_(e);return t.setHours(0,0,0,0),t}var L_=864e5;var D_=6e4;function R_(e,t){return __(2,arguments),S_(e,b_(t)*D_)}function N_(e,t){return __(2,arguments),S_(e,1e3*b_(t))}function I_(e,t){return __(2,arguments),x_(e,12*b_(t))}function P_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var $_=6e4,B_=36e5;function z_(e){if(__(1,arguments),!function(e){return __(1,arguments),e instanceof Date||"object"===y_(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=w_(e);return!isNaN(Number(t))}function U_(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function j_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=U_(n,r),a=Math.abs(function(e,t){__(2,arguments);var n=k_(e),r=k_(t),i=n.getTime()-M_(n),a=r.getTime()-M_(r);return Math.round((i-a)/L_)}(n,r));n.setDate(n.getDate()-i*a);var o=i*(a-+(U_(n,r)===-i));return 0===o?0:o}function F_(e,t){return __(2,arguments),w_(e).getTime()-w_(t).getTime()}var V_={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},H_="trunc";function G_(e){return e?V_[e]:V_[H_]}function W_(e,t,n){__(2,arguments);var r=F_(e,t)/$_;return G_(null==n?void 0:n.roundingMethod)(r)}function q_(e){__(1,arguments);var t=w_(e);return function(e){__(1,arguments);var t=w_(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){__(1,arguments);var t=w_(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()}function Z_(e,t){__(2,arguments);var n,r=w_(e),i=w_(t),a=P_(r,i),o=Math.abs(function(e,t){__(2,arguments);var n=w_(e),r=w_(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,i));if(o<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*o);var s=P_(r,i)===-a;q_(w_(e))&&1===o&&1===P_(e,i)&&(s=!1),n=a*(o-Number(s))}return 0===n?0:n}function Y_(e,t,n){__(2,arguments);var r=F_(e,t)/1e3;return G_(null==n?void 0:n.roundingMethod)(r)}function K_(e,t){__(2,arguments);var n=w_(e),r=w_(t),i=P_(n,r),a=Math.abs(function(e,t){__(2,arguments);var n=w_(e),r=w_(t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);var o=P_(n,r)===-i,s=i*(a-Number(o));return 0===s?0:s}function X_(e){__(1,arguments);var t=w_(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Q_(e){__(1,arguments);var t=w_(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=X_(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=X_(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function J_(e){__(1,arguments);var t=w_(e),n=X_(t).getTime()-function(e){__(1,arguments);var t=Q_(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),X_(n)}(t).getTime();return Math.round(n/6048e5)+1}function ew(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=A_(),d=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.weekStartsOn)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=w_(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function tw(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=w_(e),d=u.getUTCFullYear(),h=A_(),f=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:h.firstWeekContainsDate)&&void 0!==r?r:null===(l=h.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var m=ew(p,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var v=ew(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function nw(e,t){__(1,arguments);var n=w_(e),r=ew(n,t).getTime()-function(e,t){var n,r,i,a,o,s,l,c;__(1,arguments);var u=A_(),d=b_(null!==(n=null!==(r=null!==(i=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(o=t.locale)||void 0===o||null===(s=o.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),h=tw(e,t),f=new Date(0);return f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0),ew(f,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function rw(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}const iw=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return rw("yy"===t?r%100:r,t.length)},aw=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):rw(n+1,2)},ow=function(e,t){return rw(e.getUTCDate(),t.length)},sw=function(e,t){return rw(e.getUTCHours()%12||12,t.length)},lw=function(e,t){return rw(e.getUTCHours(),t.length)},cw=function(e,t){return rw(e.getUTCMinutes(),t.length)},uw=function(e,t){return rw(e.getUTCSeconds(),t.length)},dw=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return rw(Math.floor(r*Math.pow(10,n-3)),t.length)};var hw="midnight",fw="noon",pw="morning",mw="afternoon",gw="evening",vw="night";function yw(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=t||"";return n+String(i)+o+rw(a,2)}function bw(e,t){return e%60==0?(e>0?"-":"+")+rw(Math.abs(e)/60,2):_w(e,t)}function _w(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+rw(Math.floor(i/60),2)+n+rw(i%60,2)}const ww={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return iw(e,t)},Y:function(e,t,n,r){var i=tw(e,r),a=i>0?i:1-i;return"YY"===t?rw(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):rw(a,t.length)},R:function(e,t){return rw(Q_(e),t.length)},u:function(e,t){return rw(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rw(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rw(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return aw(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return rw(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=nw(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):rw(i,t.length)},I:function(e,t,n){var r=J_(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):rw(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):ow(e,t)},D:function(e,t,n){var r=function(e){__(1,arguments);var t=w_(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):rw(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return rw(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return rw(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return rw(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?fw:0===i?hw:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?gw:i>=12?mw:i>=4?pw:vw,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return sw(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):lw(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):rw(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):rw(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):cw(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):uw(e,t)},S:function(e,t){return dw(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return bw(i);case"XXXX":case"XX":return _w(i);default:return _w(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return bw(i);case"xxxx":case"xx":return _w(i);default:return _w(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yw(i,":");default:return"GMT"+_w(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yw(i,":");default:return"GMT"+_w(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return rw(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return rw((r._originalDate||e).getTime(),t.length)}};var Ew=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xw=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}};const Sw={p:xw,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Ew(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Ew(i,t)).replace("{{time}}",xw(a,t))}};var Ow=["D","DD"],Cw=["YY","YYYY"];function Tw(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Aw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Mw={date:m_({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m_({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:m_({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var kw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};const Lw={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:g_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:g_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:g_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:g_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:g_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};var Dw={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:v_({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:v_({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:v_({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:v_({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:v_({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};const Rw={code:"en-US",formatDistance:function(e,t,n){var r,i=Aw[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Mw,formatRelative:function(e,t,n,r){return kw[e]},localize:Lw,match:Dw,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Nw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Iw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pw=/^'([^]*?)'?$/,$w=/''/g,Bw=/[a-zA-Z]/;function zw(e,t,n){var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,_;__(2,arguments);var w=String(t),E=A_(),x=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:E.locale)&&void 0!==r?r:Rw,S=b_(null!==(a=null!==(o=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:E.firstWeekContainsDate)&&void 0!==o?o:null===(d=E.locale)||void 0===d||null===(h=d.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=b_(null!==(f=null!==(p=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:E.weekStartsOn)&&void 0!==p?p:null===(b=E.locale)||void 0===b||null===(_=b.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var C=w_(e);if(!z_(C))throw new RangeError("Invalid time value");var T=function(e,t){return __(2,arguments),S_(e,-b_(t))}(C,M_(C)),A={firstWeekContainsDate:S,weekStartsOn:O,locale:x,_originalDate:C};return w.match(Iw).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Sw[t])(e,x.formatLong):e})).join("").match(Nw).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(Pw);return t?t[1].replace($w,"'"):e}(r);var a=ww[i];if(a)return!(null!=n&&n.useAdditionalWeekYearTokens)&&function(e){return-1!==Cw.indexOf(e)}(r)&&Tw(r,t,String(e)),!(null!=n&&n.useAdditionalDayOfYearTokens)&&function(e){return-1!==Ow.indexOf(e)}(r)&&Tw(r,t,String(e)),a(T,r,x.localize,A);if(i.match(Bw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}function Uw(e,t){return __(2,arguments),E_(e,-b_(t))}function jw(e,t){return __(2,arguments),x_(e,-b_(t))}function Fw(e,t){return __(2,arguments),C_(e,-b_(t))}function Vw(e,t){return __(2,arguments),R_(e,-b_(t))}function Hw(e,t){return __(2,arguments),N_(e,-b_(t))}function Gw(e,t){return __(2,arguments),I_(e,-b_(t))}const Ww={type:Zy.END_LINE,threshold:16,numCharacter:14},qw={enabled:!0,position:Xy.BOTTOM,clickable:!0,truncation:Ww,alignment:Qy.LEFT,order:null,additionalItems:[]},Zw={enabled:!0,showTotal:!0,truncation:Ww,groupLabel:"Group"},Yw={top:{visible:!0,includeZero:!0,truncation:Ww},bottom:{visible:!0,includeZero:!0,truncation:Ww},left:{visible:!0,includeZero:!0,truncation:Ww},right:{visible:!0,includeZero:!0,truncation:Ww}},Kw={addSpaceOnEdges:1,showDayName:!1,localeObject:Rw,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},Xw=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Qw={width:null,height:null,resizable:!0,theme:Hy.WHITE,tooltip:Zw,legend:qw,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:fb.SHOW_AS_DATATABLE},...Xw?[{type:fb.MAKE_FULLSCREEN}]:[],{type:fb.EXPORT_CSV},{type:fb.EXPORT_PNG},{type:fb.EXPORT_JPG}]}},Jw=sy({},Qw,{thematic:{projection:bb.geoNaturalEarth1}}),eE=sy({},Qw,{axes:Yw,timeScale:Kw,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:qy.GRAPH_VIEW}}}),tE=sy({},eE,{bars:{maxWidth:16,spacingFactor:.25},timeScale:sy(Kw,{addSpaceOnEdges:1})}),nE=sy({},tE,{}),rE=sy({},tE,{}),iE=sy({},tE,{bars:sy({},tE.bars,{dividerSize:1.5})}),aE=sy({},tE,{}),oE=sy({},eE,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),sE=oE,lE=sy({},oE,{points:{radius:3,filled:!1,enabled:!0}}),cE=sy({},lE,{timeScale:sy(Kw,{addSpaceOnEdges:0})}),uE=cE,dE=sy({},eE,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[3*t/400,25*t/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:mb.RADIUS,name:"Radius"}]}}),hE=sy({},eE,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:mb.AREA,name:"Poor area"},{type:mb.AREA,name:"Satisfactory area"},{type:mb.AREA,name:"Great area"},{type:mb.QUARTILE,name:"Quartiles"}]}}),fE=sy({},tE,{bars:{dividerSize:1.5},timeScale:sy(Kw,{addSpaceOnEdges:0})}),pE=sy({},Qw,{tooltip:sy({},Zw,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[20*t/400,75*t/400]},wordMapsTo:"word"}}),mE=sy({},Qw,{pie:{labels:{formatter:null,enabled:!0},alignment:Qy.LEFT,sortFunction:null,valueMapsTo:"value"}}),gE=sy({},Qw,{legend:{enabled:!1},gauge:{type:lb.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!=0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:Qy.LEFT}}),vE=sy({},mE,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:Qy.LEFT}}),yE=sy({},Qw,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),bE=sy({},yE,{legend:{enabled:!0}}),_E=sy({},Qw,{radar:{axes:{angle:"key",value:"value"},alignment:Qy.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),wE=sy({},tE,{comboChartTypes:[]}),EE=sy({tree:{type:eb.TREE}},Qw,{}),xE=sy({},Qw,{data:sy(Qw.data,{groupMapsTo:"name"})}),SE=sy({},Qw,Tb,{data:sy(Qw.data,{groupMapsTo:"name"})}),OE=sy({},Qw,{alluvial:{data:sy(Qw.data,{groupMapsTo:"source"}),nodeAlignment:Qy.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),CE=sy({},Qw,{axes:Yw,heatmap:{divider:{state:vb.AUTO},colorLegend:{type:"linear"}}}),TE={alluvialChart:OE,areaChart:cE,axisChart:eE,boxplotChart:aE,bubbleChart:dE,bulletChart:hE,chart:Qw,circlePackChart:SE,choroplethChart:sy({},Jw,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:wE,donutChart:vE,gaugeChart:gE,groupedBarChart:rE,heatmapChart:CE,histogramChart:fE,lineChart:lE,lollipopChart:sE,meterChart:yE,pieChart:mE,proportionalMeterChart:bE,radarChart:_E,scatterChart:oE,simpleBarChart:nE,stackedAreaChart:uE,stackedBarChart:iE,thematicChart:Jw,treeChart:EE,treemapChart:xE,wordCloudChart:pE};var AE=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(AE||{});const ME=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function kE(e,t,n,r,i){const a=0===t,o=2===Number(zw(new Date(e),"c")),s=1===Number(zw(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return a||function(e){const{s:t,m:n,H:r}=DE(e);return 0===r&&0===n&&0===t}(e)||NE(e,l)||IE(e);case"daily":return i?a||o||IE(e):a||NE(e,l)||IE(e);case"weekly":return a||o||IE(e);case"monthly":return a||IE(e);case"quarterly":return a||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function LE(e,t,n,r,i){const a=i.showDayName,o="daily"===r&&a?"weekly":r,s=new Date(e),l=d_(i,"timeIntervalFormats")[o],c=d_(l,"primary"),u=d_(l,"secondary");let d=kE(e,t,n,r,a)?c:u;return"15seconds"===r&&0!==s.getMilliseconds()&&(d=d.replace("pp","h:mm:ss.SSS a")),zw(s,d,{locale:i.localeObject})}function DE(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function RE(e,t){return AE[t]?t:1===e.length?"15seconds":function(e){const t=ME.reduce(((t,[,n],r)=>{const i=ME[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return ME[t][0]}(A(function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e)))}function NE(e,t){return DE(e).M!==DE(t).M}function IE(e){const{M:t,d:n,s:r,m:i,H:a}=DE(e);return 1===t&&1===n&&0===a&&0===i&&0===r}function PE(e){return void 0===e?"":e.toISOString()}class $E{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=d_(t,"data"),a=d_(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),a&&Object.keys(a).forEach((e=>{const t=a[e].mapsTo,r=a[e].scaleType;if((r===Ky.LINEAR||r===Ky.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&a[e].domain)if(r===Ky.LABELS)n=n.filter((n=>a[e].domain.includes(n[t])));else{const[r,i]=a[e].domain;n=n.filter((e=>!(t in e)||e[t]>=r&&e[t]<=i))}})),n.filter((e=>r.find((t=>t.name===e[i]))))}getDisplayData(e){if(!this.get("data"))return null;const{ACTIVE:t}=Rb.items.status,n=this.getDataGroups(e),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(e).filter((e=>n.find((n=>n.name===e[r]&&n.status===t))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(e){const t=this.sanitize(qg(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return d_(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Rb.items.status;return this.getDataGroups(e).filter((e=>e.status===t))}getDataGroupNames(e){return this.getDataGroups(e).map((e=>e.name))}getActiveDataGroupNames(e){return this.getActiveDataGroups(e).map((e=>e.name))}aggregateBinDataByGroup(e){return ey(e,"group")}getBinConfigurations(){const e=this.getDisplayData(),t=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),i=t.axes[n],{groupMapsTo:a}=t.data,{bins:o=Db.defaultBins}=i,s=Array.isArray(o),l=C().value((e=>e[r])).thresholds(o)(e);if(s)l[l.length-1].x1=o[o.length-1];else{const e=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+e}const c=s?[o[0],o[o.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[a])))),d=[];return l.forEach((e=>{const t=`${e.x0}-${e.x1}`,n=this.aggregateBinDataByGroup(e);u.forEach((r=>{d.push({group:r,key:t,value:n[r]||0,bin:e.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:r});return Xd().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const a=e[i];return a[t]=n[r],a}))))}getGroupedData(e){const t=this.getDisplayData(e),n={},{groupMapsTo:r}=this.getOptions().data;return t.map((e=>{const t=e[r];null!==n[t]&&void 0!==n[t]?n[t].push(e):n[t]=[e]})),Object.keys(n).map((e=>({name:e,data:n[e]})))}getStackKeys({bins:e=null,groups:t=null}={bins:null,groups:null}){const n=this.getOptions(),r=this.getDisplayData(t);let i;i=e?e.map((e=>`${e.x0}-${e.x1}`)):py(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?PE(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const a=this.services.cartesianScales.domainAxisPosition,o=n.axes[a].scaleType;return o===Ky.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(o===Ky.LOG||o===Ky.LINEAR)&&i.sort(((e,t)=>e-t)),i}getDataValuesGroupedByKeys({bins:e=null,groups:t=null}){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getDisplayData(t),a=this.getDataGroupNames(),o=this.getStackKeys({bins:e,groups:t});return e?o.map((t=>{const[n,i]=t.split("-"),o={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return a.forEach((e=>{o[e]=s.filter((t=>t[r]===e)).length})),o})):o.map((e=>{const t={sharedStackKey:e};return a.forEach((n=>{const a=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?PE(t[i])===e:t[i].toString()===e)})),o=this.services.cartesianScales.getRangeIdentifier(t);t[n]=a?a[o]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,a=this.getActiveDataGroupNames(t),o=this.getDataValuesGroupedByKeys({groups:t});if(e){const e=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}(o.map((e=>[e.sharedStackKey,0])));o.forEach((t=>{a.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),o.forEach((t=>{a.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Xd().offset(Qd):Xd()).keys(a)(o).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=a[t],r}))))}getOptions(){return this.state.options}set(e,t){this.state=Object.assign({},this.state,e);const n=Object.assign({skipUpdate:!1,animate:!0},t);n.skipUpdate||this.update(n.animate)}get(e){return e?this.state[e]:this.state}setOptions(e){const t=this.getOptions();u_(t,e),this.set({options:sy(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(Fy.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Rb.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),a=r.filter((e=>e.status===t));if(i)if(1===a.length&&a[0].name===e)r.forEach(((e,n)=>{r[n].status=t}));else{const i=r.findIndex((t=>t.name===e));r[i].status=r[i].status===n?t:n}else r.forEach(((i,a)=>{r[a].status=i.name===e?t:n}));const o=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=o.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(Fy.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(e,t,n,r){const i=this.getOptions();return i.getIsFilled?i.getIsFilled(e,t,n,r):r}getFillColor(e,t,n){const r=this.getOptions(),i=d_(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=d_(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=d_(this.getOptions(),"color","scale"),t=this.getDataGroups();return null!=e&&0!=Object.keys(e).length&&t.some((t=>Object.keys(e).includes(t.name)))}getColorClassName(e){const t=this.colorClassNames(e.dataGroupName);let n=e.originalClassName;return e.classNameTypes.forEach((r=>n=e.originalClassName?`${n} ${r}-${t}`:`${r}-${t}`)),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(e){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let a;const o=d_(e,"label");if(null===o){a=d_(r,i)||"Ungrouped"}else a=o;const s={group:a,key:r[i]};isNaN(n)?(s.value=n.value,s.date=n.date):s.value=n,t.push(s)}))})),t}getTabularDataArray(){return[]}exportToCSV(){const e=this.getTabularDataArray().map((e=>e.map((e=>`"${"–"===e?"–":e}"`))));let t="",n="";e.forEach((function(r,i){n=r.join(","),t+=i<e.length?n+"\n":n}));const r=this.getOptions();let i="myChart";const a=d_(r,"fileDownload","fileName");"function"==typeof a?i=a("csv"):"string"==typeof a&&(i=a),this.services.files.downloadCSV(t,`${i}.csv`)}getTabularData(e){return Array.isArray(e)?e:this.transformToTabularData(e)}sanitize(e){return this.getTabularData(e)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((e=>{-1===this.allDataGroups.indexOf(e)&&this.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(e){const{groupMapsTo:t}=this.getOptions().data,{ACTIVE:n,DISABLED:r}=Rb.items.status,i=this.getOptions(),a=py(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>a.includes(e)))||(i.data.selectedGroups=[]));const o=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return a.map((e=>({name:e,status:o(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=d_(e,"color","scale");Object.keys(t).forEach((e=>{this.allDataGroups.includes(e)||console.warn(`"${e}" does not exist in data groups.`)})),this.allDataGroups.filter((e=>t[e])).forEach((e=>this.colorScale[e]=t[e]))}setColorClassNames(){const e=d_(this.getOptions(),"color","pairing");let t=d_(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=d_(e,"option");const r=t>5?14:t;n=n<=Ab[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=Us().range(i).domain(this.allDataGroups)}}const BE=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4)}${e}`)})();function zE(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function UE(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function jE(e){const t=UE(e,"border-left-width"),n=UE(e,"border-right-width");return e.clientWidth+t+n}function FE(e){const t=UE(e,"border-top-width"),n=UE(e,"border-bottom-width");return e.clientHeight+t+n}function VE(e,t={}){return{width:t.width||jE(e),height:t.height||FE(e)}}const HE=16384;function GE(e){return new Promise(((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e}))}async function WE(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),async function(e){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(e))).then(encodeURIComponent).then((e=>`data:image/svg+xml;charset=utf-8,${e}`))}(i)}const qE=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||qE(n,t))};function ZE(e,t,n){const r=`.${e}:${t}`,i=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return zE(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}function YE(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const a=BE();try{t.className=`${t.className} ${a}`}catch{return}const o=document.createElement("style");o.appendChild(ZE(a,n,r)),t.appendChild(o)}const KE="application/font-woff",XE="image/jpeg",QE={woff:KE,woff2:KE,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:XE,jpeg:XE,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function JE(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return QE[t]||""}function ex(e){return-1!==e.search(/^(data:)/)}function tx(e,t){return`data:${t};base64,${e}`}async function nx(e,t,n){const r=await fetch(e,t);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise(((e,t)=>{const a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)}))}const rx={};async function ix(e,t,n){const r=function(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}(e,t,n.includeQueryParams);if(null!=rx[r])return rx[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{i=tx(await nx(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n)))),t)}catch(t){i=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${e}`;t&&(r="string"==typeof t?t:t.message),r&&console.warn(r)}return rx[r]=i,i}async function ax(e,t){return qE(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):GE(t)}(e):qE(e,HTMLVideoElement)?async function(e,t){if(e.currentSrc){const t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==n||n.drawImage(e,0,0,t.width,t.height),GE(t.toDataURL())}const n=e.poster,r=JE(n);return GE(await ix(n,r,t))}(e,t):qE(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await lx(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}const ox=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();function sx(e,t){return qE(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):zE(r).forEach((i=>{let a=r.getPropertyValue(i);"font-size"===i&&a.endsWith("px")&&(a=Math.floor(parseFloat(a.substring(0,a.length-2)))-.1+"px"),qE(e,HTMLIFrameElement)&&"display"===i&&"inline"===a&&(a="block"),"d"===i&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(i,a,r.getPropertyPriority(i))}))}(e,t),function(e,t){YE(e,t,":before"),YE(e,t,":after")}(e,t),function(e,t){qE(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),qE(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(qE(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}async function lx(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>ax(e,t))).then((n=>async function(e,t,n){var r,i;let a=[];return a=ox(e)&&e.assignedNodes?zE(e.assignedNodes()):qE(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?zE(e.contentDocument.body.childNodes):zE((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===a.length||qE(e,HTMLVideoElement)||await a.reduce(((e,r)=>e.then((()=>lx(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>sx(e,t))).then((e=>async function(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===n.length)return e;const r={};for(let i=0;i<n.length;i++){const a=n[i].getAttribute("xlink:href");if(a){const n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await lx(i,t,!0))}}const i=Object.values(r);if(i.length){const t="http://www.w3.org/1999/xhtml",n=document.createElementNS(t,"svg");n.setAttribute("xmlns",t),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(t,"defs");n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}(e,t))):null}const cx=/url\((['"]?)([^'"]+?)\1\)/g,ux=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,dx=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;async function hx(e,t,n,r,i){try{const a=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}(t,n):t,o=JE(t);let s;return s=i?tx(await i(a),o):await ix(a,o,r),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}function fx(e){return-1!==e.search(cx)}async function px(e,t,n){if(!fx(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace(dx,(e=>{for(;;){const[n,,r]=ux.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(cx,((e,n,r)=>(t.push(r),e))),t.filter((e=>!ex(e)))}(r).reduce(((e,r)=>e.then((e=>hx(e,r,t,n)))),Promise.resolve(r))}async function mx(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await px(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function gx(e,t){qE(e,Element)&&(await async function(e,t){await mx("background",e,t)||await mx("background-image",e,t),await mx("mask",e,t)||await mx("mask-image",e,t)}(e,t),await async function(e,t){const n=qE(e,HTMLImageElement);if((!n||ex(e.src))&&(!qE(e,SVGImageElement)||ex(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await ix(r,JE(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const a=e;a.decode&&(a.decode=t),"lazy"===a.loading&&(a.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=zE(e.childNodes).map((e=>gx(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const vx={};async function yx(e){let t=vx[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},vx[e]=t),t}async function bx(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let a=i.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),nx(a,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function _x(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=r.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(r,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=i.exec(n);if(null===e){if(e=a.exec(n),null===e)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function wx(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=zE(e.ownerDocument.styleSheets);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>fx(e.style.getPropertyValue("src"))))}(await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{zE(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1;const o=yx(e.href).then((e=>bx(e,t))).then((e=>_x(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?a+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})))).catch((e=>{console.error("Error loading remote css",e.toString())}));r.push(o)}}))}catch(i){const a=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(yx(n.href).then((e=>bx(e,t))).then((e=>_x(e).forEach((e=>{a.insertRule(e,n.cssRules.length)})))).catch((e=>{console.error("Error loading remote stylesheet",e)}))),console.error("Error inlining remote css file",i)}})),Promise.all(r).then((()=>(e.forEach((e=>{if("cssRules"in e)try{zE(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t))}async function Ex(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await wx(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return px(e.cssText,n,t)})))).join("\n")}(e,t);if(n){const t=document.createElement("style"),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function xx(e,t={}){const{width:n,height:r}=VE(e,t),i=await lx(e,t,!0);return await Ex(i,t),await gx(i,t),function(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;null!=r&&Object.keys(r).forEach((e=>{n[e]=r[e]}))}(i,t),await WE(i,n,r)}async function Sx(e,t={}){const{width:n,height:r}=VE(e,t),i=await xx(e,t),a=await GE(i),o=document.createElement("canvas"),s=o.getContext("2d"),l=t.pixelRatio||function(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}(),c=t.canvasWidth||n,u=t.canvasHeight||r;return o.width=c*l,o.height=u*l,t.skipAutoScale||function(e){(e.width>HE||e.height>HE)&&(e.width>HE&&e.height>HE?e.width>e.height?(e.height*=HE/e.width,e.width=HE):(e.width*=HE/e.height,e.height=HE):e.width>HE?(e.height*=HE/e.width,e.width=HE):(e.width*=HE/e.height,e.height=HE))}(o),o.style.width=`${c}`,o.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}class Ox{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}}class Cx extends Ox{constructor(e,t){super(e,t),this.chartID=""}static getHTMLElementSize(e){return{width:e.clientWidth,height:e.clientHeight}}static getSVGElementSize(e,t={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){e.attr||(e=ht(e));const n={width:0,height:0},r=e=>{e&&Object.keys(n).forEach((t=>{if(e[t]){const r=e[t],i=parseFloat(r);r&&i>n[t]&&-1===(""+r).indexOf("%")&&(n[t]=i)}}))},i={width:e.attr("width"),height:e.attr("height")},a=e.node();let o,s,l,c,u;try{"function"==typeof a.getBBox&&(o=a.getBBox(),s={width:o.width,height:o.height})}catch(e){console.error(e)}try{"function"==typeof(null==a?void 0:a.getBoundingClientRect)&&(l=a.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(a instanceof SVGSVGElement&&(u={width:a.clientWidth,height:a.clientHeight}),t){if(t.useAttrs&&(r(i),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(r(u),n.width>0&&n.height>0))return u;if(t.useBBox&&(r(s),n.width>0&&n.height>0))return s;if(t.useBoundingRect&&(r(c),n.width>0&&n.height>0))return c}try{r({width:d_(e.node(),"width","baseVal","value"),height:d_(e.node(),"height","baseVal","value")})}catch{r(u),r(s),r(i)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let n,r,i=t.split("#");return 2===i.length?(n=i[0],i=i[1].split("."),r=i[0]):(i=t.split("."),n=i[0]),e.append(n).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(e){return`chart-${this.chartID}-${e}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const e=this.model.getOptions(),t=d_(e,"style","prefix"),n=ht(this.getHolder()).append("div").classed(`${_b}--${t}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const e=this.getHolder(),{width:t,height:n,theme:r}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),ht(this.getHolder()).classed(`${_b}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=ht(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Sx(e,t)).toDataURL("image/jpeg",t.quality||1)}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let a="myChart";const o=d_(t,"fileDownload","fileName");"function"==typeof o?a=o("jpg"):"string"==typeof o&&(a=o),null==(i=e.services.files)||i.downloadImage(r,`${a}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=ht(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Sx(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let a="myChart";const o=d_(t,"fileDownload","fileName");"function"==typeof o?a=o("png"):"string"==typeof o&&(a=o),null==(i=e.services.files)||i.downloadImage(r,`${a}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}toggleFullscreen(){const e=this.getHolder();ht(e).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",(()=>{const e=ht(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=Cx.getSVGElementSize(ht(this.mainContainer),{useBBox:!0}),t=ht(this.mainContainer).attr("class"),n=ht(this.mainContainer).selectAll(`.${t} > svg`);let r=0;n.nodes().forEach((function(e){r+=Number(Cx.getSVGElementSize(ht(e),{useBBox:!0}).height)})),r<=e?ht(this.mainContainer).attr("height",r):ht(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&ht(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(Fy.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(Fy.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=Hv((()=>{var r;e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,null==(r=this.services.events)||r.dispatchEvent(Fy.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}}class Tx{constructor(e,t,n){if(this.type="",this.renderType=Vy.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=d_(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent(ht(this.services.domUtils.getMainContainer()))}init(){}render(e=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(e){this.model=e}setServices(e){this.services=e}setParent(e){var t;const n=this.parent;if(this.parent=e,(!n||n.node()!==e.node())&&this.type){const e=d_(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${_b}--${e}--${this.type}`,!0),n&&n.classed(`${_b}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={withinChartClip:!1}){if(this.type){const t=d_(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Cx.appendOrSelect(this.parent,`${this.renderType===Vy.SVG?"svg":"div"}${n}.${_b}--${t}--${this.type}`);if(e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=ht(`#${e}`).select("rect");0!==t.size()&&parseFloat(t.attr("height"))>0&&r.attr("clip-path",`url(#${e})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?sy({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const Ax=class e extends Tx{constructor(){super(...arguments),this.type="toolbar",this.renderType=Vy.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(Fy.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(Fy.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(d_(this.getOptions(),"data","loading"))t.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=t.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:e,overflowMenuItemList:n}=this.getControlConfigs();n&&e.push(this.getOverflowButtonConfig());const r=t.selectAll("div.toolbar-control").data(e,(e=>e.id));r.exit().remove();const i=r.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),a=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).attr("aria-label",(e=>e.title)).html((e=>`\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${e.id}`)}" aria-label="${e.title}">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t${e.iconSVG.content}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){ht(this).select("svg").style("will-change","transform").style("width",void 0!==e.iconSVG.width?e.iconSVG.width:"20px").style("height",void 0!==e.iconSVG.height?e.iconSVG.height:"20px"),ht(this).select("button").on("click",(t=>{e.shouldBeDisabled()||a.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),a.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?a.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&a.focusOnNextEnabledToolbarItem(t)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:e}=this.getControlConfigs(),t=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,(e=>d_(e,"id")));t.exit().remove();const n=t.enter().append("li").attr("id",(e=>this.services.domUtils.generateElementIDString(`control-${e.id}`))).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(t).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(e=>e.shouldBeDisabled())).attr("aria-disabled",(e=>e.shouldBeDisabled())).selectAll("button").text((e=>e.text))}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(e){this.overflowMenu&&(this.overflowMenu.classed("is-open",e),this.overflowButton&&(this.overflowButton.attr("aria-expanded",e),ht(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(Fy.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(Fy.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=ht(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnNextEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=ht(`button#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)}`).node();"focus"in e&&e.focus()}}focusOnPreviousEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=t.length;for(let r=e-1;r>=0;r--)if(!t[r].shouldBeDisabled()){n=r;break}if(n<t.length){const e=ht(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}focusOnNextEnabledMenuItem(e){const t=this.getOverflowMenuItems();let n=-1;for(let r=e+1;r<t.length;r++)if(!t[r].shouldBeDisabled()){n=r;break}if(n>-1){const e=ht(`#${this.services.domUtils.generateElementIDString(`control-${t[n].id}`)} button`).node();"focus"in e&&e.focus()}}toggleOverflowMenu(e){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const t=this;this.getOverflowMenuItems().forEach(((n,r)=>{const i=ht(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(a=>{a&&"Enter"===a.key?t.triggerFunctionAndEvent(n,e,i.node()):a&&"ArrowUp"===a.key?t.focusOnPreviousEnabledMenuItem(r):a&&"ArrowDown"===a.key?t.focusOnNextEnabledMenuItem(r):a&&"Escape"===a.key&&t.updateOverflowMenu(!1),a.preventDefault()})))})),t.focusOnNextEnabledMenuItem(-1)}e&&e.stopImmediatePropagation()}triggerFunctionAndEvent(e,t,n){"function"==typeof e.shouldBeDisabled&&e.shouldBeDisabled()||("function"==typeof e.clickFunction&&e.clickFunction(t),this.services.events.dispatchEvent(Fy.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=d_(this.getOptions(),"toolbar","numberOfIcons")-1,n=d_(this.getOptions(),"toolbar","controls"),r=[],i=[],a=[];return n.forEach((n=>{let o=null;n.type===fb.CUSTOM?(null===d_(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===d_(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),o=n):o=this.getControlConfigByType(n.type),o&&(o.text=n.text?n.text:n.type,-1!==o.id.indexOf("toolbar-export")?r.push(o):i.length<t?null===d_(o,"iconSVG","content")?a.push(o):i.push(o):a.push(o))})),a.push(...r),a.length?{buttonList:i,overflowMenuItemList:a}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:e,overflowMenuItemList:t}=this.getControlConfigs();return t&&e.push(this.getOverflowButtonConfig()),e||[]}getOverflowMenuItems(){const{overflowMenuItemList:e}=this.getControlConfigs();return e||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:()=>!1,iconSVG:{content:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:e=>this.toggleOverflowMenu(e)}}getControlConfigByType(e){const t=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData();let r;switch(e){case fb.ZOOM_IN:t&&(r={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case fb.ZOOM_OUT:t&&(r={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case fb.RESET_ZOOM:t&&(r={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case fb.MAKE_FULLSCREEN:r={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case fb.SHOW_AS_DATATABLE:r={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:"Show as table",shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(Fy.Modal.SHOW)};break;case fb.EXPORT_CSV:r={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case fb.EXPORT_PNG:r={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case fb.EXPORT_JPG:r={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return r}getControlIconByType(e){switch(e){case fb.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case fb.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case fb.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case fb.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case fb.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case fb.EXPORT_CSV:case fb.EXPORT_JPG:case fb.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+e)}}};Ax.buttonID=0;let Mx=Ax;const kx=class e extends Tx{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=e.instanceID++,this.init()}init(){this.children.forEach((e=>{e.components.forEach((e=>{e.init()}))}))}getPreferedAndFixedSizeSum(){const e=this.parent;let t=0;return e.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>{const t=d_(e,"growth");return t===nb.PREFERRED||t===nb.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>d_(e,"growth")===nb.STRETCH)).size()}render(e=!0){const t=this.parent,{width:n,height:r}=Cx.getHTMLElementSize(t.node()),i=this.configs.direction===tb.ROW||this.configs.direction===tb.ROW_REVERSE,a=d_(this.model.getOptions(),"style","prefix"),o=t.classed(`${_b}--${a}--layout-row`,this.configs.direction===tb.ROW).classed(`${_b}--${a}--layout-row-reverse`,this.configs.direction===tb.ROW_REVERSE).classed(`${_b}--${a}--layout-column`,this.configs.direction===tb.COLUMN).classed(`${_b}--${a}--layout-column-reverse`,this.configs.direction===tb.COLUMN_REVERSE).classed(`${_b}--${a}--layout-alignitems-center`,this.configs.alignItems===rb.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));o.enter().append("div").merge(t.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(t){t.components.forEach((n=>{const r=ht(this),i=d_(t,"renderType")===Vy.SVG;n.setParent(i?Cx.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r);const a=d_(t,"growth");(a===nb.PREFERRED||a===nb.FIXED)&&n.render(e)}))})),t.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=d_(e,"growth"),a=d_(e,"renderType")===Vy.SVG?Cx.getSVGElementSize(ht(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Cx.getHTMLElementSize(this);if(t===nb.PREFERRED){const t=i?a.width:a.height,o=i?n:r;e.size=t/o*100}})),o.exit().remove(),this.children.filter((e=>d_(e,"growth")===nb.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const s=t.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));i?s.style("width",(e=>e.size/100*n+"px")).style("height","100%"):s.style("height",(e=>e.size/100*r+"px")).style("width","100%"),s.each((function(t){t.components.forEach((n=>{d_(t,"growth")===nb.STRETCH&&n.render(e)}))}))}setModel(e){super.setModel(e),this.children.forEach((t=>{t.components.forEach((t=>t.setModel(e)))}))}setServices(e){super.setServices(e),this.children.forEach((t=>{t.components.forEach((t=>t.setServices(e)))}))}destroy(){this.children.forEach((e=>{e.components.forEach((e=>e.destroy()))}))}};kx.instanceID=Math.floor(99999999999*Math.random());let Lx=kx;class Dx extends Tx{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer().style("width",`${this.configs.size||e_.size}px`).style("height",`${this.configs.size||e_.size}px`).attr("opacity",0)}}var Rx="bx",Nx="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ";function Ix(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Px(e){return function(e){if(Array.isArray(e))return $x(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return $x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $x(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bx(e){return e.reduce((function(e,t){return Array.isArray(t)?e.push.apply(e,Px(Bx(t))):e.push(t),e}),[])}function zx(e){return(zx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ux(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jx(e,t){return(jx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hx(e);if(t){var i=Hx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vx(e)}(this,n)}}function Vx(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hx(e){return(Hx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gx(e){return(Gx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qx(){return qx=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Kx(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},qx.apply(this,arguments)}function Zx(e,t){return(Zx=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yx(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Kx(e);if(t){var i=Kx(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Gx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function Kx(e){return(Kx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function Qx(e){return(Qx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jx(e){return function(e){if(Array.isArray(e))return eS(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return eS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eS(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nS(e,t){return(nS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=iS(e);if(t){var i=iS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function iS(e){return(iS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aS(e,t){var n=e.target,r=e.currentTarget;if("function"==typeof n.matches){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var i=n.closest(t);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function oS(e){if(!e||"function"==typeof e)return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function sS(e){return(sS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cS(e,t){return(cS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=dS(e);if(t){var i=dS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===sS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function dS(e){return(dS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hS(e){return(hS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pS(e,t){return(pS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=gS(e);if(t){var i=gS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function gS(e){return(gS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vS(e){return(vS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_S(e,t)}function _S(e,t){return(_S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wS(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=ES(e);if(t){var i=ES(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function ES(e){return(ES=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const xS=function(e){bS(n,e);var t=wS(n);function n(e,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(i=t.call(this,e,r))._handleFocusinListener=void 0,i._handleKeydownListener=void 0,i._handleFocusin=function(e){var t=i.element.querySelector(i.options.selectorModalContainer)||i.element;i.element.classList.contains(i.options.classVisible)&&!t.contains(e.target)&&i.options.selectorsFloatingMenus.every((function(t){return!aS(e,t)}))&&i.element.querySelector(Nx).focus()},i._hookCloseActions(),i}return function(e,t,n){t&&yS(e.prototype,t),n&&yS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"createdByLauncher",value:function(e){this.show(e)}},{key:"shouldStateBeChanged",value:function(e){return"shown"===e?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(e,t,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===e){var a="onfocusin"in this.element.ownerDocument.defaultView,o=a?"focusin":"focus";this._handleFocusinListener=this.manage(Xx(this.element.ownerDocument,o,this._handleFocusin,!a))}"hidden"===e?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===e&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Xx(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===e&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(Nx)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var e=this;this.manage(Xx(this.element,"click",(function(t){var n=aS(t,e.options.selectorModalClose);n&&(t.delegateTarget=n),(n||t.target===e.element)&&e.hide(t)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Xx(this.element.ownerDocument.body,"keydown",(function(t){27===t.which&&e.shouldStateBeChanged("hidden")&&(t.stopPropagation(),e.hide(t))})))}}],[{key:"options",get:function(){var e=Rx;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(e,"--overflow-menu-options"),".".concat(e,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(e,"--modal-container"),classVisible:"is-visible",classBody:"".concat(e,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bx(t).reduce((function(e,t){return t(e)}),function(e,t,n){return t&&Ix(e.prototype,t),n&&Ix(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)})))}((function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jx(e,t)}(n,e);var t=Fx(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e,i)).children=[],!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return r.element=e,r.options=Object.assign(Object.create(r.constructor.options),i),r.constructor.components.set(r.element,Vx(r)),r}return function(e,t,n){t&&Ux(e.prototype,t),n&&Ux(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"release",value:function(){for(var e=this.children.pop();e;e=this.children.pop())e.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(e,t){return this.components.get(e)||new this(e,t)}}]),n}(e);return t}),(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pS(e,t)}(n,e);var t=mS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&fS(e.prototype,t),n&&fS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,null,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Xx(t,i,(function(t){var i=aS(t,"[".concat(r.attribInitTarget,"]"));if(i){t.delegateTarget=i;var a=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(a.length>1)throw new Error("Target widget must be unique.");if(1===a.length){"A"===i.tagName&&t.preventDefault();var o=e.create(a[0],n);"function"==typeof o.createdByLauncher&&o.createdByLauncher(t)}}}))}));return{release:function(){for(var e=i.pop();e;e=i.pop())e.release()}}}return this.create(t,n),""}}]),n.forLazyInit=!0,n}(e);return t}),[function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nS(e,t)}(n,e);var t=rS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&tS(e.prototype,t),n&&tS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,a=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,o="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,a)){var s={group:a&&a.group,state:i},l=[s.group,i].filter(Boolean).join("-").split("-").map((function(e){return e[0].toUpperCase()+e.substr(1)})).join(""),c=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:a}),u=a&&a.delegatorNode||this.element;if(u.dispatchEvent(c)){var d=[i,a].filter(Boolean);this._changeState.apply(this,Jx(d).concat([function(){u.dispatchEvent(new CustomEvent(e.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:a})),o&&o()}]))}else if(o){var h=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));h.canceled=!0,o(h)}}else o&&o(null,!0)}}]),n}(e);return t},function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cS(e,t)}(n,e);var t=uS(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return function(e,t,n){t&&lS(e.prototype,t),n&&lS(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"show",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("shown",oS(e),t)}},{key:"hide",value:function(e,t){(!e||"function"==typeof e)&&(t=e),this.changeState("hidden",oS(e),t)}}]),n}(e);return t}],(function(e){var t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zx(e,t)}(n,e);var t=Yx(n);function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).handles=new Set,e}return function(e,t,n){t&&Wx(e.prototype,t),n&&Wx(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"manage",value:function(e){return this.handles.add(e),e}},{key:"unmanage",value:function(e){return this.handles.delete(e),e}},{key:"release",value:function(){var e=this;return this.handles.forEach((function(t){t.release(),e.handles.delete(t)})),qx(Kx(n.prototype),"release",this).call(this)}}]),n}(e);return t})));class SS extends Tx{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),xS.create(this.modal.node()).show()},this.init()}addEventListeners(){this.services.events.addEventListener(Fy.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(Fy.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.model.getOptions(),t=d_(e,"style","prefix"),n=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container cds--modal-container">\n\t\t\t<div class="cds--modal-header cds--modal-header">\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="modal-description">${e.title}</p>\n\n\t\t\t\t<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t${wp(n,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label cds--table-header-label">${e}</div>\n\t\t\t\t\t\t\t</th>`)).join("")}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>${n.slice(1).map((e=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${e.map((e=>`<td>${e}</td>`)).join("")}\n\t\t\t\t\t\t\t</tr>`)).join("")}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer cds--modal-footer">\n\t\t\t <div class="${_b}--${t}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=ht(this.services.domUtils.getHolder()),n=d_(t,"style","prefix");this.modal=Cx.appendOrSelect(e,`div.${_b}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class OS extends Tx{constructor(){super(...arguments),this.type="title",this.renderType=Vy.HTML}render(e=!1){const t=this.getComponentContainer(),n=d_(this.getOptions(),"title"),r=t.selectAll("p.title").data([n]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html((e=>e)),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}r.exit().remove()}truncateTitle(e,t){if(t<=0)return;const n=e.text();if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");const r=Cx.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),a=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,a-1)).append("tspan").text("...");const o=this;e.on("mouseover",(function(t){o.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){o.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){o.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Cx.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(e,t,n,r){const i=Math.floor((n+t)/2);return e.getSubStringLength(0,i)>r?this.getSubstringIndex(e,t,i,r):e.getSubStringLength(0,i)<r?e.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(e,i,n,r):i}}var CS,TS,AS=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(AS||{});class MS extends Tx{constructor(){super(...arguments),this.type="legend",this.renderType=Vy.HTML}render(e=!1){const t=this.getOptions(),n=d_(t,"legend"),r=d_(n,"alignment"),i=d_(t,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Rb.items.status,s=a.some((e=>e.status===o)),l=d_(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===Qy.CENTER).classed("right-aligned",r===Qy.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",AS.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));const u=c.selectAll("div.legend-item").data(a,(e=>e.name)),d=u.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(e){return e.status===Rb.items.status.ACTIVE}));const h=d_(this.getOptions(),"legend","clickable");c.classed("clickable",h&&a.length>1);const f=Rb.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",AS.CHECKBOX).attr("tabindex",h?0:-1).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${t}-title`))).attr("aria-checked",(({status:e})=>e===Rb.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Rb.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Rb.items.status.ACTIVE}));p.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),d.append("p").merge(u.select("p"));const g=d_(t,"legend","additionalItems");if(g&&a.length){const e=this,t=c.selectAll("div.additional-item").data(g);t.exit().remove();const n=t.enter().append("div").merge(t).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+t}-title`)));n.selectAll("*").remove();let r,i=1;n.append("svg").classed("icon",!0).each((function(t){const n=ht(this);r&&r==t.type?i++:(r=t.type,i=1),e.addAdditionalItem(n,t,i)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),h&&d.size()>1&&this.addEventListeners()}sortDataGroups(e,t){if(e.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))),t.length<e.length){const n=e.length-t.length;return e.slice(n).concat(e.slice(0,n))}return e}addAdditionalItem(e,t,n){const{width:r,height:i}=Rb.area;if(t.type===mb.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===mb.RADIUS){const{iconData:n,fill:r,stroke:i}=Rb.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",AS.IMG).attr("aria-label","radius").attr("cx",(e=>e.cx)).attr("cy",(e=>e.cy)).attr("r",(e=>e.r)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i)}else if(t.type===mb.LINE){const i=Rb.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",AS.IMG).attr("aria-label","line").attr("x1",0).attr("y1",i.yPosition).attr("x2",r).attr("y2",i.yPosition).style("stroke",t.stroke?t.stroke:i.stroke).style("stroke-width",i.strokeWidth)}else if(t.type===mb.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",AS.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Rb.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===mb.SIZE){const{iconData:n,fill:r,stroke:i}=Rb.size;e.attr("fill","none").attr("role",AS.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(e=>e.width)).attr("height",(e=>e.height)).attr("y",(()=>0)).style("fill",t.fill?t.fill:r).style("stroke",t.stroke?t.stroke:i).style("stroke-width",1)}else if(t.type===mb.QUARTILE){const{iconData:t}=Rb.quartile;e.selectAll("rect").attr("role",AS.IMG).attr("aria-label","quartile").data(t).enter().append("rect").attr("class",((e,t)=>"quartile-"+(0===t?"wrapper":"line"))).attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height))}else if(t.type===mb.ZOOM){const{iconData:n,color:r}=d_(Rb,"zoom"),i=e.attr("role",AS.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();i.append("g").attr("x",(e=>e.x)).attr("y",(e=>e.y)).attr("width",(e=>e.width)).attr("height",(e=>e.height)).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(()=>t.color?t.color:r)),i.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(()=>t.color?t.color:r))}}truncateLegendText(){const e=this.getComponentContainer(),t=d_(this.getOptions(),"legend","truncation"),n=d_(t,"type"),r=d_(t,"threshold"),i=d_(t,"numCharacter"),a=e.selectAll("div.legend-item p");a.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==Zy.NONE?a.html((function(e){return e.name.length>r&&e.name.length!==i?c_(e.name,n,i):e.name})):a.html((e=>e.name))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=d_(n,"legend"),i=d_(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(Fy.Legend.ITEM_HOVER,{hoveredElement:ht(this)});const n=ht(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){ht(this).datum().name.length>i.threshold&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(Fy.Legend.ITEM_CLICK,{clickedElement:ht(this)});const t=ht(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=ht(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==Zy.NONE&&e.services.events.dispatchEvent(Fy.Tooltip.HIDE),e.services.events.dispatchEvent(Fy.Legend.ITEM_MOUSEOUT,{hoveredElement:t})})),t.selectAll("div.legend-item div.checkbox").on("keyup",(function(t){t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(Fy.Legend.ITEM_HOVER,{hoveredElement:ht(this)})})),t.selectAll("div.legend-item div.checkbox").on("keydown",(function(t,n){t.key&&" "===t.key?(t.preventDefault(),e.model.toggleDataLabel(n.name)):t.key&&"Tab"===t.key&&e.services.events.dispatchEvent(Fy.Legend.ITEM_MOUSEOUT,{hoveredElement:ht(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=ht(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class kS extends Tx{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=Vy.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(e=!0){this.createClipPath()}createClipPath(){const e=this.parent,{cartesianScales:t}=this.services;if(!t)throw new Error("Service cartesianScales was undefined");const n=t.getMainXScale(),r=t.getMainYScale(),[i,a]=n.range(),[o,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Cx.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Cx.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-i>0&&l.attr("x",i).attr("y",s).attr("width",a-i).attr("height",o-s),this.chartClipPath.merge(l).lower()}}class LS extends kS{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const e=this.parent,{width:t,height:n}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Cx.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Cx.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(TS||(TS={}));var DS=((CS={})[TS.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},CS[TS.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},CS[TS.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},CS[TS.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},CS),RS=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},NS=function(){function e(e){void 0===e&&(e={}),this.positions=DS,this.positions=Object.assign({},DS,e)}return e.prototype.getRelativeOffset=function(e){for(var t={left:e.offsetLeft,top:e.offsetTop};e.offsetParent&&"static"===getComputedStyle(e.offsetParent).position;)t.left+=e.offsetLeft,t.top+=e.offsetTop,e=e.offsetParent;return t},e.prototype.getAbsoluteOffset=function(e){for(var t=e,n={top:0,left:0};t.offsetParent;){var r=getComputedStyle(t.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),t=t.offsetParent}var i=e.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.left+n.left}},e.prototype.findRelative=function(e,t,n){var r=this.getRelativeOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findAbsolute=function(e,t,n){var r=this.getAbsoluteOffset(e),i=e.getBoundingClientRect();return this.calculatePosition(r,i,t,n)},e.prototype.findPosition=function(e,t,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(e),a=e.getBoundingClientRect();return this.calculatePosition(i,a,t,n)},e.prototype.findPositionAt=function(e,t,n){return this.calculatePosition(e,{top:0,left:0,height:0,width:0},t,n)},e.prototype.getPlacementBox=function(e,t){var n=e.offsetHeight+t.top,r=e.offsetWidth+t.left;return{top:t.top,bottom:n,left:t.left,right:r}},e.prototype.addOffset=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Object.assign({},e,{top:e.top+t,left:e.left+n})},e.prototype.setElement=function(e,t){e.style.top=t.top+"px",e.style.left=t.left+"px"},e.prototype.findBestPlacement=function(e,t,n,r,i){var a=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var o=n.map((function(n){var o=i(e,t,n),s=a.getPlacementBox(t,o),l=0,c=0,u=r();s.top<u.top?l=u.top-s.top:s.bottom>u.height&&(l=s.bottom-u.height),s.left<u.left?c=u.left-s.left:s.right>u.width&&(c=s.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var d=t.offsetHeight*t.offsetWidth;return{placement:n,weight:(d-l*c)/d}}));return o.sort((function(e,t){return t.weight-e.weight})),o[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;void 0===r&&(r=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,t,n,r,(function(t,n,r){return i.findPositionAt(e,n,r)}))},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:RS.innerHeight,width:RS.innerWidth}},e.prototype.calculatePosition=function(e,t,n,r){return this.positions[r]?this.positions[r](e,n,t):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new NS;class IS extends Tx{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=Vy.HTML,this.isEventListenerAdded=!1,this.positionService=new NS,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items;let n;const r=this.formatItems(this.getItems(e));n=e.detail.content?`<div class="title-tooltip"><p>${e.detail.content}</p></div>`:this.getTooltipHTML(r);const i=Cx.appendOrSelect(this.tooltip,"div.content-box");if(d_(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${e.detail.content}</p></div>`;i.html(t)}else i.html(this.model.getOptions().tooltip.customHTML(t,n));else i.html(n);i.selectAll(".datapoint-tooltip").each((function(e,t){const n=r[t];r[t]&&r[t].color&&ht(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(e),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(Fy.Tooltip.MOVE,(e=>{!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),this.services.events.addEventListener(Fy.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(Fy.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(Fy.Chart.MOUSEOUT,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(Fy.Tooltip.MOVE,null),this.services.events.removeEventListener(Fy.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(Fy.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(Fy.Chart.MOUSEOUT,this.handleHideTooltip)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=d_(t,"tooltip","truncation","type"),r=d_(t,"tooltip","truncation","threshold"),i=d_(t,"tooltip","truncation","numCharacter");return n!==Zy.NONE?e.map((e=>{const t=e.labelIcon?12:0;return e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e.label&&e.label.length+t>r&&(e.label=c_(e.label,n,i)),e.value&&e.value.length>r&&(e.value=c_(e.value,n,i)),e})):e.map((e=>(e.value=e.value?this.valueFormatter(e.value,e.label):e.value,e)))}getTooltipHTML(e){return'<ul class="multi-tooltip">'+e.map((e=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${e.bold?" bold":""}">\n\t\t\t\t\t\t${e.class||e.color?`<div class="tooltip-color ${e.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${e.label||""}</p>\n\t\t\t\t\t\t${e.labelIcon?`<span class="label-icon"/>${e.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===e.value||null===e.value?"":`<p class="value"/>${e.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}valueFormatter(e,t){const n=this.getOptions(),r=d_(n,"tooltip","valueFormatter");if(r)return r(e,t);if("function"==typeof e.getTime)return zw(e,"MMM d, yyyy");try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return zw(Date.parse(e),"MMM d, yyyy")}catch{}return e.toLocaleString()}render(e=!1){const t=this.getOptions(),n=d_(t,"tooltip","enabled");if(n){const e=ht(this.services.domUtils.getHolder()),n=d_(t,"style","prefix");this.tooltip=Cx.appendOrSelect(e,`div.${_b}--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=this.tooltip.node(),r=this.getOptions(),i=d_(r,"zoomBar","top","enabled");let a=d_(e,"detail","mousePosition");if(a){const e=d_(r,"zoomBar","top","type"),t=r_.height[e];i&&(a[1]+=t+r_.spacerHeight)}else a=ft(d_(e,"detail","event"),t);const o=t.offsetWidth,s=t.offsetHeight;let l;l=a[0]/o>.9?TS.LEFT:a[0]/o<.1?TS.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},n,[TS.RIGHT,TS.LEFT,TS.TOP,TS.BOTTOM],(()=>({top:void 0,left:void 0,width:o,height:s})));let{horizontalOffset:c}=t_;l===TS.LEFT&&(c*=-1);const u=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},n,l);this.positionService.setElement(n,u)}}class PS extends Ox{zoomIn(e,t,n){let r,i,a;const o=n||Cb;e&&(r=e.x,i=e.y,a=2);const{width:s,height:l}=Cx.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${a}) translate(${-r},${-i})`),this.services.events.dispatchEvent(Fy.CanvasZoom.CANVAS_ZOOM_IN,{element:ht(e)})}zoomOut(e,t){const n=t||Cb;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(Fy.CanvasZoom.CANVAS_ZOOM_OUT)}}class $S extends Ox{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(e,t){this.documentFragment.addEventListener(e,t)}removeEventListener(e,t){this.documentFragment.removeEventListener(e,t)}dispatchEvent(e,t){let n;t?n=new CustomEvent(e,{detail:t}):(n=document.createEvent("Event"),n.initEvent(e,!1,!0)),this.documentFragment.dispatchEvent(n)}}class BS extends Ox{constructor(e,t){super(e,t)}downloadCSV(e,t){const n=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([e],{type:r}),t);else if(URL&&"download"in n){const i=URL.createObjectURL(new Blob([e],{type:r}));n.href=i,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}else location.href=`data:application/octet-stream,${encodeURIComponent(e)}`}downloadImage(e,t){const n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class zS extends Ox{static appendOrUpdateLinearGradient(e){let t=e.svg.select(`defs linearGradient#${e.id}`);t.empty()&&(t=e.svg.append("defs").append("linearGradient").attr("id",e.id).attr("x1",e.x1).attr("x2",e.x2).attr("y1",e.y1).attr("y2",e.y2)),t.selectAll("stop").remove(),t.selectAll("stop").data(e.stops).enter().append("stop").attr("offset",(e=>e.offset)).style("stop-color",(e=>e.color)).style("stop-opacity",(e=>e.opacity))}static getOffsetRatio(e){return(100*Math.abs(e[1])/Math.abs(e[0]-e[1])).toFixed(2)+"%"}static getStops(e,t){let n=[{offset:"0%",color:t,opacity:"0.6"},{offset:"80%",color:t,opacity:"0"}];return e[0]<0&&e[1]>0&&(n=[{offset:"0%",color:t,opacity:"0.6"},{offset:zS.getOffsetRatio(e),color:t,opacity:"0"},{offset:"100%",color:t,opacity:"0.6"}]),n}}class US extends Ox{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(Fy.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:e,name:t,animate:n}){return this.pendingTransitions[e._id]=e,e.on("end interrupt cancel",(()=>{delete this.pendingTransitions[e._id]})),!1===this.model.getOptions().animations||!1===n?e.duration(0):e.duration(d_(n_,t,"duration")||n_.default.duration)}getPendingTransitions(){return this.pendingTransitions}}class jS{constructor(e,t){this.components=[],this.services={canvasZoom:PS,domUtils:Cx,events:$S,files:BS,gradientUtils:zS,transitions:US},this.model=new $E(this.services)}init(e,t){this.model.set({holder:e},{skipUpdate:!0}),Object.keys(this.services).forEach((e=>{const t=this.services[e];this.services[e]=new t(this.model,this.services)})),this.services.events.addEventListener(Fy.Model.UPDATE,(e=>{const t=!!d_(e,"detail","animate");this.update(t)})),this.model.setData(t.data),this.services.events.addEventListener(Fy.Chart.RESIZE,(()=>{this.update(!1)})),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(e=!0){if(!this.components)return;Object.keys(this.services).forEach((e=>{this.services[e].update()})),this.components.forEach((t=>t.render(e)));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map((e=>t[e].end().catch((e=>e))));Promise.all(n).then((()=>this.services.events.dispatchEvent(Fy.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((e=>e.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled"),i={id:"legend",components:[new MS(this.model,this.services)],growth:nb.PREFERRED},a=d_(n,"canvasZoom","enabled");a&&!0===a&&e.push(new LS(this.model,this.services));const o=!!this.model.getOptions().title,s={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},l={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},c={id:"header",components:[new Lx(this.model,this.services,[s,...r?[l]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},u={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:d_(t,"graphFrameRenderType")||Vy.SVG},d=!0!==d_(t,"excludeLegend")&&!1!==n.legend.enabled;let h=tb.COLUMN;if(d){const e=d_(n,"legend","position");"left"===e?(h=tb.ROW,n.legend.orientation||(n.legend.orientation=Jy.VERTICAL)):"right"===e?(h=tb.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=Jy.VERTICAL)):"bottom"===e&&(h=tb.COLUMN_REVERSE)}const f={id:"spacer",components:[new Dx(this.model,this.services)],growth:nb.PREFERRED},p={id:"full-frame",components:[new Lx(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:nb.STRETCH},m=[];if(o||r){m.push(c);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};m.push(e)}return m.push(p),[new IS(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,m,{direction:tb.COLUMN})]}}class FS extends $E{constructor(e){super(e),this.axisFlavor=yb.DEFAULT}assignRangeAndDomains(){const{cartesianScales:e}=this.services,t=this.getOptions(),n=e.isDualAxes(),r={primaryDomain:e.domainAxisPosition,primaryRange:e.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=e.secondaryDomainAxisPosition,r.secondaryRange=e.secondaryRangeAxisPosition),Object.keys(r).forEach((n=>{const i=r[n];e.scales[i]?r[n]={position:i,label:e.getScaleLabel(i),identifier:d_(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{cartesianScales:r}=this.services,{primaryDomain:i,primaryRange:a,secondaryDomain:o,secondaryRange:s}=this.assignRangeAndDomains();let l;return r.getDomainAxisScaleType()===Ky.TIME&&(l=e=>zw(e,"MMM d, yyyy")),[["Group",i.label,a.label,...o?[o.label]:[],...s?[s.label]:[]],...e.map((e=>[e[n],null===e[i.identifier]?"–":l?l(e[i.identifier]):e[i.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier].toLocaleString(),...o?[null===e[o.identifier]?"–":e[o.identifier]]:[],...s?[null===e[s.identifier]||isNaN(e[s.identifier])?"–":e[s.identifier]]:[]]))]}setData(e){let t;if(e&&(t=super.setData(e),d_(this.getOptions(),"zoomBar",Wy.TOP,"enabled"))){const e=d_(this.getOptions(),"zoomBar",Wy.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize(qg(e)):this.getDisplayData();let n=t;const{cartesianScales:r}=this.services;if(t&&r.domainAxisPosition&&r.rangeAxisPosition){const e=r.getDomainIdentifier(),i=r.getRangeIdentifier();let a=t.map((t=>t[e].getTime()));a=py(a).sort(),n=a.map((n=>{let r=0;const a={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),a[e]=new Date(n),a[i]=r,a}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(e){const t=this.getOptions();if(!t.axes)return e;const n=[];return Object.keys(Wy).forEach((e=>{const r=Wy[e],i=t.axes[r];if(i&&i.scaleType===Ky.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===d_(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}}class VS extends FS{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData();return e.sort(((e,t)=>e.source.localeCompare(t.source))),[["Source","Target","Value"],...e.map((e=>[e.source,e.target,e.value]))]}}function HS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function GS(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function WS(e){return e.depth}function qS(e,t){return t-1-e.height}function ZS(e,t){return e.sourceLinks.length?e.depth:t-1}function YS(e){return function(){return e}}function KS(e,t){return QS(e.source,t.source)||e.index-t.index}function XS(e,t){return QS(e.target,t.target)||e.index-t.index}function QS(e,t){return e.y0-t.y0}function JS(e){return e.value}function eO(e){return e.index}function tO(e){return e.nodes}function nO(e){return e.links}function rO(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function iO({nodes:e}){for(const t of e){let e=t.y0,n=e;for(const n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(const e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function aO(){let e,t,n,r=0,i=0,a=1,o=1,s=24,l=8,c=eO,u=ZS,d=tO,h=nO,f=6;function p(){const p={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return function({nodes:e,links:t}){for(const[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];const r=new Map(e.map(((t,n)=>[c(t,n,e),t])));for(const[e,n]of t.entries()){n.index=e;let{source:t,target:i}=n;"object"!=typeof t&&(t=n.source=rO(r,t)),"object"!=typeof i&&(i=n.target=rO(r,i)),t.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:t,targetLinks:r}of e)t.sort(n),r.sort(n)}(p),function({nodes:e}){for(const t of e)t.value=void 0===t.fixedValue?Math.max(GS(t.sourceLinks,JS),GS(t.targetLinks,JS)):t.fixedValue}(p),function({nodes:e}){const t=e.length;let n=new Set(e),r=new Set,i=0;for(;n.size;){for(const e of n){e.depth=i;for(const{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw new Error("circular link");n=r,r=new Set}}(p),function({nodes:e}){const t=e.length;let n=new Set(e),r=new Set,i=0;for(;n.size;){for(const e of n){e.height=i;for(const{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw new Error("circular link");n=r,r=new Set}}(p),function(n){const c=function({nodes:e}){const n=HS(e,(e=>e.depth))+1,i=(a-r-s)/(n-1),o=new Array(n);for(const t of e){const e=Math.max(0,Math.min(n-1,Math.floor(u.call(null,t,n))));t.layer=e,t.x0=r+e*i,t.x1=t.x0+s,o[e]?o[e].push(t):o[e]=[t]}if(t)for(const e of o)e.sort(t);return o}(n);e=Math.min(l,(o-i)/(HS(c,(e=>e.length))-1)),function(t){const n=function(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(t,(t=>(o-i-(t.length-1)*e)/GS(t,JS)));for(const r of t){let t=i;for(const i of r){i.y0=t,i.y1=t+i.value*n,t=i.y1+e;for(const e of i.sourceLinks)e.width=e.value*n}t=(o-t+e)/(r.length+1);for(let e=0;e<r.length;++e){const n=r[e];n.y0+=t*(e+1),n.y1+=t*(e+1)}w(r)}}(c);for(let e=0;e<f;++e){const t=Math.pow(.99,e),n=Math.max(1-t,(e+1)/f);g(c,t,n),m(c,t,n)}}(p),iO(p),p}function m(e,n,r){for(let i=1,a=e.length;i<a;++i){const a=e[i];for(const e of a){let t=0,r=0;for(const{source:n,value:i}of e.targetLinks){let a=i*(e.layer-n.layer);t+=E(n,e)*a,r+=a}if(!(r>0))continue;let i=(t/r-e.y0)*n;e.y0+=i,e.y1+=i,_(e)}void 0===t&&a.sort(QS),v(a,r)}}function g(e,n,r){for(let i=e.length-2;i>=0;--i){const a=e[i];for(const e of a){let t=0,r=0;for(const{target:n,value:i}of e.sourceLinks){let a=i*(n.layer-e.layer);t+=x(e,n)*a,r+=a}if(!(r>0))continue;let i=(t/r-e.y0)*n;e.y0+=i,e.y1+=i,_(e)}void 0===t&&a.sort(QS),v(a,r)}}function v(t,n){const r=t.length>>1,a=t[r];b(t,a.y0-e,r-1,n),y(t,a.y1+e,r+1,n),b(t,o,t.length-1,n),y(t,i,0,n)}function y(t,n,r,i){for(;r<t.length;++r){const a=t[r],o=(n-a.y0)*i;o>1e-6&&(a.y0+=o,a.y1+=o),n=a.y1+e}}function b(t,n,r,i){for(;r>=0;--r){const a=t[r],o=(a.y1-n)*i;o>1e-6&&(a.y0-=o,a.y1-=o),n=a.y0-e}}function _({sourceLinks:e,targetLinks:t}){if(void 0===n){for(const{source:{sourceLinks:e}}of t)e.sort(XS);for(const{target:{targetLinks:t}}of e)t.sort(KS)}}function w(e){if(void 0===n)for(const{sourceLinks:t,targetLinks:n}of e)t.sort(XS),n.sort(KS)}function E(t,n){let r=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:i,width:a}of t.sourceLinks){if(i===n)break;r+=a+e}for(const{source:e,width:i}of n.targetLinks){if(e===t)break;r-=i}return r}function x(t,n){let r=n.y0-(n.targetLinks.length-1)*e/2;for(const{source:i,width:a}of n.targetLinks){if(i===t)break;r+=a+e}for(const{target:e,width:i}of t.sourceLinks){if(e===n)break;r-=i}return r}return p.update=function(e){return iO(e),e},p.nodeId=function(e){return arguments.length?(c="function"==typeof e?e:YS(e),p):c},p.nodeAlign=function(e){return arguments.length?(u="function"==typeof e?e:YS(e),p):u},p.nodeSort=function(e){return arguments.length?(t=e,p):t},p.nodeWidth=function(e){return arguments.length?(s=+e,p):s},p.nodePadding=function(t){return arguments.length?(l=e=+t,p):l},p.nodes=function(e){return arguments.length?(d="function"==typeof e?e:YS(e),p):d},p.links=function(e){return arguments.length?(h="function"==typeof e?e:YS(e),p):h},p.linkSort=function(e){return arguments.length?(n=e,p):n},p.size=function(e){return arguments.length?(r=i=0,a=+e[0],o=+e[1],p):[a-r,o-i]},p.extent=function(e){return arguments.length?(r=+e[0][0],a=+e[1][0],i=+e[0][1],o=+e[1][1],p):[[r,i],[a,o]]},p.iterations=function(e){return arguments.length?(f=+e,p):f},p}var oO=Math.PI,sO=2*oO,lO=1e-6,cO=sO-lO;function uO(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dO(){return new uO}function hO(e){return function(){return e}}function fO(e){return e[0]}function pO(e){return e[1]}uO.prototype=dO.prototype={constructor:uO,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,c=a-e,u=o-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>lO)if(Math.abs(u*s-l*c)>lO&&i){var h=n-a,f=r-o,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((oO-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,_=y/g;Math.abs(b-1)>lO&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+_*s)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,a){e=+e,t=+t,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>lO||Math.abs(this._y1-c)>lO)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%sO+sO),d>cO?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>lO&&(this._+="A"+n+","+n+",0,"+ +(d>=oO)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var mO=Array.prototype.slice;function gO(e){return e.source}function vO(e){return e.target}function yO(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function bO(){return function(e){var t=gO,n=vO,r=fO,i=pO,a=null;function o(){var o,s=mO.call(arguments),l=t.apply(this,s),c=n.apply(this,s);if(a||(a=o=dO()),e(a,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r="function"==typeof e?e:hO(+e),o):r},o.y=function(e){return arguments.length?(i="function"==typeof e?e:hO(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}(yO)}function _O(e){return[e.source.x1,e.y0]}function wO(e){return[e.target.x0,e.y1]}class EO extends Tx{constructor(){super(...arguments),this.type="alluvial",this.renderType=Vy.SVG,this.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random())}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0});t.html("");const{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.model.getOptions(),a=this.model.getDisplayData(),o=d_(this.getOptions(),"color","gradient","enabled");let s=Xb;i.alluvial.nodePadding>Xb&&(s=i.alluvial.nodePadding);const l=d_(i,"alluvial","nodeAlignment");let c=ZS;l===Qy.LEFT?c=WS:l===Qy.RIGHT&&(c=qS);const u=aO().nodeId((e=>e.name)).nodeWidth(Kb).nodePadding(s).nodeAlign(c).extent([[2,30],[n-2,r]]);this.graph=u({nodes:i.alluvial.nodes.map((e=>Object.assign({},e))),links:a.map((e=>Object.assign({},e)))}),this.graph.nodes=this.graph.nodes.filter((e=>0!==e.value));const d={};this.graph.nodes.forEach((e=>{const t=e.x0;e.category&&(d[t]=null==e?void 0:e.category)})),t.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(d)).join("g").attr("transform",(e=>`translate(${e}, 0)`)).append("text").attr("id",((e,t)=>this.services.domUtils.generateElementIDString(`alluvial-category-${t}`))).style("font-size","14px").text((e=>d[e]?d[e]:"")).attr("y",20).attr("x",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-category-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0});let i=0;return e+i>=r&&(i=4-r),i}));const h=t.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(h.exit().remove(),o){const e=d_(this.getOptions(),"color","scale");e&&h.enter().append("linearGradient").attr("id",(e=>`${this.gradient_id}-link-${e.index}`)).attr("gradientUnits","userSpaceOnUse").call((t=>t.append("stop").attr("offset","0%").attr("stop-color",(t=>e[t.source.name])))).call((t=>t.append("stop").attr("offset","100%").attr("stop-color",(t=>e[t.target.name])))),h.exit().remove()}h.enter().append("path").classed("link",!0).attr("d",bO().source(_O).target(wO)).attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-line-${e.index}`))).attr("class",(e=>i.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e.source.index,originalClassName:"link"}))).style("stroke",(e=>o?`url(#${this.gradient_id}-link-${e.index})`:this.model.getFillColor(e.source.name))).attr("stroke-width",(e=>Math.max(1,e.width))).style("stroke-opacity",Qb.default).attr("aria-label",(e=>`${e.source.name} → ${e.target.name} (${e.value}${i.alluvial.units?" "+i.alluvial.units:""})`));const f=t.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-${e.index}`))).classed("node-group",!0).attr("transform",(e=>`translate(${e.x0}, ${e.y0})`));f.append("rect").classed("node",!0).attr("height",(e=>e.y1-e.y0)).attr("width",(e=>e.x1-e.x0)).attr("fill","black");const p=f.append("g").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${e.index}`)));p.append("text").attr("id",(e=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${e.index}`))).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((e=>`${e.name} (${e.value})`)).attr("aria-label",(e=>`${e.name} (${e.value})`)),p.append("rect").classed("node-text-bg",!0).attr("width",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-node-text-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0});return r+8})).attr("height",18).attr("stroke-width",2).lower(),p.attr("transform",((e,t)=>{const n=this.services.domUtils.generateElementIDString(`alluvial-node-text-${t}`),{width:r}=Cx.getSVGElementSize(ht(`text#${n}`),{useBBox:!0}),i=(e.y1-e.y0)/2-9;let a=e.x1-e.x0;return e.x1>=r?a-=r+16:a+=4,`translate(${a}, ${i})`})),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const e=this.getOptions(),t=this,n=Hv(((e,n="mouseover")=>{const r=t.parent.selectAll("path.link").transition().call((e=>t.services.transitions.setupTransition({transition:e,name:"alluvial-links-mouse-highlight"})));"mouseout"===n?(ht(e).lower(),r.style("stroke-opacity",Qb.default)):r.style("stroke-opacity",(function(){return e===this?(ht(this).raise(),Qb.selected):Qb.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){const a=ht(this);n(this,"mouseover"),a.classed("link-hovered",!0);const o=getComputedStyle(this).getPropertyValue("stroke");t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEOVER,{event:r,element:a,datum:i}),t.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:i.target.name,value:i.value+(e.alluvial.units?` ${e.alluvial.units}`:""),color:o,labelIcon:t.getRightArrowIcon()}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEMOVE,{event:e,element:ht(this),datum:n}),t.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(Fy.Alluvial.LINE_CLICK,{event:e,element:ht(this),datum:n})})).on("mouseout",(function(e,r){const i=ht(this);n(this,"mouseout"),i.classed("link-hovered",!1),t.services.events.dispatchEvent(Fy.Alluvial.LINE_MOUSEOUT,{event:e,element:i,datum:r}),t.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:e,hoveredElement:i})}))}addNodeEventListener(){const e=this,t=Hv(((t=[],n="mouseover")=>{"mouseout"!==n&&0!==t.length?e.parent.selectAll("path.link").transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"alluvial-link-mouse-highlight"}))).style("stroke-opacity",(function(e){return t.some((t=>t===e.index))?(ht(this).classed("link-hovered",!0).raise(),Qb.selected):Qb.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,(e=>e.index)).order().style("stroke-opacity",Qb.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(n,r){const i=ht(this),a=[];if(e.traverse({link:"sourceLinks",node:"target"},r,a),e.traverse({link:"targetLinks",node:"source"},r,a),a.length){const o=s_(i.attr("transform"));if(i.attr("transform",`translate(${o.x-2}, ${o.y})`),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){const t=e.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),n=e.parent.select(`g#${t}`),i=s_(n.attr("transform"));n.attr("transform",`translate(${i.x+4},${i.y})`)}const s=e.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);e.parent.select(`text#${s}`).style("font-weight","bold"),t(a,"mouseover"),e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEOVER,{event:n,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Alluvial.NODE_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(n,r){const i=ht(this),a=s_(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform",`translate(${a.x+2}, ${a.y})`).select("rect.node").attr("width",Kb),r.x0-2==0){const t=e.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),n=e.parent.select(`g#${t}`),i=s_(n.attr("transform"));n.attr("transform",`translate(${i.x-4},${i.y})`)}const o=e.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);e.parent.select(`text#${o}`).style("font-weight","normal"),t([],"mouseout"),e.services.events.dispatchEvent(Fy.Alluvial.NODE_MOUSEOUT,{event:n,element:i,datum:r}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i})}))}traverse(e,t,n=[]){t[e.link].map((t=>(n.push(t.index),t[e.node]))).forEach((t=>this.traverse(e,t,n)))}getRightArrowIcon(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect width="32" height="32"/>\n\t\t</svg>'}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}const xO=class e extends Tx{constructor(){super(...arguments),this.type="grid-brush",this.renderType=Vy.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const i=Cx.appendOrSelect(n,"svg.chart-grid-backdrop"),a=Cx.appendOrSelect(i,`g.${this.type}`),o=Cx.appendOrSelect(a,this.selectionSelector),{width:s,height:l}=Cx.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const f=Cx.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===Ky.TIME){let t=this.model.get("zoomDomain");void 0===t&&(t=this.services.zoom.getDefaultZoomBarDomain(),t&&this.model.set({zoomDomain:t},{animate:!1}));const n=t=>{const n=t[1]-t[0];let r="0,"+n.toString();const i=Math.floor(l/e.DASH_LENGTH),a=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),f.attr("stroke-dasharray",r)},r=e=>{const t=e.selection;null===t||t[0]===t[1]||(f.attr("x",parseFloat(o.attr("x"))+parseFloat(i.attr("x"))).attr("y",o.attr("y")).attr("width",o.attr("width")).attr("height",o.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=yu().range([0,s]).domain(t);let i=[r.invert(e),r.invert(n)];i[0].valueOf()===i[1].valueOf()&&(i=this.services.zoom.getDefaultZoomBarDomain()),(t[0].valueOf()!==i[0].valueOf()||t[1].valueOf()!==i[1].valueOf())&&this.services.zoom.handleDomainChange(i)};let u;const d=e=>{const t=e.selection;null!==t&&(c(t[0],t[1]),a.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=Zr().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),a.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=ft(a.node(),e)[0];let n=t-s*h/2;n<0&&(n=0);let r=t+s*h/2;r>s&&(r=s),c(n,r)}}))}}};xO.DASH_LENGTH=4;let SO=xO;class OO extends Tx{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=Vy.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=Zr(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(Fy.ZoomBar.UPDATE,this.render.bind(this));const e=d_(this.getOptions(),"zoomBar",Wy.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer(),n=this.services.zoom.isZoomBarLoading(Wy.TOP),r=this.services.zoom.isZoomBarLocked(Wy.TOP),i=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),a=d_(this.getOptions(),"axes",Wy.BOTTOM,"highlights"),o=r_.height[i],{width:s}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const u=this.model.get("axesMargins");u&&u.left&&(l=u.left);const d=Cx.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(Cx.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",r_.spacerHeight).attr("opacity",1).attr("fill","none"),i===qy.GRAPH_VIEW?Cx.appendOrSelect(d,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",s-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):i===qy.SLIDER_VIEW&&Cx.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",l).attr("y",o/2-1).attr("width",s-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(d,l,s);const{cartesianScales:h}=this.services,f=h.getMainXScale(),p=h.getMainYScale(),m=h.getMainXScaleType();if(f&&m===Ky.TIME){let e=this.services.zoom.getZoomBarData();if(iy(e)||1===e.length)return;this.xScale=f.copy(),this.yScale=p.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const u=this.model.get("initialZoomDomain"),h=d_(this.getOptions(),"zoomBar",Wy.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||u&&u[0].valueOf()===h[0].valueOf()&&u[1].valueOf()===h[1].valueOf()?null===h&&null!==u&&this.model.set({initialZoomDomain:null,zoomDomain:sy([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:sy([],h),zoomDomain:h?sy([],h):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(c(e,(e=>e.value)));const m=this.model.get("zoomDomain");if(i===qy.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(d,l,s),a)){const e=a.highlightStartMapsTo,t=a.highlightEndMapsTo,n=a.color,r=a.labelMapsTo;a.data.forEach(((i,a)=>{Cx.appendOrSelect(d,`rect.highlight-${a}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(i[e])).attr("width",this.xScale(i[t])-this.xScale(i[e])).style("fill",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(m,l,s);const g=Cx.appendOrSelect(t,this.brushSelector).call(this.brush);if(void 0!==m)if(m[0].valueOf()===m[1].valueOf())g.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const e=m.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(g.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),g.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),i=r_.height[r];this.brush.extent([[t,0],[n,i]]).on("start brush end",null).on("start brush end",(t=>{const n=t.selection;null===n?this.handleBrushedEvent(t,e,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(t,e,this.xScale,n)}))}handleBrushedEvent(e,t,n,r){const i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),null!=e.sourceEvent&&("mousemove"===e.sourceEvent.type||"mouseup"===e.sourceEvent.type||"mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type||"touchmove"===e.sourceEvent.type||"touchend"===e.sourceEvent.type)){let n;(void 0===t||t[0]!==i[0]||t[1]!==i[1])&&this.services.zoom.handleDomainChange(i,{dispatchEvent:!1}),"start"===e.type?n=Fy.ZoomBar.SELECTION_START:"brush"===e.type?n=Fy.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=Fy.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(Fy.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=r_.handleWidth,i=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),a=r_.height[i],o=-r/2,s=r_.handleBarWidth,l=i===qy.GRAPH_VIEW?r_.handleBarHeight:6,c=-s/2,u=(a-l)/2;e.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(e){return"w"===e.type?Math.max(t[0]+o,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+o,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",a).attr("cursor","ew-resize").style("display",null);const d=e.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(e){return"handle-bar handle-bar--"+e.type})),d.attr("x",(function(e){return"w"===e.type?Math.max(t[0]+c,n.maxSelectionRange[0]-o+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+o+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===qy.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],a)}updateSliderSelectedArea(e){const t=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),n=r_.height[t],r=this.getComponentContainer().select("svg.zoom-container");Cx.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",e[0]).attr("y",n/2-1).attr("width",e[1]-e[0]).attr("height",2)}renderZoomBarArea(e,t,n,r){const{cartesianScales:i}=this.services,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,a),d=c(this.yScale,l,o),h=d_(this.getOptions(),"zoomBar",Wy.TOP,"type"),f=r_.height[h],p=qu().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Cx.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,a){const o=Cx.appendOrSelect(e,"clipPath").attr("id",t);Cx.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=qg(e),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(t[0])<Number(n[0][r])){const e={};e[r]=t[0],e[i]=0,n.unshift(e)}if(Number(t[1])>Number(n[n.length-1][r])){const e={};e[r]=t[1],e[i]=0,n.push(e)}return n}renderZoomBarBaseline(e,t,n,r=!1){const i=d_(this.model.getOptions(),"zoomBar",Wy.TOP,"type"),a=r_.height[i],o=Wu()([[t,a],[n,a]]);Cx.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(e,t,n){this.renderZoomBarArea(e,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(e,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Cx.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),d_(this.getOptions(),"zoomBar",Wy.TOP,"type")===qy.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(Fy.ZoomBar.UPDATE,this.render.bind(this))}}class CO extends Tx{constructor(e,t){super(e,t),this.type="threshold",this.renderType=Vy.SVG,this.positionService=new NS}render(e=!1){const t=d_(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(Wy).includes(e)){const r=t[e];r.thresholds&&r.thresholds.length>0&&n.push({axisPosition:e,thresholds:r.thresholds,correspondingDatasets:null==r?void 0:r.correspondingDatasets,mapsTo:null==r?void 0:r.mapsTo})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-thresholds ${e.axisPosition}`));const a=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(a).attr("class","threshold-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getScaleByPosition(t),r=s.services.cartesianScales.getScaleTypeByPosition(t);let i=null,a=null;t===Wy.LEFT||t===Wy.RIGHT?(a=n,i=s.services.cartesianScales.getMainXScale()):(i=n,a=s.services.cartesianScales.getMainYScale());const o=r===Ky.LABELS,[l,c]=i.range(),[u,d]=a.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=p_((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=ht(this);t===Wy.TOP||t===Wy.BOTTOM?(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("y1",d).attr("y2",u).attr("x1",(({datum:e})=>p(e)+(o?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(o?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:e})=>-p(e))).attr("width",Math.abs(u-d)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:e})=>m(e)+(o?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(o?n.step()/2:0))).style("stroke",(({fillColor:e})=>e)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:e})=>m(e))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(Fy.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(Fy.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===Ky.TIME){const e=[Wy.LEFT,Wy.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),o=e?a:i,s=d_(r,"timeScale"),l=RE(o.ticks(),d_(s,"timeInterval"));return LE(t,0,o.ticks(),l,s)}return t.toLocaleString("en")}appendThresholdLabel(){const e=ht(this.services.domUtils.getHolder()),t=d_(this.getOptions(),"style","prefix");this.label=Cx.appendOrSelect(e,`div.${_b}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=ft(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(`${t.label||"Threshold"}: ${i}`).style("background-color",t.fillColor);const a=this.label.node(),o=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},a,[TS.RIGHT,TS.LEFT,TS.TOP,TS.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},a,o);this.positionService.setElement(a,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=d_(e,"correspondingDatasets",0)),n[e.mapsTo]=t.value,n}addEventListeners(){const e=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(t){ht(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(Fy.Threshold.SHOW,{event:t,hoveredElement:ht(this),datum:ht(this).datum()})})).on("mouseout",(function(t){ht(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(Fy.Threshold.HIDE,{event:t,hoveredElement:ht(this),datum:ht(this).datum()})}))}}class TO extends Tx{constructor(e,t){super(e,t),this.type="highlight",this.renderType=Vy.SVG,this.positionService=new NS,this.highlightStrokeWidth=1}render(e=!1){const t=d_(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(Wy).includes(e)){const r=t[e];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:e,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(e=>e.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(e=>`axis-highlight ${e.axisPosition}`));const a=i.selectAll("g.highlight-group").data((e=>e.highlight.map((t=>(t.axisPosition=e.axisPosition,t.highlightStartMapsTo=e.highlightStartMapsTo,t.labelMapsTo=e.labelMapsTo,t.color=e.color,t.highlightEndMapsTo=e.highlightEndMapsTo,t)))));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(a).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,a]=n.range(),[o,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=p_((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=ht(this);t===Wy.TOP||t===Wy.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("y",Math.max(l+s.highlightStrokeWidth,0)).attr("height",Math.max(o-2*s.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:e,...t})=>d(t[e]))).attr("width",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)):f.selectAll("rect.highlight-bar").transition().call((t=>s.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e}))).attr("x",i).attr("width",Math.max(a-i,0)).attr("y",(({highlightEndMapsTo:e,...t})=>h(t[e]))).attr("height",(({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null))}))}}class AO extends IS{getItems(e){if(e.detail.items)return e.detail.items;const{data:t}=e.detail;if(!t||!t.length||!t[0])return[];const n=this.getOptions(),{cartesianScales:r}=this.services,i=r.getDomainIdentifier(),a=r.isDualAxes(),{groupMapsTo:o}=n.data,s=r.getDomainLabel();let l=r.getRangeLabel();const c=t[0][i];let u;if(1===t.length){const i=t[0],d=r.getRangeIdentifier(i);if(a){const e=r.getRangeAxisPosition({datum:i,groups:[i[o]]});l=r.getScaleLabel(e)}const h=i[d];u=[{label:s,value:c},...Array.isArray(h)&&2===h.length?[{label:"Start",value:h[0]},{label:"End",value:h[1]}]:[{label:l,value:i[d]}]],e.detail.additionalItems&&e.detail.additionalItems.forEach((e=>u.push({label:e.label,value:e.value}))),u.push({label:n.tooltip.groupLabel,value:i[o],color:this.model.getFillColor(i[o]),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:i[o]})})}else if(t.length>1&&(u=[{label:s,value:c}],u=u.concat(t.map((e=>{const t=e[r.getRangeIdentifier(e)];return{label:e[o],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[o]),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:e[o]})}})).sort(((e,t)=>t.value-e.value))),!a&&!0===d_(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:wp(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}class MO extends Ox{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:e=null}={}){if(this.dualAxes&&e){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,r=d_(t,"axes",this.secondaryDomainAxisPosition),i=e[n];if(null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(i))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:e=null,groups:t=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=d_(n,"axes",this.secondaryRangeAxisPosition);let a;if(null!==e?a=e[r]:t&&t.length>0&&(a=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return d_(this.model.getOptions(),"axes",e)}getDomainAxisOptions(){const e=this.getDomainAxisPosition();return this.getAxisOptions(e)}getRangeAxisOptions(){const e=this.getRangeAxisPosition();return this.getAxisOptions(e)}getScaleLabel(e){return this.getAxisOptions(e).title||(e===Wy.BOTTOM||e===Wy.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(Wy).map((e=>Wy[e])).forEach((e=>{this.scales[e]=this.createScale(e)}))}findDomainAndRangeAxes(){const e=this.findVerticalAxesPositions(),t=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(e,t);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==Wy.LEFT&&this.rangeAxisPosition!==Wy.RIGHT||this.domainAxisPosition!==Wy.BOTTOM&&this.domainAxisPosition!==Wy.TOP?this.orientation=Yy.HORIZONTAL:this.orientation=Yy.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),a=d_(i,"axes");(null!=(e=a[Wy.LEFT])&&e.correspondingDatasets&&a[Wy.RIGHT]||null!=(t=a[Wy.RIGHT])&&t.correspondingDatasets&&a[Wy.LEFT]||null!=(n=a[Wy.TOP])&&n.correspondingDatasets&&a[Wy.BOTTOM]||null!=(r=a[Wy.BOTTOM])&&r.correspondingDatasets&&a[Wy.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=d_(this.model.getOptions(),"axes",e,"domain");if(t&&!Array.isArray(t))throw new Error(`Domain in ${e} axis is not a valid array`);if(Array.isArray(t)&&(this.scaleTypes[e]===Ky.LINEAR||this.scaleTypes[e]===Ky.TIME)&&2!==t.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[e]}`);return t}getOrientation(){return this.orientation}getScaleByPosition(e){return this.scales[e]}getScaleTypeByPosition(e){return this.scaleTypes[e]}getDomainAxisScaleType(){const e=this.getDomainAxisPosition();return this.getScaleTypeByPosition(e)}getRangeAxisScaleType(){const e=this.getRangeAxisPosition();return this.getScaleTypeByPosition(e)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const e=[Wy.BOTTOM,Wy.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[Wy.LEFT,Wy.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(e,t,n,r){const i=this.model.getOptions(),a=d_(i,"axes")[n],{mapsTo:o}=a,s=null!==d_(r,o)?r[o]:r;let l;switch(t){case Ky.LABELS:l=e(s)+e.step()/2;break;case Ky.TIME:l=e(new Date(s));break;default:l=e(s)}return l}getBoundedScaledValues(e){const{bounds:t}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:e}),r=this.scales[n],i=this.model.getOptions(),a=d_(i,"axes")[n],{mapsTo:o}=a,s=void 0!==e[o]?e[o]:e;return[r(null!==d_(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==d_(e,t.lowerBoundMapsTo)?e[t.lowerBoundMapsTo]:s)]}getValueThroughAxisPosition(e,t){const n=this.scaleTypes[e],r=this.scales[e];return this.getValueFromScale(r,n,e,t)}getDomainValue(e){const t=this.getDomainAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getRangeValue(e){const t=this.getRangeAxisPosition({datum:e});return this.getValueThroughAxisPosition(t,e)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(e){const t=this.model.getOptions();return d_(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return d_(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=d_(n,"axes",e);return r.scaleType===Ky.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return K_(r,n)>1?[Gw(n,t),I_(r,t)]:Z_(r,n)>1?[jw(n,t),x_(r,t)]:j_(r,n)>1?[Uw(n,t),E_(r,t)]:function(e,t,n){__(2,arguments);var r=F_(e,t)/B_;return G_(null==n?void 0:n.roundingMethod)(r)}(r,n)>1?[Fw(n,t),C_(r,t)]:W_(r,n)>30?[Vw(n,30*t),R_(r,30*t)]:W_(r,n)>1?[Vw(n,t),R_(r,t)]:Y_(r,n)>15?[Hw(n,15*t),N_(r,15*t)]:Y_(r,n)>1?[Hw(n,t),N_(r,t)]:[n,r]}(t,d_(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,a=t<=0&&t+i>0?0:t+i;let o=e>=0&&e-i<0?0:e-i;if(r===Ky.LOG&&o<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");o=e}return[o,a]}(t,Sb,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=d_(e,"axes"),n=this.isDualAxes();return null===d_(t,Wy.LEFT)&&null!==d_(t,Wy.RIGHT)||!0===d_(t,Wy.RIGHT,"main")||n&&d_(t,Wy.LEFT,"correspondingDatasets")?{primary:Wy.RIGHT,secondary:Wy.LEFT}:{primary:Wy.LEFT,secondary:Wy.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=d_(e,"axes"),n=this.isDualAxes();return null===d_(t,Wy.BOTTOM)&&null!==d_(t,Wy.TOP)||!0===d_(t,Wy.TOP,"main")||n&&d_(t,Wy.BOTTOM,"correspondingDatasets")?{primary:Wy.TOP,secondary:Wy.BOTTOM}:{primary:Wy.BOTTOM,secondary:Wy.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=d_(n,"axes",e.primary),i=d_(n,"axes",t.primary),a=r.scaleType||Ky.LINEAR,o=i.scaleType||Ky.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary,(!(o===Ky.LABELS||o===Ky.TIME)&&a===Ky.LABELS||a===Ky.TIME)&&(s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary),s}getScaleDomain(e){const t=this.model.getOptions(),n=d_(t,"axes",e),r=d_(t,"bounds"),{includeZero:i}=n,a=d_(n,"scaleType")||Ky.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,T(e,(e=>e.length))]}if(n.limitDomainToBins){const{bins:e}=this.model.getBinConfigurations(),t=this.model.getStackKeys({bins:e});return[t[0].split("-")[0],t[t.length-1].split("-")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:u,thresholds:d}=n,{reference:h,compareTo:f}=xb;if(n.domain)return a===Ky.LABELS?n.domain:(a===Ky.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(u)return[0,100];if(n&&a===Ky.LABELS)return py(o.map((e=>e[l])));let p,m;const g=this.model.getDataGroupNames();if(a===Ky.LABELS_RATIO)return o.map((e=>`${e[h]}/${e[f]}`));if(a===Ky.TIME)m=o.map((e=>+new Date(e[l])));else if(r&&t.axes)m=[],o.forEach((e=>{m.push(e[l]),e[r.upperBoundMapsTo]&&m.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&m.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&g&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:g}),r=o.filter((t=>!g.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(t).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),m=[...Cp(i),...r.map((e=>e[l]))]}else m=[],o.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(m.push(t[0]),m.push(t[1])):(s&&m.push(Math.max(e[l],e[s])),m.push(t))}));return a!==Ky.TIME&&a!==Ky.LOG&&i&&m.push(0),d&&d.length>0&&d.forEach((e=>{const t=d_(e,"value");null!==t&&m.push(t)})),p=c(m),p=this.extendsDomain(e,p),p}createScale(e){const t=this.model.getOptions(),n=d_(t,"axes",e);if(!n)return null;const r=d_(n,"scaleType")||Ky.LINEAR;let i;return this.scaleTypes[e]=r,i=r===Ky.TIME?yu():r===Ky.LOG?ll().base(n.base||10):r===Ky.LABELS||r===Ky.LABELS_RATIO?js():Js(),i.domain(this.getScaleDomain(e)),i}getHighestDomainThreshold(){const e=d_(this.model.getOptions(),"axes"),t=this.getDomainAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getDomainScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return this.getScaleTypeByPosition(t)===Ky.TIME&&("string"==typeof i.value||void 0===i.value.getTime)&&(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}}getHighestRangeThreshold(){const e=d_(this.model.getOptions(),"axes"),t=this.getRangeAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getRangeScale(),i=n.sort(((e,t)=>t.value-e.value))[0];return{threshold:i,scaleValue:r(i.value)}}}class kO extends Ox{constructor(){super(...arguments),this.curveTypes={curveLinear:Vu,curveLinearClosed:kd,curveBasis:ld,curveBasisClosed:ud,curveBasisOpen:hd,curveBundle:pd,curveCardinal:vd,curveCardinalClosed:bd,curveCardinalOpen:wd,curveCatmullRom:Sd,curveCatmullRomClosed:Cd,curveCatmullRomOpen:Ad,curveMonotoneX:Bd,curveMonotoneY:zd,curveNatural:Fd,curveStep:Hd,curveStepAfter:Wd,curveStepBefore:Gd}}getD3Curve(){let e="curveLinear";const t=this.model.getOptions().curve;if(t&&(e="string"==typeof t?t:t.name),this.curveTypes[e]){let n=this.curveTypes[e];return t&&Object.keys(t).forEach((e=>{n[e]&&(n=n[e](t[e]))})),n}return console.warn(`The curve type '${e}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class LO extends Ox{isZoomBarEnabled(){if(!this.services.cartesianScales||!d_(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=d_(this.model.getOptions(),"axes",e,"scaleType");return e===Wy.BOTTOM&&t===Ky.TIME}getZoomBarData(){const e=this.model.getZoomBarData();return e&&e.length>1?e:this.model.getDisplayData()}getDefaultZoomBarDomain(e){if(!this.services.zoom)throw new Error("Services zoom not defined");const t=e||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),a=d_(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(a)&&2===a.length)return a;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,c(t,(e=>e[i])))}handleDomainChange(e,t={dispatchEvent:!0}){var n;this.model.set({zoomDomain:e},{animate:!1}),t.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(Fy.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return d_(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),a=d_(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&a&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),a=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(a.length>0)return a}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=r_.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const a=i(n[0]),o=i(n[1]);if(o-a<r+1)return;const s=i.range(),l=o-a,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=a+c,d=o-c;u>=d&&(u=a+l/2-r/2,d=o-l/2+r/2);const h=[i.invert(u),i.invert(d)];(n[0].valueOf()!==h[0].valueOf()||n[1].valueOf()!==h[1].valueOf())&&this.handleDomainChange(h)}zoomOut(e=this.getZoomRatio()){const t=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());const r=n(t[0]),i=n(t[1]),a=n.range(),o=(a[1]-a[0])/2*(e/2),s=Math.max(r-o,a[0]),l=Math.min(i+o,a[1]),c=[n.invert(s),n.invert(l)];(t[0].valueOf()!==c[0].valueOf()||t[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();(e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())&&this.handleDomainChange(t)}isMinZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t)&&(e[1].valueOf()-e[0].valueOf())/(t[1].valueOf()-t[0].valueOf())<d_(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const e=this.model.get("zoomDomain"),t=this.getDefaultZoomBarDomain();return!(!e||!t||e[0].valueOf()!==t[0].valueOf()||e[1].valueOf()!==t[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(e){return d_(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return d_(this.model.getOptions(),"zoomBar",e,"locked")}}class DO extends jS{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:MO,curves:kO,zoom:LO}),this.model=new FS(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"zoomBar",Wy.TOP,"enabled"),i=d_(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),o=d_(n,"axes",a,"scaleType"),s=r&&a===Wy.BOTTOM&&o===Ky.TIME,l=this.services.zoom.isZoomBarLocked(Wy.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},d={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},h={id:"header",components:[new Lx(this.model,this.services,[u,...i?[d]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},f={id:"legend",components:[new MS(this.model,this.services)],growth:nb.PREFERRED};s&&!l&&e.push(new kS(this.model,this.services),new SO(this.model,this.services)),e.push(new CO(this.model,this.services)),e.push(new TO(this.model,this.services));const p={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},m=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=tb.COLUMN;if(m){const e=d_(this.model.getOptions(),"legend","position");e===Xy.LEFT?(g=tb.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Jy.VERTICAL)):e===Xy.RIGHT?(g=tb.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Jy.VERTICAL)):e===Xy.BOTTOM&&(g=tb.COLUMN_REVERSE)}const v={id:"spacer",components:[new Dx(this.model,this.services)],growth:nb.PREFERRED},y={id:"full-frame",components:[new Lx(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:nb.STRETCH},b={id:"zoom-bar",components:[new OO(this.model,this.services)],growth:nb.PREFERRED,renderType:Vy.SVG},_=[];if(c||i){_.push(h);const e={id:"spacer",components:[new Dx(this.model,this.services,i?{size:15}:void 0)],growth:nb.PREFERRED};_.push(e)}return s&&_.push(b),_.push(y),[new AO(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,_,{direction:tb.COLUMN})]}}class RO extends Tx{constructor(){super(...arguments),this.type="grid",this.renderType=Vy.SVG}render(e=!0){const t=d_(this.getOptions(),"grid","x","enabled"),n=d_(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Cx.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Cx.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=q(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(d_(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=d_(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=d_(this.getOptions(),"grid","x","numberOfTicks");r.ticks(e)}const i=t.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}drawYGrid(e){const t=this.parent,n=this.backdrop.attr("width"),r=Z(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(d_(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=d_(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=d_(this.getOptions(),"grid","y","numberOfTicks");r.ticks(e)}const i=t.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);e?i.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e}))).call(r):i.call(r),this.cleanGrid(i)}getGridlineThreshold(e){const t=this.parent,n=t.selectAll(".x.grid .tick").nodes().sort(((e,t)=>Number(o_(e).tx)-Number(o_(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+o_(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,a=n[r],o=n[i];let s;if(a)if(o)s=+o_(o).tx-+o_(a).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Cx.getSVGElementSize(e).width-+o_(a).tx}else s=+o_(o).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=d_(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=o_(this),r=Number(n.tx)-t,i=Number(n.tx)+t;return r<=e[0]&&e[0]<=i}))}drawBackdrop(e,t){const n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),[a,o]=r.range(),[s,l]=i.range();this.backdrop=Cx.appendOrSelect(n,"svg.chart-grid-backdrop");const c=Cx.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",a).attr("y",l).attr("width",Math.abs(o-a)).attr("height",Math.abs(s-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(e){e.selectAll("text").remove(),e.select(".domain").remove()}}class NO extends Tx{constructor(){super(...arguments),this.type="area",this.renderType=Vy.SVG,this.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-area"}))).attr("opacity",(e=>e.name!==t.datum().name?wb.unselected:wb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-area"}))).attr("opacity",wb.selected)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions();let r=[0,0];const{cartesianScales:i}=this.services,a=i.getOrientation(),o=qu().curve(this.services.curves.getD3Curve()).defined((e=>null!=e[i.getRangeIdentifier()])),s=this.model.getGroupedData(this.configs.groups),l=d_(n,"bounds"),c=l&&s&&1===s.length;!c&&l&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${s.length}`);let u=0;const d=(e,t)=>{!1===d_(n,"axes",e,"includeZero")&&t[0]>0&&t[1]>0&&(u=t[0])},h=e=>c?i.getBoundedScaledValues(e)[0]:i.getRangeValue(u),f=e=>c?i.getBoundedScaledValues(e)[1]:i.getRangeValue(e);a===Yy.VERTICAL?(r=i.getMainYScale().domain(),d(i.getMainYAxisPosition(),r),o.x((e=>i.getDomainValue(e))).y0((e=>h(e))).y1((e=>f(e)))):(r=i.getMainXScale().domain(),d(i.getMainXAxisPosition(),r),o.x0((e=>h(e))).x1((e=>f(e))).y((e=>i.getDomainValue(e))));const p=d_(n,"color","gradient","enabled"),m=s&&1===s.length&&p;s.length>1&&p&&console.error("Gradients can only be enabled when having 1 single dataset");const g=t.selectAll("path.area").data(s,(e=>e.name)),v=ht(this.services.domUtils.getMainContainer());if(g.exit().attr("opacity",0).remove(),!s.length)return;if(m){const e=v.select(`path.${this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:s[0].name})}`).node();let t;if(e)t=getComputedStyle(e,null).getPropertyValue("stroke");else{const e=d_(this.model.getOptions(),"color","scale");null!==e&&(t=e[Object.keys(e)[0]])}zS.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${s[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:zS.getStops(r,t)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));const y=this,b=g.enter().append("path");m?b.merge(g).style("fill",(e=>`url(#${this.services.domUtils.generateElementIDString(`${e.name.replace(" ","")}_${this.gradient_id}`)})`)).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.name,originalClassName:"area"}))).attr("d",(e=>{const{data:t}=e;return o(t)})):(b.attr("opacity",0).merge(g).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"area"}))).style("fill",(e=>y.model.getFillColor(e.name))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"area-update-enter",animate:e}))).attr("opacity",c?1:wb.selected).attr("d",(e=>{const{data:t}=e;return o(t)})),c&&b.attr("fill-opacity",wb.selected).style("stroke",(e=>y.model.getStrokeColor(e.name))).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class IO extends Tx{constructor(){super(...arguments),this.type="line",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e.name!==t.datum().name?Nb.unselected:Nb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Nb.selected)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,a]=p_((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),o=this.getOptions(),s=Wu().x(i).y(a).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(o.axes).some((e=>o.axes[e].percentage)),{groupMapsTo:t}=o.data;l=this.model.getStackedData({groups:this.configs.groups,percentage:e}).map((e=>{const n=this.services.cartesianScales.getDomainIdentifier(e),r=this.services.cartesianScales.getRangeIdentifier(e);return{name:d_(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!cy(e,(e=>e[0]!==e[1]))}}))}else l=this.model.getGroupedData(this.configs.groups);const c=t.selectAll("path.line").data(l,(e=>e.name));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("line",!0).attr("opacity",0).merge(c).data(l,(e=>e.name)).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(e=>{const{data:t}=e;return t.map((e=>e[this.services.cartesianScales.getRangeIdentifier(e)])).join(",")})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"line-update-enter",animate:e}))).attr("opacity",(e=>e.hidden?0:1)).attr("d",(e=>{const{data:t}=e;return s(t)}))}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class PO extends Tx{constructor(){super(...arguments),this.type="ruler",this.renderType=Vy.SVG,this.isXGridEnabled=d_(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=d_(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=d_(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(e){return e}showRuler(e,[t,n]){const r=this.parent,i=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[s,l]=o.range(),c=i===Yy.HORIZONTAL?n:t,u=Cx.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Cx.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=a.map((e=>({domainValue:this.services.cartesianScales.getDomainValue(e),originalData:e}))).filter((e=>function(e,t){return e>t-5&&e<t+5}(e.domainValue,c)));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map((e=>e.domainValue)).join()===this.pointsWithinLine.map((e=>e.domainValue)).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(Fy.Tooltip.MOVE,{mousePosition:[t,n]});this.pointsWithinLine=f;const p=this.pointsWithinLine.reduce(((e,t)=>{if(0===e.length)return e.push(t),e;const n=e[0].domainValue,r=Math.abs(c-t.domainValue),i=Math.abs(c-n);return r>i||(r<i?e=[t]:e.push(t)),e}),[]);if(p.length>0){const e=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),r=p.map((e=>e.domainValue)),a=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return r.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ay(this.elementsToHighlight,a)&&this.hideRuler(),a.dispatch("mouseover"),this.elementsToHighlight=a,this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(e)}),u.attr("opacity",1);const o=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",o.domainValue).attr("y2",o.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",o.domainValue).attr("x2",o.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Cx.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(Fy.Tooltip.HIDE),t.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const e=this,t=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let r=function(t){const n=ft(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const a=this;a.mousePosition=ft(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(a,i)}),t)}}((function(t){const{mousePosition:n}=this;e.showRuler(t,n)}),n.length%50*12.5,t)),this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const e=this.parent;this.backdrop=Cx.appendOrSelect(e,"svg.chart-grid-backdrop")}}class $O extends Tx{constructor(){super(...arguments),this.type="scatter",this.renderType=Vy.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-hover-scatter"})})).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"chart-holder-mouseout-scatter"})})).attr("opacity",0)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-hover-scatter"})})).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call((e=>{var t;return null==(t=this.services.transitions)?void 0:t.setupTransition({transition:e,name:"legend-mouseout-scatter"})})).attr("opacity",1)}}init(){const{events:e}=this.services;if(!e)throw new Error("Services events are undefined.");e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(Fy.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(Fy.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(e){const{cartesianScales:t}=this.services;if(!t)throw new Error("Services cartesianScales are undefined.");const n=t.getDomainIdentifier(e),r=this.model.get("zoomDomain");return void 0!==r?e.filter((e=>e[n].getTime()>=r[0].getTime()&&e[n].getTime()<=r[1].getTime())):e}getScatterData(){const e=this.getOptions(),{stacked:t}=this.configs;let n;if(t){const t=Object.keys(e.axes).some((t=>e.axes[t].percentage));n=this.model.getStackedData({groups:this.configs.groups,percentage:t})}else{const{cartesianScales:e}=this.services;if(!e)throw new Error("Services cartesianScales are undefined.");n=this.model.getDisplayData(this.configs.groups).filter((t=>{const n=e.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}))}return this.filterBasedOnZoomDomain(n)}render(e){if(!d_(this.getOptions(),"points","enabled")&&!d_(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const a=i.getDomainIdentifier(),o=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[a]}`));o.exit().attr("opacity",0).remove();const s=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(s,e),this.addEventListeners()}isDatapointThresholdAnomaly(e){const{handleThresholds:t}=this.configs;if(!t)return!1;const{cartesianScales:n}=this.services;if(!n)throw new Error("Cartesian scales service is undefined");const r=n.getOrientation(),[i,a]=p_(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[o,s]=p_((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=o(e),c=s(e);return a&&i?c<=a.scaleValue&&l>=i.scaleValue:a?c<=a.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=n.data,[s,l]=p_((e=>a.getDomainValue(e)),(e=>a.getRangeValue(e)),a.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=a.getDomainIdentifier(e),n=this.model.getIsFilled(e[o],e[t],e,r)?[Gy.FILL,Gy.STROKE]:[Gy.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[o],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=a.getDomainIdentifier(e);return this.model.getIsFilled(e[o],e[t],e,r)})).classed("unfilled",(e=>{const t=a.getDomainIdentifier(e);return!this.model.getIsFilled(e[o],e[t],e,r)})).transition().call((e=>{var n;return null==(n=this.services.transitions)?void 0:n.setupTransition({transition:e,name:"scatter-update-enter",animate:t})})).attr("cx",s).attr("cy",l).attr("r",n.points.radius).style("fill",(e=>{const t=a.getDomainIdentifier(e);if(this.model.getIsFilled(e[o],e[t],e,r))return this.model.getFillColor(e[o],e[t],e)})).style("stroke",(e=>{const t=a.getDomainIdentifier(e);return this.model.getStrokeColor(e[o],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[a.getRangeIdentifier(e)])),this.addEventListeners()}getTooltipAdditionalItems(e){return null}addEventListeners(){const e=this,{groupMapsTo:t}=e.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",(function(n,r){var i,a;const o=ht(this);o.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:n[t],originalClassName:o.attr("class")}))).style("fill",(n=>{var r;const i=null==(r=e.services.cartesianScales)?void 0:r.getDomainIdentifier(n);return e.model.getFillColor(n[t],n[i],n)})).classed("unfilled",!1),null==(i=e.services.events)||i.dispatchEvent(Fy.Tooltip.SHOW,{event:n,hoveredElement:o,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(a=e.services.events)||a.dispatchEvent(Fy.Scatter.SCATTER_MOUSEOVER,{event:n,element:o,datum:r})})).on("mousemove",(function(t,n){var r,i;const a=ht(this);null==(r=e.services.events)||r.dispatchEvent(Fy.Scatter.SCATTER_MOUSEMOVE,{event:t,element:a,datum:n}),null==(i=e.services.events)||i.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(Fy.Scatter.SCATTER_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(n,r){var i,a,o;const s=ht(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,a=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),o=e.model.getIsFilled(r[t],r[a],r,n);s.classed("unfilled",!o).style("fill",(r=>o||n?e.model.getFillColor(r[t],r[a],r):null))}null==(a=e.services.events)||a.dispatchEvent(Fy.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(o=e.services.events)||o.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:s})}))}destroy(){var e;null==(e=this.parent)||e.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:t}=this.services;if(!t)throw new Error("Services events undefined");t.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(Fy.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(Fy.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}class BO extends Tx{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=Vy.SVG,this.truncation={[Wy.LEFT]:!1,[Wy.RIGHT]:!1,[Wy.TOP]:!1,[Wy.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=d_(n,"axes",t,"visible"),i=this.getComponentContainer(),{width:a,height:o}=Cx.getSVGElementSize(i,{useAttrs:!0}),s=Cx.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===Wy.BOTTOM||t===Wy.TOP?(l=this.configs.axes[Wy.LEFT]?this.margins.left:0,c=this.configs.axes[Wy.RIGHT]?a-this.margins.right:a):(l=o-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(t);let d;switch(this.scaleType===Ky.LABELS||this.scaleType===Ky.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case Wy.LEFT:d=Z;break;case Wy.BOTTOM:d=q;break;case Wy.RIGHT:d=W;break;case Wy.TOP:d=G}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Cx.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${AS.GRAPHICS_OBJECT} ${AS.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Cx.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=d_(n,"axes",t),g=this.scaleType===Ky.TIME||m.scaleType===Ky.TIME,v=t===Wy.LEFT||t===Wy.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=d_(m,"scaleType"),_=d_(n,"data","loading"),w=d_(m,"ticks","number"),E=d_(m,"ticks","values"),x=d_(m,"truncation","type"),S=d_(m,"truncation","threshold"),O=d_(m,"truncation","numCharacter"),C=null!==w,T=d_(n,"timeScale"),A=Cx.appendOrSelect(p,"g.tick"),M=Cx.appendOrSelect(A,"text").text("0"),k=Cx.getSVGElementSize(M.node(),{useBBox:!0}).height;A.remove();const L=this.scaleType||m.scaleType||Ky.LINEAR,D=d(u).tickSizeOuter(0);if(u.ticks){let e;if(C?e=w:(e=Eb.number,v&&(e=this.getNumberOfFittingTicks(o,k,Eb.verticalSpaceRatio))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),D.ticks(e),g)if(u.ticks(e).length){const r=d_(n,"timeScale","addSpaceOnEdges"),i=d_(n,"axes",t,"domain"),a=u.copy();r&&!i&&a.nice(e);const o=a.ticks(e);r&&o.length>2&&!i&&(o.splice(o.length-1,1),o.splice(0,1)),D.tickValues(o)}else D.tickValues([])}let R;const N=d_(m,"ticks","formatter");if(g){const e=RE(D.tickValues(),d_(n,"timeScale","timeInterval"));R=null===N?(t,n)=>LE(t,n,D.tickValues(),e,T):(t,n)=>{const r=LE(t,n,D.tickValues(),e,T);return N(t,n,r)}}else null===N?L===Ky.LINEAR&&(R=e=>e.toLocaleString()):R=N;D.tickFormat(R);const[I,P]=this.services.cartesianScales.getScaleByPosition(t).domain();let $;if(E){if(g)E.forEach(((e,t)=>{void 0===e.getTime&&(E[t]=new Date(e))})),$=E.filter((e=>{const t=e.getTime();return t>=new Date(I).getTime()&&t<=new Date(P).getTime()}));else if(b===Ky.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();$=E.filter((t=>e.includes(t)))}else $=E.filter((e=>e>=I&&e<=P));D.tickValues($)}switch(t){case Wy.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case Wy.BOTTOM:f.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case Wy.RIGHT:f.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case Wy.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const B=this.model.isDataEmpty();if(m.title){const e=Cx.appendOrSelect(s,"text.axis-title").html(B||_?"":m.title),n=d_(m,"titleOrientation");let r;switch(t){case Wy.LEFT:n===pb.RIGHT?e.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):e.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case Wy.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case Wy.RIGHT:n===pb.LEFT?e.attr("transform","rotate(-90)").attr("y",a).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-a).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case Wy.TOP:r=Cx.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${r/2})`).style("text-anchor","middle")}}if(g){const t=RE(D.tickValues(),d_(n,"timeScale","timeInterval")),r=T.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(D),i.selectAll(".tick").data(D.tickValues(),u).order().select("text").style("font-weight",((e,n)=>kE(e,n,D.tickValues(),t,r)?"bold":"normal"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(D):f.call(D);if(p.call(D),t===Wy.BOTTOM||t===Wy.TOP){let e=!1;const n=d_(m,"ticks","rotation");if(n===db.ALWAYS)e=!0;else if(n===db.NEVER)e=!1;else if(!n||n===db.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Cx.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Cx.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=ht(this),i=parseFloat(d_(o_(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(C||(D.ticks(this.getNumberOfFittingTicks(a,k,Eb.horizontalSpaceRatio)),p.call(D),f.call(D)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===Wy.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(_?s.attr("opacity",0):s.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(e=>e)),p.selectAll("g.tick").attr("aria-label",(e=>e)),x!==Zy.NONE&&b===Ky.LABELS&&!E){const e=this.services.cartesianScales.getScaleDomain(t);if(e.length>0){const n=i.select(`g.axis.${t} g.ticks g.tick`).html();s.selectAll("g.ticks g.tick").html(n);const r=this;s.selectAll("g.tick text").data(e).text((function(e){return e.length>S?(r.truncation[t]=!0,c_(e,x,O)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>S?c_(e,x,O):e})),s.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),s.selectAll("g.tick text").data(e)}}this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Cx.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=d_(r,"axes",t),a=d_(i,"scaleType"),o=d_(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOVER,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&t.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:ht(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEMOVE,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&t.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOUT,{event:e,element:ht(this),datum:t}),a===Ky.LABELS&&s.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}getInvisibleAxisRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} g.ticks.invisible`)}getTitleRef(){const{position:e}=this.configs;return this.getComponentContainer().select(`g.axis.${e} text.axis-title`)}getNumberOfFittingTicks(e,t,n){return Am(Math.floor(e/(t*n)),2,Eb.number)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Cx.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class zO extends BO{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer(),r=Cx.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=ht(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const a=r.select("text"),{width:o,height:s}=Cx.getSVGElementSize(a,{useBBox:!0}),l=Cx.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case Wy.LEFT:c=-o+Number(a.attr("x")),u=-s/2;break;case Wy.RIGHT:c=Math.abs(Number(a.attr("x"))),u=-s/2;break;case Wy.TOP:c=-o/2,u=-s+Number(a.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case Wy.BOTTOM:c=-o/2,u=s/2-2,i.truncation[t]&&(c=-o,l.attr("transform","rotate(-45)"))}l.attr("x",c-Ob.rectanglePadding).attr("y",u).attr("width",o+2*Ob.rectanglePadding).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Cx.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=d_(r,"axes",t),a=d_(i,"scaleType"),o=d_(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=ht(this).select("text"),n=t.datum();s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),a===Ky.LABELS&&n.length>o&&s.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=ht(this).select("text"),n=t.datum();s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_CLICK,{event:e,element:ht(this).select("text"),datum:ht(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_MOUSEOUT,{event:e,element:ht(this).select("text"),datum:ht(this).select("text").datum()}),a===Ky.LABELS&&s.services.events.dispatchEvent(Fy.Tooltip.HIDE)})).on("focus",(function(e){const t={clientX:0,clientY:0};if(e.target){e.target.focus();const n=e.target.getBoundingClientRect();t.clientX=n.x,t.clientY=n.y}s.services.events.dispatchEvent(Fy.Axis.LABEL_FOCUS,{event:{...e,...t},element:ht(this),datum:ht(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(Fy.Axis.LABEL_BLUR,{event:e,element:ht(this),datum:ht(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(Fy.Tooltip.HIDE),s.services.events.dispatchEvent(Fy.Axis.LABEL_BLUR,{event:e,element:ht(this),datum:ht(this).select("text").datum()})),t===Wy.LEFT||t===Wy.RIGHT?e.key&&"ArrowUp"===e.key?s.goNext(this,e):e.key&&"ArrowDown"===e.key&&s.goPrevious(this,e):e.key&&"ArrowLeft"===e.key?s.goPrevious(this,e):e.key&&"ArrowRight"===e.key&&s.goNext(this,e)}))}goNext(e,t){e.nextElementSibling&&"path"!==e.nextElementSibling.tagName&&e.nextElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}goPrevious(e,t){e.previousElementSibling&&"path"!==e.previousElementSibling.tagName&&e.previousElementSibling.dispatchEvent(new Event("focus")),t.preventDefault()}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Cx.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class UO extends Tx{constructor(){super(...arguments),this.type="2D-axes",this.renderType=Vy.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys(Wy),r=d_(this.getOptions(),"axes");n.forEach((e=>{r[Wy[e]]&&(t[Wy[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=Wy[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===yb.DEFAULT?new BO(this.model,this.services,e):new zO(this.model,this.services,e);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[t]=n}})),Object.keys(this.children).forEach((t=>{this.children[t].render(e)}));const i={};Object.keys(this.children).forEach((e=>{const t=this.children[e],n=t.configs.position,r=t.getInvisibleAxisRef(),{width:a,height:o}=Cx.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Cx.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===Wy.LEFT||n===Wy.RIGHT)&&(s+=5)),n){case Wy.TOP:i.top=o+s;break;case Wy.BOTTOM:i.bottom=o+s;break;case Wy.LEFT:i.left=a+s;break;case Wy.RIGHT:i.right=a+s}})),this.services.events.dispatchEvent(Fy.Axis.RENDER_COMPLETE),Object.keys(i).some((e=>this.margins[e]!==i[e]))&&(this.margins=Object.assign(this.margins,i),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(Fy.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class jO extends Tx{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=d_(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===ab.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===ab.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===ab.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==ab.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(e)}}renderGridSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawXGrid(e),this.drawYGrid(e),e&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(e){const t=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(e),t===Yy.VERTICAL&&this.drawYGrid(e),t===Yy.HORIZONTAL&&this.drawXGrid(e),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(e){const t=this.computeOuterRadius();this.drawRing(t,0,e),e&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(e){const t=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(t,n,e),e&&this.setShimmerEffect("shimmer-areas")}setScales(){const e=this.services.cartesianScales.getMainXScale().range(),t=this.services.cartesianScales.getMainYScale().range();this.xScale=Js().domain([0,1]).range(e),this.yScale=Js().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Cx.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Cx.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(i).attr("x",a).attr("y",o),i.classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(e){const t=+this.backdrop.attr("width"),n=d_(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Cx.appendOrSelect(this.backdrop,"g.x.skeleton"),a=i.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",(e=>e)).attr("x2",(e=>e)).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(e){const t=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=d_(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),a=Cx.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),a.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(e,t,n=!0){const r=this.parent,{width:i,height:a}=Cx.getSVGElementSize(r,{useAttrs:!0}),o=Cx.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",a),s=0===t?"pie":"donut",l=d_(this.getOptions(),s,"alignment");Cx.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",i).attr("height",a).attr("fill","none");const c=zu().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(jb),d=e+(Math.min(i,a)-2*e)/2,h=Cx.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${d})`).attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=e+Gb;l===Qy.CENTER?f=i/2:l===Qy.RIGHT&&(f=i-e-Gb);const p=e+Wb;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2+jb}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,a=Cx.appendOrSelect(n,"defs").lower(),o=Cx.appendOrSelect(a,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(e)).attr("class",e).attr("x1",0-3*.2*r).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),s=`\n\t\t\t<stop class="${t}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${t}" offset="0.4"></stop>\n\t\t`;o.html(s),function e(){o.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(_r).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class FO extends FS{constructor(e){super(e)}getBoxQuartiles(e){return{q_25:L(e,.25),q_50:L(e,.5),q_75:L(e,.75)}}getBoxplotData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getGroupedData(),i=[];for(const{name:e,data:a}of n){const n=this.services.cartesianScales.getRangeIdentifier(),o=a.map((e=>e[n])).sort(r),s={[t]:e,counts:o,quartiles:this.getBoxQuartiles(o),outliers:null,whiskers:null},l=s.quartiles.q_25,c=s.quartiles.q_75,u=1.5*(c-l),d=l-u,h=c+u,f=[],p=[];for(const e of o)e<d||e>h?f.push(e):p.push(e);s.outliers=f;const m=A(p),g=T(p);s.whiskers={min:m||A([s.quartiles.q_25,s.quartiles.q_50,s.quartiles.q_75]),max:g||T([s.quartiles.q_25,s.quartiles.q_50,s.quartiles.q_75])},i.push(s)}return i}getTabularDataArray(){const e=this.getOptions(),{groupMapsTo:t}=e.data;return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...this.getBoxplotData().map((e=>{let n=d_(e,"outliers");return(null===n||0===n.length)&&(n=["–"]),[e[t],null!==d_(e,"whiskers","min")?d_(e,"whiskers","min").toLocaleString():"–",null!==d_(e,"quartiles","q_25")?d_(e,"quartiles","q_25").toLocaleString():"–",null!==d_(e,"quartiles","q_50")?d_(e,"quartiles","q_50").toLocaleString():"–",null!==d_(e,"quartiles","q_75")?d_(e,"quartiles","q_75").toLocaleString():"–",null!==d_(e,"whiskers","max")?d_(e,"whiskers","max").toLocaleString():"–",null!==d_(e,"quartiles","q_75")&&null!==d_(e,"quartiles","q_25")?(d_(e,"quartiles","q_75")-d_(e,"quartiles","q_25")).toLocaleString():"–",n.map((e=>e.toLocaleString())).join(",")]}))]}setColorClassNames(){const e=d_(this.getOptions(),"color","pairing");let t=d_(e,"option");t=t<=Ab["1-color"]?t:1;const n=this.allDataGroups.map((()=>`1-${t}-1`));this.colorClassNames=Us().range(n).domain(this.allDataGroups)}}class VO extends Tx{constructor(){super(...arguments),this.type="boxplot",this.renderType=Vy.SVG}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[s,l]=a.range(),[c,u]=o.range(),d=l-s,h=c-u;if(0===d)return;const{cartesianScales:f}=this.services,p=f.getOrientation(),m=p===Yy.VERTICAL,[g,v]=p_((e=>this.services.cartesianScales.getDomainValue(e)),(e=>this.services.cartesianScales.getRangeValue(e)),p),y=Math.floor((m?d:h)/i.length),b=Math.min(y/2,16),_=this.model.getBoxplotData(),w=t.selectAll(".box-group").data(_);w.exit().remove();const E=w.enter().append("g").attr("class","box-group"),x=w.merge(E);E.append("path").merge(w.select("path.vertical-line.start")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"vertical-line start"}))).attr("stroke-width",Lb.default).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-verticalstartline",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r]),n=t,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.quartiles.q_25);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.vertical-line.end")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"vertical-line end"}))).attr("stroke-width",Lb.default).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-verticalendline",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r]),n=t,i=f.getRangeValue(e.whiskers.max),a=f.getRangeValue(e.quartiles.q_75);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.box")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],originalClassName:"box"}))).attr("fill-opacity",kb.opacity.default).attr("stroke-width",Lb.default).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",(e=>e[r])).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-quartiles",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(Math[m?"max":"min"](e.quartiles.q_75,e.quartiles.q_25)),a=i+Math.abs(f.getRangeValue(e.quartiles.q_75)-f.getRangeValue(e.quartiles.q_25));return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.whiskers.max);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.whisker.start")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"whisker start"}))).attr("stroke-width",Lb.thicker).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-startingwhisker",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/4,n=t+b/2,i=f.getRangeValue(e.whiskers.min),a=f.getRangeValue(e.whiskers.min);return f_({x0:t,x1:n,y0:i,y1:a},p)})),E.append("path").merge(w.select("path.median")).attr("fill","none").attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"median"}))).attr("stroke-width",2).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-median",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/2,n=t+b,i=f.getRangeValue(e.quartiles.q_50);return f_({x0:t,x1:n,y0:i,y1:i},p)})),E.append("path").merge(w.select("path.whisker.end")).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],originalClassName:"whisker end"}))).attr("stroke-width",Lb.thicker).attr("fill","none").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-endingwhisker",animate:e}))).attr("d",(e=>{const t=f.getDomainValue(e[r])-b/4,n=t+b/2,i=f.getRangeValue(e.whiskers.max),a=f.getRangeValue(e.whiskers.max);return f_({x0:t,x1:n,y0:i,y1:a},p)}));const S=x.selectAll("circle.outlier").data((e=>e.outliers.map((t=>({min:e.whiskers.min,max:e.whiskers.max,[r]:e[r],value:t})))));S.exit().remove();const O=S.enter().append("circle");S.merge(O).attr("r",Mb.radius).attr("class",(()=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],originalClassName:"outlier"}))).attr("fill-opacity",Mb.opacity.default).attr("cx",g).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"boxplot-update-circles",animate:e}))).attr("cy",v),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){const a=ht(this);ht(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",kb.opacity.hovered),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:t.tooltip.groupLabel,value:i[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEOVER,{event:r,element:a,datum:i})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Boxplot.BOX_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);ht(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",kb.opacity.default),e.services.events.dispatchEvent(Fy.Boxplot.BOX_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}addCircleEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,a){const o=ht(this);o.classed("hovered",!0).attr("fill-opacity",Mb.opacity.hovered).classed("unfilled",!1),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:o,items:[{label:t.tooltip.groupLabel,value:a[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP]})},{label:"Outlier",value:a[r]}]}),e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:o,datum:a})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1).attr("fill-opacity",Mb.opacity.default),e.services.events.dispatchEvent(Fy.Boxplot.OUTLIER_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}}class HO extends Tx{constructor(){super(...arguments),this.type="zero-line",this.renderType=Vy.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),a=r>0&&i<0||r<0&&i>0,o=this.getComponentContainer();if(!a)return void o.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=h_({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Cx.appendOrSelect(o,"line.domain").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"zero-line-update",animate:e}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class GO extends $O{constructor(){super(...arguments),this.type="bubble",this.renderType=Vy.SVG}getRadiusScale(e){const t=this.getOptions(),{radiusMapsTo:n}=t.bubble,r=e.data(),i=r.map((e=>e[n])).filter((e=>e)),a=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=i.length>0,s=o?c(i):[1,1];return Js().domain(s).range(o?t.bubble.radiusRange(a,r):[4,4])}styleCircles(e,t){const n=this.getOptions(),{radiusMapsTo:r}=n.bubble,i=this.getRadiusScale(e),{groupMapsTo:a}=n.data,{cartesianScales:o}=this.services,[s,l]=p_((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation());e.raise().classed("dot",!0).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e[o.getRangeIdentifier(e)])).transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"bubble-update-enter",animate:t}))).attr("cx",s).attr("cy",l).attr("r",(e=>i(e[r]||1))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e[a],originalClassName:"dot"}))).style("fill",(e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",n.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(e){const t=d_(this.getOptions(),"bubble");return[{label:d_(t,"radiusLabel"),value:e[d_(t,"radiusMapsTo")]}]}}class WO extends FS{constructor(e){super(e)}getMatchingRangeIndexForDatapoint(e){let t;for(let n=e.ranges.length-1;n>0;n--){const r=e.ranges[n];if(e.value>=r)return t=n,t}return 0}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier(),i=d_(t,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...e.map((e=>[e.title,e[n],null===e.value?"–":e.value,null===d_(e,"marker")?"–":e.marker,null===d_(e,"marker")?"–":`${Math.floor(e[r]/e.marker*100)}%`,i[this.getMatchingRangeIndexForDatapoint(e)]]))]}}class qO extends Tx{constructor(){super(...arguments),this.type="bullet",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-simple-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-simple-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getComponentContainer({withinChartClip:!0}),i=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[s,l]=a.range(),[,c]=a.domain();(()=>{const t=[];i.forEach((e=>{e.ranges?e.ranges.forEach(((n,r)=>{null!=n&&n<c&&t.push({datum:e,value:n,order:r+1})})):t.push({datum:e,order:1})}));const a=Cx.appendOrSelect(r,"g.range-boxes").selectAll("path.range-box").data(t,(e=>`${e[n]}-${e.order}`));a.exit().attr("opacity",0).remove(),a.enter().append("path").attr("opacity",0).merge(a).attr("class",(e=>`range-box order-${e.order}`)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-range-box-update-enter",animate:e}))).attr("d",(e=>{let t,n,r,i;return 1===e.order?(t=this.services.cartesianScales.getDomainValue(e.datum)-8,n=t+16,r=l-2,i=s+1):(t=this.services.cartesianScales.getDomainValue(e.datum)-8,n=t+16,r=this.services.cartesianScales.getRangeValue(e.value),i=l),f_({x0:t,x1:n,y0:r,y1:i},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),(()=>{const t=Cx.appendOrSelect(r,"g.bars").selectAll("path.bar").data(i,(e=>e[n]));t.exit().attr("opacity",0).remove(),t.enter().append("path").attr("opacity",0).merge(t).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[n],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[n]))).attr("d",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-4,n=t+8,r=this.services.cartesianScales.getRangeValue(0)+1,i=this.services.cartesianScales.getRangeValue(e);return f_({x0:t,x1:n,y0:r,y1:i},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value))})(),(()=>{const t=Cx.appendOrSelect(r,"g.markers").selectAll("path.marker").data(i.filter((e=>null!==d_(e,"marker"))),(e=>e[n]));t.exit().attr("opacity",0).remove(),t.enter().append("path").attr("opacity",0).merge(t).classed("marker",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-marker-update-enter",animate:e}))).attr("d",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-12,n=t+24,r=this.services.cartesianScales.getRangeValue(e.marker);return f_({x0:t,x1:n,y0:r,y1:r},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),(()=>{let t=[];i.filter((e=>null!==d_(e,"marker"))).forEach((e=>{const n=e.marker,r=e[o];t=t.concat([{datum:e,value:.25*n,barValue:r},{datum:e,value:.5*n,barValue:r},{datum:e,value:.75*n,barValue:r}])}));const a=Cx.appendOrSelect(r,"g.quartiles").selectAll("path.quartile").data(t,(e=>e[n]));a.exit().attr("opacity",0).remove(),a.enter().append("path").attr("opacity",0).merge(a).attr("class",(e=>"quartile "+(e.value<=e.barValue?"over-bar":""))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bullet-quartile-update-enter",animate:e}))).attr("d",(({datum:e,value:t})=>{let n=4;e.ranges&&-1!==e.ranges.indexOf(t)&&(n=8);const r=this.services.cartesianScales.getDomainValue(e)-n/2,i=r+n,a=this.services.cartesianScales.getRangeValue(t);return f_({x0:r,x1:i,y0:a,y1:a},this.services.cartesianScales.getOrientation())})).attr("opacity",1)})(),this.addEventListeners()}addEventListeners(){const e=this,t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,a){const o=ht(this);o.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:i,element:o,datum:a});const s=d_(t,"bullet","performanceAreaTitles"),l=e.model.getMatchingRangeIndexForDatapoint(a);e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:o,items:[{label:t.tooltip.groupLabel||"Group",value:a[n],class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:a[n]})},{label:"Value",value:a[r]},{label:"Target",value:a.marker},{label:"Percentage",value:`${Math.floor(a[r]/a.marker*100)}%`},{label:"Performance",value:s[l]}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function ZO(e){const t=c(e,(e=>e.value)),n=Js().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(0===n[0]&&0===n[1])return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function YO(e,t){const n=d_(t,"gradient","colors"),r=!iy(n);let i=d_(t,"pairing","option");const a=ZO(e),o=a[0]<0&&a[1]>0?"diverge":"mono";(i<1&&i>4&&"mono"===o||i<1&&i>2&&"diverge"===o)&&(i=1);const s=r?n:[];if(!r){const e="diverge"===o?17:11;for(let t=1;t<e+1;t++)s.push(`fill-${o}-${i}-${t}`)}return cl().domain(a).range(s)}class KO extends $E{constructor(e){super(e),this._colorScale=void 0,this._matrix={}}getFillColor(e){return this._colorScale(e)}getCombinedData(){if(iy(this._matrix)){const e=this.getOptions(),t=this.getDisplayData();!iy(t)&&!iy(e.geoData.objects.countries)&&(e.geoData.objects.countries.geometries.forEach((e=>{this._matrix[e.properties.NAME]=e})),t.forEach((e=>{this._matrix[e.name]?this._matrix[e.name].value=e.value||null:console.warn(`Data point ${e} is missing geographical data.`)})))}return this._matrix}getTabularDataArray(){return[["Country ID","Country Name","Value"],...this.getDisplayData().map((e=>[null===e.id?"–":e.id,e.name,e.value]))]}getColorClassName(e){return`${e.originalClassName} ${this._colorScale(e.value)}`}setColorClassNames(){const e=d_(this.getOptions(),"color");this._colorScale=YO(this.getDisplayData(),e)}}function XO(e){return e}function QO(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=JO(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function JO(e,t){var n=function(e){if(null==e)return XO;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(t+=e[0])*r+a,u[1]=(n+=e[1])*i+o;l<c;)u[l]=e[l],++l;return u}}(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function l(e){return e.map(s)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=a(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(a);break;case"LineString":n=o(t.arcs);break;case"MultiLineString":n=t.arcs.map(o);break;case"Polygon":n=l(t.arcs);break;case"MultiPolygon":n=t.arcs.map(l);break;default:return null}return{type:r,coordinates:n}}(t)}function eC(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];return e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1],t<0?[n,i]:[i,n]}(t),s=o[0],l=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=l,a=r[l]){delete r[a.start];var c=a===n?n:n.concat(a);r[c.start=n.start]=i[c.end=a.end]=c}else r[n.start]=i[n.end]=n;else if(n=r[l])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var u=a===n?n:a.concat(n);r[u.start=a.start]=i[u.end=n.end]=u}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=l]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a}function tC(e){return JO(e,nC.apply(this,arguments))}function nC(e,t){var n={},r=[],i=[];function a(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),r.push(e)}function o(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n<r;)t=i,i=e[n],a+=t[0]*i[1]-t[1]*i[0];return Math.abs(a)}(JO(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":a(t.arcs);break;case"MultiPolygon":t.arcs.forEach(a)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,i.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var r,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].length<2&&i.push(e)}))}))})),(r=(i=eC(e,i)).length)>1)for(var a,s,l=1,c=o(i[0]);l<r;++l)(a=o(i[l]))>c&&(s=i[0],i[0]=i[l],i[l]=s,c=a);return i})).filter((function(e){return e.length>0}))}}class rC extends PO{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=Vy.SVG}showRuler(e,[t,n]){const r=this.parent,i=this.model.getOptions(),{cartesianScales:a}=this.services,o=a.getOrientation(),s=a.getRangeScale(),[l,c]=s.range(),u=a.getDomainScale(),d=u.invert(o===Yy.VERTICAL?t:n),h=Cx.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),f=Cx.appendOrSelect(h,"line.ruler-line"),p=r.selectAll("[role=graphics-symbol]").filter((e=>{if(parseFloat(wp(e,"data.x0"))<=d&&parseFloat(wp(e,"data.x1"))>=d)return!0}));if(p.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ay(this.elementsToHighlight,p)&&this.hideRuler(),p.dispatch("mouseover"),this.elementsToHighlight=p;const e=ht(p.nodes()[0]).datum(),r=parseFloat(wp(e,"data.x0")),a=parseFloat(wp(e,"data.x1")),s=this.model.getActiveDataGroupNames(),d=s.reverse().map((t=>({label:t,value:wp(e,`data.${t}`),class:this.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:t})}))).filter((e=>0!==e.value));if(d.length>0){this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{mousePosition:[t,n],hoveredElement:f,items:[{label:wp(i,"bins.rangeLabel")||"Range",value:`${r} – ${a}`},...d,...!0===d_(i,"tooltip","showTotal")?[{label:wp(i,"tooltip.totalLabel")||"Total",value:s.reduce(((t,n)=>t+parseFloat(wp(e,`data.${n}`))),0)}]:[]]}),h.attr("opacity",1);const p=u((r+a)/2);"horizontal"===o?f.attr("x1",c).attr("x2",l).attr("y1",p).attr("y2",p):f.attr("y1",c).attr("y2",l).attr("x1",p).attr("x2",p)}else this.hideRuler()}else this.hideRuler()}}class iC extends PO{formatTooltipData(e){return e.reverse()}}class aC extends MS{constructor(e,t,n){super(e,t,n),this.type="color-legend",this.renderType=Vy.SVG,this.gradient_id=`gradient-id-${Math.floor(99999999999*Math.random())}`,this.handleAxisCompleteEvent=()=>{const e=this.getComponentContainer(),{width:t}=Cx.getSVGElementSize(e,{useAttrs:!0}),n=d_(this.getOptions(),"data","loading");if(t>Rb.color.barWidth&&!n){const t=d_(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:n}=this.services,r=n.getMainXScale().range();if(r[0]>1&&(e.select("g.legend").attr("transform",`translate(${r[0]}, 0)`),t)){const{width:t}=Cx.getSVGElementSize(e.select("g.legend-title").select("text"),{useBBox:!0}),n=r[0]-t-9;n>1?e.select("g.legend-title").attr("transform",`translate(${n}, 0)`):(e.select("g.legend").attr("transform",`translate(${r[0]}, 16)`),e.select("g.legend-title").attr("transform",`translate(${r[0]}, 0)`))}}else e.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=n.chartType}init(){"heatmap"===this.chartType&&this.services.events.addEventListener(Fy.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(e=!1){const t=this.getOptions(),n=this.getComponentContainer(),{width:r}=Cx.getSVGElementSize(n,{useAttrs:!0}),i=d_(t,"color","gradient","colors"),a=d_(t,this.chartType,"colorLegend","type");let o=d_(t,"color","pairing","option");const s=d_(t,"heatmap","colorLegend","title");if(d_(this.getOptions(),"data","loading"))return void n.html("");const l=!iy(i),c=ZO(this.model.getDisplayData()),u=!(r<=Rb.color.barWidth),d=u?Rb.color.barWidth:r,h=Cx.appendOrSelect(n,"g.legend"),f=Cx.appendOrSelect(h,"g.legend-axis");if(s){const e=Cx.appendOrSelect(n,"g.legend-title");Cx.appendOrSelect(e,"text").text(s).attr("dy","0.7em"),h.attr("transform","translate(0, 16)")}const p=c[0]<0&&c[1]>0?"diverge":"mono";(o<1&&o>4&&"mono"===p||o<1&&o>2&&"diverge"===p)&&(o=1);let m=[];const g="diverge"===p?17:11;if(l)m=i;else for(let e=1;e<g+1;e++)m.push(a===gb.LINEAR?`stop-color-${p}-${o}-${e}`:`fill-${p}-${o}-${e}`);const v=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}(an(c[0],c[1]),3),y=Js().domain(c).range([0,d]),b=q(y).tickSize(0).tickValues(v);let _;switch(a){case gb.LINEAR:this.drawLinear(m,h,d);break;case gb.QUANTIZE:_=this.drawQuantize(m,p,l,h,d),y.range([_,d]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform",`translate(0,${Rb.color.axisYTranslation})`).call(b),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",u?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",u&&"choropleth"!==this.chartType?"middle":"start")}drawLinear(e,t,n){const r=100/(e.length-1);Cx.appendOrSelect(t,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(e).enter().append("stop").attr("offset",((e,t)=>t*r+"%")).attr("class",((t,n)=>e[n])).attr("stop-color",(e=>e)),Cx.appendOrSelect(t,"rect").attr("width",n).attr("height",Rb.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(e,t,n,r,i){!n&&"diverge"===t&&e.splice(e.length/2,1);const a=js().domain(e).range([0,i]);return Cx.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(a.domain()).join("rect").attr("x",(e=>a(e))).attr("y",0).attr("width",Math.max(0,a.bandwidth()-1)).attr("height",Rb.color.barHeight).attr("class",(e=>e)).attr("fill",(e=>e)),"mono"===(!n&&t)?a.bandwidth()-1:0}destroy(){"heatmap"===this.chartType&&this.services.events.removeEventListener(Fy.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class oC extends OS{constructor(){super(...arguments),this.type="meter-title",this.renderType=Vy.SVG}render(e=!1){const t=d_(this.model.getDisplayData(),0),n=this.getOptions(),r=this.getComponentContainer(),{groupMapsTo:i}=n.data;if(d_(n,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const e=r.selectAll("text.meter-title").data([t[i]]);e.enter().append("text").classed("meter-title",!0).merge(e).attr("x",0).attr("y","1em").text((e=>e)),e.exit().remove(),this.appendPercentage()}this.displayStatus();const a=this.getMaxTitleWidth(),o=Cx.appendOrSelect(r,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)}displayBreakdownTitle(){const e=this.getComponentContainer(),t=this.getOptions(),n=this.model.getMaximumDomain(this.model.getDisplayData()),r=d_(t,"meter","proportional","total"),i=d_(t,"meter","proportional","unit")?d_(t,"meter","proportional","unit"):"";let a;if(n===r)a=null;else{const e=null!==r?r-n:n,o=d_(t,"meter","proportional","breakdownFormatter");a=null!==o?o({datasetsTotal:n,total:r}):`${n} ${i} used (${e} ${i} available)`}const o=e.selectAll("text.proportional-meter-title").data([a]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text((e=>e)),o.exit().remove();const s=this.getMaxTitleWidth(),l=Cx.appendOrSelect(e,"text.proportional-meter-title");s>0&&l.node().getComputedTextLength()>s&&this.truncateTitle(l,s)}displayTotal(){const e=this.getComponentContainer(),t=this.getOptions(),n=d_(t,"meter","proportional","total"),r=n?d_(t,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=d_(t,"meter","proportional","unit")?d_(t,"meter","proportional","unit"):"",a=d_(t,"meter","proportional","totalFormatter"),o=null!==a?a(r):`${n} ${i} total`,s=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=s.width?s.width:this.parent.node().getAttribute("width"),c=e.selectAll("text.proportional-meter-total").data([o]);c.enter().append("text").classed("proportional-meter-total",!0).merge(c).attr("x",this.model.getStatus()&&"string"!=typeof l?l-Bb.paddingRight:l).attr("y","1em").attr("text-anchor","end").text((e=>e)),c.exit().remove()}displayStatus(){const e=this.getComponentContainer(),t=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=t.width?t.width:0,r=this.model.getStatus(),i=$b.indicatorSize/2,a=Cx.appendOrSelect(e,"g.status-indicator").attr("class",null!==r?`status-indicator status--${r}`:"").attr("transform",`translate(${n-i}, 0)`),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy",8);const l=a.selectAll("path.innerFill").data(o);l.enter().append("path").merge(l).attr("d",this.getStatusIconPathString(r)).attr("transform",`translate(-${i}, 0)`).attr("class","innerFill"),l.exit().remove(),s.exit().remove()}appendPercentage(){const e=d_(this.model.getDisplayData(),0,"value"),t=this.getComponentContainer(),n=Cx.appendOrSelect(t,"text.meter-title"),r=!0===d_(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[e]:[],i=t.selectAll("text.percent-value").data(r),a=Pb.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((e=>`${e}%`)).attr("x",+n.attr("x")+n.node().getComputedTextLength()+a).attr("y",n.attr("y")),i.exit().remove()}truncateTitle(e,t){super.truncateTitle(e,t);const n=Cx.appendOrSelect(this.parent,"tspan"),r=Pb.paddingRight,i=Math.ceil(n.node().getComputedTextLength());Cx.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+i+r)}getMaxTitleWidth(){const e=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),t=d_(this.getOptions(),"meter","proportional"),n=e.width?e.width:this.parent.node().getBoundingClientRect().width;if(null!==t){const e=Cx.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-Cx.getSVGElementSize(e,{useBBox:!0}).width-Bb.paddingLeft}{const e=Cx.appendOrSelect(this.parent,"text.percent-value"),t=Pb.paddingRight,r=e.node().getComputedTextLength(),i=Cx.appendOrSelect(this.parent,"g.status-indicator").node();return n-r-t-(Cx.getSVGElementSize(i,{useBBox:!0}).width+$b.paddingLeft)}}getStatusIconPathString(e){switch(e){case ub.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case ub.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case ub.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class sC extends Tx{getBarWidth(){const e=this.getOptions();if(e.bars.width)return e.bars.width;const t=this.model.getDisplayData().length,n=this.services.cartesianScales.getMainXScale(),r=Cx.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!n.step){const n=d_(e,"bars","spacingFactor");return Math.min(e.bars.maxWidth,r*n/t)}return Math.min(e.bars.maxWidth,n.step()/2)}isOutsideZoomedDomain(e,t){if(this.model.getDisplayData().length<=1)return!1;const n=this.model.get("zoomDomain");if(void 0!==n){const r=this.services.cartesianScales.getDomainScale();return e<r(n[0])||t>r(n[1])}return!1}}class lC extends Tx{constructor(){super(...arguments),this.type="circle-pack",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-circlepack"}))).attr("opacity",(e=>e.data.dataGroupName===t.datum().name?1:Tb.circles.fillOpacity))},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-circlepack"}))).attr("opacity",1)}}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(n<1||r<1)return;let i=this.model.getDisplayData();const a=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),s=this.getOptions(),l=d_(s,"canvasZoom","enabled");a&&d_(i,0,"children")&&(i=d_(i,0,"children"));const c=Qo({children:i}).sum((e=>e.value)).sort(((e,t)=>t.value-e.value)),u=xs().size([n,r]).padding((e=>e.depth>=1?Tb.padding.children+3:Tb.padding.mainGroup+3))(c).descendants().splice(1).filter((e=>e.depth<=o)),d=t.selectAll("circle.node").data(u);d.exit().attr("width",0).attr("height",0).remove();const h=d.enter().append("circle").classed("node",!0);h.merge(d).attr("class",(e=>{const t=l&&3===o?this.getZoomClass(e):"";return this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.data.dataGroupName,originalClassName:e.children?`node ${t}`:`node node-leaf ${t}`})})).style("fill",(e=>this.model.getFillColor(e.data.dataGroupName))).style("stroke",(e=>this.model.getFillColor(e.data.dataGroupName))).attr("cx",(e=>e.x)).attr("cy",(e=>e.y)).transition("circlepack-leaf-update-enter").call((e=>this.services.transitions.setupTransition({transition:e,name:"circlepack-leaf-update-enter"}))).attr("r",(e=>e.r)).attr("opacity",1).attr("fill-opacity",Tb.circles.fillOpacity),!0===l&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,h,Cb),this.setBackgroundListeners()),a||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(e){const t=e.map((e=>e.data));this.parent.selectAll("circle.node").filter((e=>t.some((t=>t===e.data))&&e.depth>1)).style("stroke",(e=>this.model.getFillColor(e.data.dataGroupName)))}highlightChildren(e){const t=e.map((e=>e.data));this.parent.selectAll("circle.node").filter((e=>t.some((t=>t===e.data))&&e.depth>1)).style("stroke",Tb.circles.hover.stroke)}getZoomClass(e){return 3===this.model.getHierarchyLevel()&&this.focal&&(e.data===this.focal.data||this.focal.children.some((t=>t.data===e.data)))?"focal":"non-focal"}addLegendListeners(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){ht(this.services.domUtils.getMainContainer()).on("click",(()=>null))}setBackgroundListeners(){const e=ht(this.services.domUtils.getMainContainer()),t=this,n=this.parent.selectAll("circle.node");e.on("click",(()=>{t.focal=null,t.model.updateHierarchyLevel(2),e.classed("zoomed-in",!1),t.services.canvasZoom.zoomOut(n,Cb)}))}getZoomIcon(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'}addEventListeners(){const e=this;this.parent.selectAll("circle.node").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0);const i=e.model.getHierarchyLevel(),a=i>2&&!r.classed("focal"),o=d_(e.model.getOptions(),"canvasZoom","enabled");let s=!1;if(!a){let a=[],l=[],c=null;n.children?(n.depth>1&&o&&(s=!0,r.classed("clickable",!0)),a=n.children.map((t=>{if(null!==t)return"number"==typeof t.data.value?{label:t.data.name,value:t.data.value}:{label:t.data.name,labelIcon:o&&i<=2?e.getZoomIcon():null,value:t.value}})),l=[{label:wp(e.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],e.highlightChildren(n.children)):c=n.value;const u=getComputedStyle(this,null).getPropertyValue("fill");e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{color:u,label:n.data.name,labelIcon:s&&o&&i<=2?e.getZoomIcon():null,value:c},...a,...l]})}e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEOVER,{event:t,element:r,datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),n.children&&e.unhighlightChildren(n.children),e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(t,n){const r=ht(this),i=r.classed("non-focal"),a=d_(e.model.getOptions(),"canvasZoom","enabled");if(a&&e.model.getHierarchyLevel()>2){const t=e.parent.selectAll("circle.node");ht(e.services.domUtils.getMainContainer()).classed("zoomed-in",!1),e.focal=null,e.model.updateHierarchyLevel(2),e.services.canvasZoom.zoomOut(t,Cb)}else if(2===n.depth&&n.children&&!i&&a){const r=e.parent.selectAll("circle.node");ht(e.services.domUtils.getMainContainer()).classed("zoomed-in",!0),e.focal=n,e.model.updateHierarchyLevel(3),e.services.canvasZoom.zoomIn(n,r,Cb),t.stopPropagation()}e.services.events.dispatchEvent(Fy.CirclePack.CIRCLE_CLICK,{event:t,element:r,datum:n})}))}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function cC(e,t){const n=un(this._current,e);return e=>(this._current=n(e),t(this._current))}class uC extends Tx{constructor(){super(...arguments),this.type="pie",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e.data[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Fb}render(e=!0){const t=this,n=this.getComponentContainer(),r=this.getOptions(),{groupMapsTo:i}=r.data,{valueMapsTo:a}=r.pie,o=this.model.getDisplayData().filter((e=>e[a]>0)),s=this.computeRadius();this.arc=zu().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=zu().innerRadius(this.getInnerRadius()).outerRadius(s+Hb.outerRadiusOffset);const l=function(){var e=Yu,t=Zu,n=null,r=bu(0),i=bu(ku),a=bu(0);function o(o){var s,l,c,u,d,h=(o=ju(o)).length,f=0,p=new Array(h),m=new Array(h),g=+r.apply(this,arguments),v=Math.min(ku,Math.max(-ku,i.apply(this,arguments)-g)),y=Math.min(Math.abs(v)/h,a.apply(this,arguments)),b=y*(v<0?-1:1);for(s=0;s<h;++s)(d=m[p[s]=s]=+e(o[s],s,o))>0&&(f+=d);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(o[e],o[t])})),s=0,c=f?(v-h*b)/f:0;s<h;++s,g=u)l=p[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:o[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:y};return m}return o.value=function(t){return arguments.length?(e="function"==typeof t?t:bu(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:bu(+e),o):r},o.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:bu(+e),o):i},o.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:bu(+e),o):a},o}().value((e=>e[a])).sort(d_(r,"pie","sortFunction")).padAngle(Vb)(o),c=Cx.appendOrSelect(n,"g.slices").attr("role",AS.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(e=>e.data[i]));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.data[i],originalClassName:"slice"}))).style("fill",(e=>t.model.getFillColor(e.data[i]))).attr("d",this.arc).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"pie_slice_enter_update",animate:e}))).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(e=>`${e[a]}, ${l_(e.data[a],o,a)+"%"}`)).attrTween("d",(function(e){return cC.bind(this)(e,t.arc)}));const u=r.pie.labels.enabled,d=u?l.filter((e=>e.data[a]>0)):[],h=Cx.appendOrSelect(n,"g.labels").attr("role",AS.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(d,(e=>e.data[i]));h.exit().attr("opacity",0).remove();const f=h.enter().append("text").classed("pie-label",!0),p=[];f.merge(h).style("text-anchor","middle").text((e=>r.pie.labels.formatter?r.pie.labels.formatter({...e,percentageValue:l_(e.data[a],o,a,!0)}):l_(e.data[a],o,a)+"%")).datum((function(e){const t=s+7,n=(e.endAngle-e.startAngle)/2+e.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return e.textOffsetX=i/2,e.textOffsetY=r>90&&r<270?10:0,e.xPosition=(e.textOffsetX+t)*Math.sin(n),e.yPosition=(e.textOffsetY+t)*-Math.cos(n),e})).attr("transform",(function(e,t){const n=d.length,r=(e.endAngle-e.startAngle)*(180/Math.PI);if(t>=n-2&&r<Zb.minSliceDegree){let t,r;return e.index===n-1?(t=e.xPosition+Zb.offsetX+Zb.textMargin+e.textOffsetX,r=e.yPosition-Zb.offsetY,e.direction=ib.RIGHT,p.push(e)):(t=e.xPosition-Zb.offsetX-e.textOffsetX-Zb.textMargin,r=e.yPosition-Zb.offsetY,e.direction=ib.LEFT,p.push(e)),`translate(${t}, ${r})`}return`translate(${e.xPosition}, ${e.yPosition})`})),this.renderCallouts(p);const m=d_(r,"donut")?"donut":"pie",g=d_(r,m,"alignment"),{width:v}=Cx.getSVGElementSize(this.getParent(),{useAttrs:!0}),y=u?Wb:0;let b=s+(u?Gb:0);g===Qy.CENTER?b=v/2:g===Qy.RIGHT&&(b=v-s-Gb);let _=s+y;p.length>0&&(_+=qb),n.attr("x",b+7).attr("y",_),this.addEventListeners()}renderCallouts(e){const t=Cx.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",AS.GROUP).attr("data-name","callouts"),n=t.selectAll("g.callout").data(e);n.exit().remove();const r=n.enter().append("g").classed("callout",!0).attr("role",AS.GROUP).attr("aria-roledescription","label callout");r.merge(n).datum((function(e){const{xPosition:t,yPosition:n,direction:r}=e;return r===ib.RIGHT?(e.startPos={x:t,y:n+e.textOffsetY},e.endPos={x:t+Zb.offsetX,y:n-Zb.offsetY+e.textOffsetY},e.intersectPointX=e.endPos.x-Zb.horizontalLineLength):(e.startPos={x:t,y:n+e.textOffsetY},e.endPos={x:t-Zb.offsetX,y:n-Zb.offsetY+e.textOffsetY},e.intersectPointX=e.endPos.x+Zb.horizontalLineLength),e})),r.append("line").classed("vertical-line",!0).merge(t.selectAll("line.vertical-line")).datum((function(){return ht(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(e=>e.startPos.x)).attr("y1",(e=>e.startPos.y)).attr("x2",(e=>e.intersectPointX)).attr("y2",(e=>e.endPos.y)),r.append("line").classed("horizontal-line",!0).merge(t.selectAll("line.horizontal-line")).datum((function(){return ht(this.parentNode).datum()})).style("stroke-width","1px").attr("x1",(e=>e.intersectPointX)).attr("y1",(e=>e.endPos.y)).attr("x2",(e=>e.endPos.x)).attr("y2",(e=>e.endPos.y))}addEventListeners(){const e=this;this.parent.selectAll("path.slice").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call((t=>e.services.transitions.setupTransition({transition:t,name:"pie_slice_mouseover"}))).attr("d",e.hoverArc),e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEOVER,{event:t,element:ht(this),datum:n});const{groupMapsTo:i}=e.getOptions().data,{valueMapsTo:a}=e.getOptions().pie;e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{label:n.data[i],value:n.data[a]}]})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Pie.SLICE_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call((t=>e.services.transitions.setupTransition({transition:t,name:"pie_slice_mouseout"}))).attr("d",e.arc),e.services.events.dispatchEvent(Fy.Pie.SLICE_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}computeRadius(){const{width:e,height:t}=Cx.getSVGElementSize(this.parent,{useAttrs:!0}),n=this.getOptions(),r=Math.min(e,t)/2;return n.pie.labels.enabled?r+jb:r}}class dC extends uC{constructor(){super(...arguments),this.type="donut",this.renderType=Vy.SVG}render(e=!0){super.render(e);const t=this;if(this.model.isDataEmpty())return void this.getComponentContainer().select("g.center").remove();const n=Cx.appendOrSelect(this.getComponentContainer(),"g.center"),r=this.getOptions(),i=this.computeRadius(),a=d_(r,"donut","center","label");Cx.appendOrSelect(n,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(()=>null===a||""===a?"central":"initial")).style("font-size",(()=>r.donut.center.numberFontSize(i))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e}))).tween("text",(function(){return t.centerNumberTween(ht(this))})),null!==a&&""!==a&&Cx.appendOrSelect(n,"text.donut-title").attr("text-anchor","middle").style("font-size",(()=>r.donut.center.titleFontSize(i))).attr("y",r.donut.center.titleYPosition(i)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(e){const t=this.getOptions();let n=d_(t,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce(((e,n)=>e+n[t.pie.valueMapsTo]),0));const r=parseInt(e.text().replace(/[, ]+/g,""),10)||0;let i;i=r%1==0&&n%1==0?dn:an;const a=i(r,n);return n=>{const{numberFormatter:r}=t.donut.center;e.text(r(a(n)))}}}const hC="4,10 8,6 12,10",fC="12,6 8,10 4,6";class pC extends Tx{constructor(){super(...arguments),this.type="gauge",this.renderType=Vy.SVG}getValue(){var e;return(null==(e=this.model.getData().find((e=>"value"===e.group)))?void 0:e.value)??null}getValueRatio(){return Am(this.getValue(),0,100)/100}getDelta(){var e;return(null==(e=this.model.getData().find((e=>"delta"===e.group)))?void 0:e.value)??null}getArcRatio(){const e=this.getOptions();return d_(e,"gauge","type")===lb.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const e=this.getArcSize();return e===2*Math.PI?0:-e/2}getArrow(e){const t=this.getOptions();switch(d_(t,"gauge","deltaArrow","direction")){case cb.UP:return hC;case cb.DOWN:return fC;default:return e>0?hC:fC}}render(e=!0){const t=this.getComponentContainer().attr("width","100%").attr("height","100%"),n=this.getOptions(),r=this.getValue(),i=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),s=o+i*a,l=o+a,c=this.computeRadius(),u=this.getInnerRadius();this.backgroundArc=zu().innerRadius(u).outerRadius(c).startAngle(s).endAngle(l),this.arc=zu().innerRadius(u).outerRadius(c).startAngle(o).endAngle(s),Cx.appendOrSelect(t,"path.arc-background").attr("d",this.backgroundArc);const d=t.selectAll("path.arc-foreground").data([r]);d.enter().append("path").merge(d).attr("class",this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(()=>d_(this.getOptions(),"color","scale","value"))).attr("d",this.arc).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(e=>e)),this.drawValueNumber(),this.drawDelta(),d.exit().remove();const h=d_(n,"gauge","alignment"),{width:f}=Cx.getSVGElementSize(this.getParent(),{useAttrs:!0});let p=c;h===Qy.CENTER?p=f/2:h===Qy.RIGHT&&(p=f-c),t.attr("x",p).attr("y",c),this.addEventListeners()}drawValueNumber(){const e=this.getComponentContainer(),t=this.getOptions(),n=d_(t,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=d_(t,"gauge","valueFontSize"),s=d_(t,"gauge","deltaFontSize"),l=d_(t,"gauge","numberSpacing"),c=d_(t,"gauge","showPercentageSymbol");let u=0;n!==lb.FULL||i?n===lb.SEMI&&i&&(u=-(s(a)+l)):u=s(a);const d=Cx.appendOrSelect(e,"g.gauge-numbers").attr("transform",`translate(0, ${u})`),h=o(a),f=Cx.appendOrSelect(d,"g.gauge-value-number"),p=d_(t,"gauge","numberFormatter"),m=f.selectAll("text.gauge-value-number").data([r]);m.enter().append("text").attr("class","gauge-value-number").merge(m).style("font-size",`${h}px`).attr("text-anchor","middle").text((e=>p(e)));const{width:g}=Cx.getSVGElementSize(Cx.appendOrSelect(e,"text.gauge-value-number"),{useBBox:!0}),v=h/2,y=c?"%":"",b=Cx.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",`${v}px`).attr("x",g/2).text(y),{width:_,height:w}=Cx.getSVGElementSize(b,{useBBox:!0});b.attr("y",`-${w/2}px`),f.attr("transform",`translate(-${_/2}, 0)`)}drawDelta(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta();if(r){const i=this.computeRadius(),a=r?d_(n,"gauge","deltaFontSize"):()=>0,o=r?d_(n,"gauge","numberFormatter"):()=>null,s=d_(n,"gauge","deltaArrow","size"),l=d_(n,"gauge","numberSpacing"),c=d_(n,"gauge","showPercentageSymbol"),u=Cx.appendOrSelect(t,"g.gauge-numbers"),d=Cx.appendOrSelect(u,"g.gauge-delta").attr("transform",`translate(0, ${a(i)+l})`),h=Cx.appendOrSelect(d,"text.gauge-delta-number"),f=c?"%":"";h.data(null===r?[]:[r]),h.enter().append("text").classed("gauge-delta-number",!0).merge(h).attr("text-anchor","middle").style("font-size",`${a(i)}px`).text((e=>`${o(e)}${f}`));const{width:p}=Cx.getSVGElementSize(Cx.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}),m=d_(n,"gauge","deltaArrow","enabled"),g=d.selectAll("svg.gauge-delta-arrow").data(null!==r&&m?[r]:[]);g.enter().append("svg").merge(g).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/2).attr("y",-s(i)/2-.35*a(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){const t=ht(this);Cx.appendOrSelect(t,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const i=d_(n,"gauge","status");Cx.appendOrSelect(t,"polygon.gauge-delta-arrow").attr("class",null!==i?`gauge-delta-arrow status--${i}`:"").attr("points",e.getArrow(r))})),g.exit().remove(),h.exit().remove()}else{const e=t.select("g.gauge-delta");e.empty()||e.remove()}}getInnerRadius(){return this.computeRadius()-d_(this.getOptions(),"gauge","arcWidth")}addEventListeners(){const e=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(t,n){e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEOVER,{event:t,element:ht(this),datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEMOVE,{event:t,element:r,datum:n})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Gauge.ARC_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Gauge.ARC_MOUSEOUT,{event:t,element:r,datum:n})}))}computeRadius(){const e=this.getOptions(),t=d_(e,"gauge","type"),{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});return t===lb.SEMI?Math.min(n/2,r):Math.min(n/2,r/2)}}class mC extends sC{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=Vy.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.model.getDisplayData(this.configs.groups),n=this.getOptions(),{groupMapsTo:r}=n.data;this.setGroupScale();const i=this.getComponentContainer({withinChartClip:!0}),a=py(t.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]}))),o=i.selectAll("g.bars").data(a,(e=>e));o.exit().attr("opacity",0).remove();const s=o.enter().append("g").classed("bars",!0).attr("role",AS.GROUP).attr("data-name","bars").merge(o);s.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-group-update-enter",animate:e}))).attr("transform",(e=>{const t=this.services.cartesianScales.getDomainValue(e)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Yy.VERTICAL?`translate(${t}, 0)`:`translate(0, ${t})`}));const l=s.selectAll("path.bar").data((e=>this.getDataCorrespondingToLabel(e)),(e=>e[r]));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[r],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[r]))).attr("d",(e=>{const t=this.groupScale(e[r]),n=this.getBarWidth(),i=t,a=t+n,o=this.services.cartesianScales.getRangeAxisPosition({datum:e}),s=this.services.cartesianScales.getValueThroughAxisPosition(o,0),l=this.services.cartesianScales.getRangeValue(e),c=this.services.cartesianScales.getDomainValue(e)-n/2,u=c+n;if(!this.isOutsideZoomedDomain(c,u))return f_({x0:i,x1:a,y0:s,y1:l},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value)),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,data:[n]})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(e){return this.model.getDisplayData(this.configs.groups).filter((t=>t[this.services.cartesianScales.getDomainIdentifier(t)].toString()===e))}getGroupWidth(){const e=this.model.getGroupedData(this.configs.groups),t=this.getTotalGroupPadding();return this.getBarWidth()*e.length+t}getDomainScaleStep(){const e=this.services.cartesianScales.getDomainScale(),t=this.model.getGroupedData(this.configs.groups);let n=this.defaultStepFactor;if("function"==typeof e.step)n=e.step();else if(t.length>0){const r=t.find((e=>{var t;return(null==(t=e.data)?void 0:t.length)>1}));if(r){const t=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(e(r.data[1][t])-e(r.data[0][t]))}}return n}getTotalGroupPadding(){const e=this.model.getGroupedData(this.configs.groups);return 1===e.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(e.length-1)}getBarWidth(){const e=this.getOptions(),t=d_(e,"bars","width"),n=d_(e,"bars","maxWidth");if(null!==t&&(null===n||t<=n))return t;const r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)}setGroupScale(){const e=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=js().domain(e).rangeRound([0,this.getGroupWidth()])}}class gC extends Tx{constructor(){super(...arguments),this.type="heatmap",this.renderType=Vy.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=e=>{const{detail:t}=e,{datum:n}=t,r=this.model.getUniqueRanges(),i=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),s=this.services.cartesianScales.getMainXScale(),l=this.services.cartesianScales.getMainYScale();let c="",u=null,d=null,h=null;void 0!==this.matrix[n]?(c=a,r.forEach((e=>{if("number"==typeof this.matrix[n][e].value){const t=this.matrix[n][e].value;if(null===u)return u=t,d=t,void(h=t);u+=t,d=t<d?t:d,h=t>h?t:h}}))):(c=o,i.forEach((e=>{if("number"==typeof this.matrix[e][n].value){const t=this.matrix[e][n].value;if(null===u)return u=t,d=t,void(h=t);u+=t,d=t<d?t:d,h=t>h?t:h}}))),void 0!==s(n)?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${s(n)}, ${A(l.range())})`):void 0!==l(n)&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${A(s.range())},${l(n)})`),this.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t.event,hoveredElement:ht(e.detail.element),items:[{label:c,value:n,bold:!0},{label:"Min",value:null!==d?d:"-"},{label:"Max",value:null!==h?h:"-"},{label:"Average",value:null!==u?u/i.length:"-"}]})},this.handleAxisMouseOut=e=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:e})}}init(){const e=this.services.events;e.addEventListener(Fy.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),e.addEventListener(Fy.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),e.addEventListener(Fy.Axis.LABEL_FOCUS,this.handleAxisOnHover),e.addEventListener(Fy.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0});t.lower();const{cartesianScales:n}=this.services;if(this.matrix=this.model.getMatrix(),t.html(""),d_(this.getOptions(),"data","loading"))return;const r=n.getMainXScale(),i=n.getMainYScale(),a=n.getDomainIdentifier(),o=n.getRangeIdentifier(),s=this.model.getUniqueDomain(),l=this.model.getUniqueRanges(),c=this.model.getMatrixAsArray(),u=r.range(),d=i.range();this.xBandwidth=Math.abs((u[1]-u[0])/s.length),this.yBandwidth=Math.abs((d[1]-d[0])/l.length);const h=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");t.append("defs").append("pattern").attr("id",h).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const f=t.selectAll().data(c).enter().append("g").attr("class",(e=>`heat-${e.index}`)).classed("cell",!0).attr("transform",(e=>`translate(${r(e[a])}, ${i(e[o])})`)).append("rect").attr("class",(e=>this.model.getColorClassName({value:e.value,originalClassName:`heat-${e.index}`}))).classed("heat",!0).classed("null-state",(e=>-1===e.index||null===e.value)).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",(e=>-1===e.index||null===e.value?`url(#${h})`:this.model.getFillColor(Number(e.value)))).attr("aria-label",(e=>e.value));this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(d[1]-d[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(u[1]-u[0]),this.yBandwidth),this.determineDividerStatus()&&(f.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(e,t,n){const r=Cx.appendOrSelect(this.parent,e).classed("shadows",!0).classed("highlighter-hidden",!0);Cx.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",t+1),Cx.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",n+1),Cx.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",t+1).attr("y1",n).attr("y2",n),Cx.appendOrSelect(r,"line.right").attr("x1",t).attr("x2",t).attr("y1",-1).attr("y2",n+1)}determineDividerStatus(){const e=d_(this.getOptions(),"heatmap","divider","state");return e!==vb.OFF&&(e===vb.AUTO&&Jb<=this.xBandwidth&&Jb<=this.yBandwidth||e===vb.ON)}addEventListener(){const e=this,{cartesianScales:t}=this.services,n=wp(this.getOptions(),"tooltip.totalLabel"),r=t.getDomainIdentifier(),i=t.getRangeIdentifier(),a=t.getDomainLabel(),o=t.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",(function(t,s){const l=ht(this),c=l.select("rect.heat");if(!c.classed("null-state")){const u=s_(l.attr("transform"));e.parent.select("g.cell-highlight").attr("transform",`translate(${u.x+e.translationUnits.x}, ${u.y+e.translationUnits.y})`).classed("highlighter-hidden",!1),e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEOVER,{event:t,element:c,datum:s}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,items:[{label:a,value:s[r]},{label:o,value:s[i]},{label:n||"Total",value:s.value,color:c.style("fill")}]})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this).select("rect.heat"),i=r.classed("null-state");e.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),i||(e.services.events.dispatchEvent(Fy.Heatmap.HEATMAP_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{event:t,hoveredElement:r}))}))}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleAxisOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class vC extends Tx{constructor(){super(...arguments),this.type="histogram",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[r]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer(),n=this.model.getOptions(),{groupIdentifier:r}=n,{groupMapsTo:i}=n.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),s=t.selectAll("g.bars").data(a,(e=>wp(e,`0.${i}`)));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",AS.GROUP);const l=t.selectAll("g.bars").selectAll("path.bar").data((e=>e));l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).attr(r,((e,t)=>t)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"histogram-bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[i],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[i]))).attr("d",(e=>{const t=wp(e,"data");if(!t)return;const r=o(t.x1)-o(t.x0)-1,i=this.services.cartesianScales.getDomainValue(t.x0),a=i+r,s=this.services.cartesianScales.getRangeValue(e[0]);let l=this.services.cartesianScales.getRangeValue(e[1]);return Math.abs(l-s)>0&&Math.abs(l-s)>n.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=1:l-=1),f_({x0:i,x1:a,y0:s,y1:l},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>d_(e,"data",e[i]))),this.addEventListeners()}addEventListeners(){const e=this.model.getOptions(),{groupMapsTo:t}=e.data,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){const a=ht(this);a.classed("hovered",!0);const o=parseFloat(wp(i,"data.x0")),s=parseFloat(wp(i,"data.x1")),l=n.services.cartesianScales.getRangeAxisPosition(),c=n.services.cartesianScales.getScaleLabel(l);n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:wp(e,"bins.rangeLabel")||"Range",value:`${o} – ${s}`},{label:e.tooltip.groupLabel||"Group",value:i[t],class:n.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:i[t]})},{label:c,value:wp(i,`data.${i[t]}`)}]})})).on("mousemove",(function(e){n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){ht(this).classed("hovered",!1),n.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class yC extends $O{constructor(){super(...arguments),this.type="lollipop",this.renderType=Vy.SVG,this.handleScatterOnHover=e=>{const t=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("line.line").attr("stroke-width",(e=>e[r]!==t.datum[r]?Ib.unselected:Ib.selected))},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",Ib.unselected)},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("line.line").transition("legend-hover-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-line"}))).attr("opacity",(e=>e[r]!==t.datum().name?Nb.unselected:Nb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-line"}))).attr("opacity",Nb.selected)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.model.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services,a=i.getMainXScale(),o=i.getMainYScale(),s=i.getDomainIdentifier(),l=i.getOrientation(),[c,u]=p_((e=>i.getDomainValue(e)),(e=>i.getRangeValue(e)),l),d=t.selectAll("line.line").data(this.getScatterData(),(e=>`${e[r]}-${e[s]}`));d.exit().attr("opacity",0).remove();const h=d.enter().append("line").attr("opacity",0).merge(d).classed("line",!0).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.STROKE],dataGroupName:e[r],originalClassName:"line"}))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"lollipop-line-update-enter",animate:e}))).style("stroke",(e=>this.model.getFillColor(e[r],e[s],e))).attr("opacity",1);l===Yy.HORIZONTAL?h.attr("y1",u).attr("y2",u).attr("x1",a.range()[0]).attr("x2",(e=>c(e)-n.points.radius)):h.attr("x1",c).attr("x2",c).attr("y1",o.range()[0]).attr("y2",(e=>u(e)+n.points.radius)),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(Fy.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(Fy.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),e.removeEventListener(Fy.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),e.removeEventListener(Fy.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class bC extends Tx{constructor(){super(...arguments),this.type="meter",this.renderType=Vy.SVG}getStackedBounds(e,t){let n=0;return e.map(((e,r)=>0!==r?(n+=t(e.value),{...e,width:Math.abs(t(e.value)-Ub),x:n-t(e.value)}):(n=t(e.value),{...e,width:Math.abs(t(e.value)-Ub),x:0})))}render(e=!0){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=d_(r,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:s}=Cx.getSVGElementSize(n,{useAttrs:!0}),{groupMapsTo:l}=r.data;let c;if(null===d_(r,"meter","proportional"))c=100;else{const e=d_(r,"meter","proportional","total");c=e||this.model.getMaximumDomain(this.model.getDisplayData())}const u=Js().domain([0,c]).range([0,s]),d=this.getStackedBounds(a,u),h=d_(r,"meter","height");Cx.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",h||(i?zb.proportional:zb.default)),Cx.appendOrSelect(n,"line.rangeIndicator").attr("x1",s).attr("x2",s).attr("y1",0).attr("y2",h||(i?zb.proportional:zb.default));const f=n.selectAll("rect.value").data(d),p=null==o||t.model.isUserProvidedColorScaleValid()||i?"value":`value status--${o}`;f.enter().append("rect").classed("value",!0).merge(f).attr("x",(e=>e.x)).attr("y",0).attr("height",(()=>h||(i?zb.proportional:zb.default))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[l],originalClassName:p}))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"meter-bar-update",animate:e}))).attr("width",(e=>e.value>c?u(c):e.width)).style("fill",(e=>t.model.getFillColor(e[l]))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(e=>e.value)),f.exit().remove();const m=d_(r,"meter","peak");let g=m;null!==m&&(m>c?g=c:m<a[0].value&&(g=a[0].value>c?c:a[0].value));const v=n.selectAll("line.peak").data(null==g?[]:[g]);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",(()=>h||(i?zb.proportional:zb.default))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"peak-line-update",animate:e}))).attr("x1",(e=>u(e))).attr("x2",(e=>u(e))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(e=>e)),v.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this,r=d_(e,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(e,i){const a=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEOVER,{event:e,element:a,datum:i}),r&&(a.classed("hovered",!0),n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:a,items:[{label:i[t],value:i.value}]}))})).on("mousemove",(function(e,t){const i=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEMOVE,{event:e,element:i,datum:t}),r&&n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.Meter.METER_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const i=ht(this);n.services.events.dispatchEvent(Fy.Meter.METER_MOUSEOUT,{event:e,element:i,datum:t}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i}))}))}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function _C(e){const t=function(e,t){return(e%t+t)%t}(EC(e),360);return wC(t,[0,10])||wC(t,[350,0])?{textAnchor:ob.START,dominantBaseline:sb.MIDDLE}:wC(t,[10,80])?{textAnchor:ob.START,dominantBaseline:sb.HANGING}:wC(t,[80,100])?{textAnchor:ob.MIDDLE,dominantBaseline:sb.HANGING}:wC(t,[100,170])?{textAnchor:ob.END,dominantBaseline:sb.HANGING}:wC(t,[170,190])?{textAnchor:ob.END,dominantBaseline:sb.MIDDLE}:wC(t,[190,260])?{textAnchor:ob.END,dominantBaseline:sb.BASELINE}:wC(t,[260,280])?{textAnchor:ob.MIDDLE,dominantBaseline:sb.BASELINE}:{textAnchor:ob.START,dominantBaseline:sb.BASELINE}}function wC(e,[t,n]){return e>=t&&e<=n}function EC(e){return e*(180/Math.PI)}function xC(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}class SC extends Tx{constructor(){super(...arguments),this.type="radar",this.renderType=Vy.SVG,this.getLabelDimensions=e=>{const t=Cx.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),n=Cx.appendOrSelect(t,"text").text(e),{width:r,height:i}=Cx.getSVGElementSize(n.node(),{useBBox:!0});return t.remove(),{width:r,height:i}},this.normalizeFlatData=e=>{const t=this.getOptions(),{angle:n,value:r}=d_(t,"radar","axes"),i=d_(t,"data","groupMapsTo"),a=function(e,t){return Op(Qv(e,t),1/0)}(this.uniqueKeys.map((e=>this.uniqueGroups.map((t=>({[n]:e,[i]:t,[r]:null}))))));return sy(a,e)},this.normalizeGroupedData=e=>{const t=this.getOptions(),{angle:n,value:r}=d_(t,"radar","axes"),i=d_(t,"data","groupMapsTo");return e.map((({name:e,data:t})=>{const a=this.uniqueKeys.map((t=>({[i]:e,[n]:t,[r]:null})));return{name:e,data:sy(a,t)}}))},this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-blob"}))).style("fill-opacity",(e=>e.name!==t.datum().name?Yb.opacity.unselected:Yb.opacity.selected)).style("stroke-opacity",(e=>e.name!==t.datum().name?Yb.opacity.unselected:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-blob"}))).style("fill-opacity",Yb.opacity.selected).style("stroke-opacity",1)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer(),{width:n,height:r}=Cx.getSVGElementSize(t,{useAttrs:!0}),i=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),s=d_(o,"data","groupMapsTo"),l=d_(o,"radar","axes","value"),{angle:u,value:d}=d_(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:m,xAxisRectHeight:g}=Yb;this.uniqueKeys=Array.from(new Set(i.map((e=>e[u])))),this.uniqueGroups=Array.from(new Set(i.map((e=>e[s])))),this.fullDataNormalized=this.normalizeFlatData(i),this.groupedDataNormalized=this.normalizeGroupedData(a);const v=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),y=(Math.min(n,r)-v)/2;if(y<=0)return;const b=js().domain(this.fullDataNormalized.map((e=>e[u]))).range([0,2*Math.PI].map((e=>e-Math.PI/2))),_=A(this.fullDataNormalized.map((e=>e[d]))),w=Js().domain([_>=0?0:_,T(this.fullDataNormalized.map((e=>e[d])))]).range([m,y]).nice(p),E=w.ticks(p),x=e=>this.model.getFillColor(e),S=Ju().angle((e=>b(e[u])+Math.PI/2)).radius((e=>w(e[d]))).curve(kd),O={x:T(this.uniqueKeys.map((e=>this.getLabelDimensions(e).width+function(e,t){return t*Math.sin(e-Math.PI/2)}(b(e),y))))+h,y:r/2},C=Cx.appendOrSelect(t,"g.y-axes").attr("role",AS.GROUP).selectAll("path").data(E,(e=>e)),M=e=>this.uniqueKeys.map((t=>({[u]:t,[d]:e})));C.join((t=>t.append("path").attr("opacity",0).attr("transform",`translate(${O.x}, ${O.y})`).attr("fill","none").call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_enter",animate:e}))).attr("opacity",1).attr("d",(e=>S(M(e))))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_update",animate:e}))).attr("opacity",1).attr("transform",`translate(${O.x}, ${O.y})`).attr("d",(e=>S(M(e))))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_axes_exit",animate:e}))).attr("d",(e=>S(M(e)))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.x-axes").attr("role",AS.GROUP).selectAll("line").data(this.uniqueKeys,(e=>e)).join((t=>t.append("line").attr("opacity",0).attr("class",(e=>`x-axis-${oy(e)}`)).attr("stroke-dasharray","0").attr("x1",(e=>xC(b(e),0,O).x)).attr("y1",(e=>xC(b(e),0,O).y)).attr("x2",(e=>xC(b(e),0,O).x)).attr("y2",(e=>xC(b(e),0,O).y)).call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_enter",animate:e}))).attr("opacity",1).attr("x1",(e=>xC(b(e),w.range()[0],O).x)).attr("y1",(e=>xC(b(e),w.range()[0],O).y)).attr("x2",(e=>xC(b(e),w.range()[1],O).x)).attr("y2",(e=>xC(b(e),w.range()[1],O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_update",animate:e}))).attr("opacity",1).attr("x1",(e=>xC(b(e),w.range()[0],O).x)).attr("y1",(e=>xC(b(e),w.range()[0],O).y)).attr("x2",(e=>xC(b(e),w.range()[1],O).x)).attr("y2",(e=>xC(b(e),w.range()[1],O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_axes_exit",animate:e}))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.x-labels").attr("role",AS.GROUP).selectAll("text").data(this.uniqueKeys).join((t=>t.append("text").text((e=>e)).attr("opacity",0).attr("x",(e=>xC(b(e),w.range()[1]+h,O).x)).attr("y",(e=>xC(b(e),w.range()[1]+h,O).y)).style("text-anchor",(e=>_C(b(e)).textAnchor)).style("dominant-baseline",(e=>_C(b(e)).dominantBaseline)).call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_enter",animate:e}))).attr("opacity",1)))),(n=>n.call((n=>n.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_update",animate:e}))).attr("opacity",1).attr("x",(e=>xC(b(e),w.range()[1]+h,O).x)).attr("y",(e=>xC(b(e),w.range()[1]+h,O).y)).end().finally((()=>{const e=d_(o,"radar","alignment"),n=this.getAlignmentXOffset(e,t,this.getParent());t.attr("x",n)}))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_x_labels_exit",animate:e}))).attr("opacity",0).remove())))),Cx.appendOrSelect(t,"g.blobs").attr("role",AS.GROUP).selectAll("path").data(this.groupedDataNormalized,(e=>e.name)).join((t=>t.append("path").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"blob"}))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e.name)).attr("opacity",0).attr("transform",e?()=>`translate(${O.x}, ${O.y}) scale(${1+.35*Math.random()})`:`translate(${O.x}, ${O.y})`).style("fill",(e=>x(e.name))).style("fill-opacity",Yb.opacity.selected).style("stroke",(e=>x(e.name))).call((t=>{const n=t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_enter",animate:e})));e&&n.delay((()=>30*Math.random())).attr("transform",`translate(${O.x}, ${O.y})`),n.attr("opacity",1).attr("d",(e=>S(e.data)))}))),(t=>(t.attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL,Gy.STROKE],dataGroupName:e.name,originalClassName:"blob"}))).style("fill",(e=>x(e.name))).style("stroke",(e=>x(e.name))),t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_update",animate:e}))).attr("opacity",1).attr("transform",`translate(${O.x}, ${O.y})`).attr("d",(e=>S(e.data))))),t)),(t=>t.call((t=>{const n=t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_blobs_exit",animate:e})));e&&n.delay((()=>30*Math.random())).attr("transform",(()=>`translate(${O.x}, ${O.y}) scale(${1+.35*Math.random()})`)),n.attr("opacity",0).remove()})))),Cx.appendOrSelect(t,"g.dots").attr("role",AS.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((e=>null!==d_(e,d)))).join((e=>e.append("circle").attr("role",AS.GRAPHICS_SYMBOL).attr("aria-label",(e=>e[l]))),(e=>e),(e=>e.remove())).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[s],originalClassName:oy(e[u])}))).attr("cx",(e=>xC(b(e[u]),w(e[d]),O).x)).attr("cy",(e=>xC(b(e[u]),w(e[d]),O).y)).attr("r",0).attr("opacity",0).style("fill",(e=>x(e[s]))),Cx.appendOrSelect(t,"g.x-axes-rect").attr("role",AS.GROUP).selectAll("rect").data(this.uniqueKeys).join((e=>e.append("rect")),(e=>e),(e=>e.remove())).attr("x",O.x).attr("y",O.y-g/2).attr("width",w.range()[1]).attr("height",g).style("fill","red").style("fill-opacity",0).attr("transform",(e=>`rotate(${EC(b(e))}, ${O.x}, ${O.y})`)),Cx.appendOrSelect(t,"g.y-labels").attr("role",AS.GROUP).selectAll("text").data(c(E)).join((t=>t.append("text").attr("opacity",0).text((e=>e)).attr("x",(e=>xC(-Math.PI/2,w(e),O).x+f)).attr("y",(e=>xC(-Math.PI/2,w(e),O).y)).style("text-anchor","start").style("dominant-baseline","middle").call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_enter",animate:e}))).attr("opacity",1)))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_update",animate:e}))).text((e=>e)).attr("opacity",1).attr("x",(e=>xC(-Math.PI/2,w(e),O).x+f)).attr("y",(e=>xC(-Math.PI/2,w(e),O).y))))),(t=>t.call((t=>t.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"radar_y_labels_exit",animate:e}))).attr("opacity",0).remove())))),this.addEventListeners()}getAlignmentXOffset(e,t,n){const r=Cx.getSVGElementSize(t,{useBBox:!0}),{width:i}=Cx.getSVGElementSize(n,{useAttrs:!0});let a=0;return e===Qy.CENTER?a=Math.floor((i-r.width)/2):e===Qy.RIGHT&&(a=i-r.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const e=this,{axes:{angle:t}}=d_(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});const a=e.parent.select(`.x-axes .x-axis-${oy(r)}`),o=e.parent.selectAll(`.dots circle.${oy(r)}`),s=e.model.getActiveDataGroupNames(),l=e.getOptions(),{groupMapsTo:c}=l.data,u=d_(l,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",(e=>-1!==s.indexOf(e[c])?1:0)).attr("r",Yb.dotsRadius);const d=e.fullDataNormalized.filter((e=>e[t]===r&&-1!==s.indexOf(e[c])));e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:n,hoveredElement:i,items:d.filter((e=>"number"==typeof e[u])).map((t=>({label:t[c],value:t[u],color:e.model.getFillColor(t[c]),class:e.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:t[c]})})))})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Radar.X_AXIS_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this),i=e.parent.select(`.x-axes .x-axis-${oy(n)}`),a=e.parent.selectAll(`.dots circle.${oy(n)}`);i.classed("hovered",!1).attr("stroke-dasharray","0"),a.classed("hovered",!1).attr("opacity",0).attr("r",0),e.services.events.dispatchEvent(Fy.Radar.X_AXIS_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE)}))}}class OC extends sC{constructor(){super(...arguments),this.type="simple-bar",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-simple-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-simple-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getComponentContainer({withinChartClip:!0}),i=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=r.selectAll("path.bar").data(i,(e=>e[n]));o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[n],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[n]))).attr("d",(e=>{const t=this.services.cartesianScales.getRangeIdentifier(),n=this.getBarWidth(),r=e[t],i=this.services.cartesianScales.getDomainValue(e)-n/2,o=i+n;let s,l;if(Array.isArray(r)&&2===r.length)s=this.services.cartesianScales.getRangeValue(r[0]),l=this.services.cartesianScales.getRangeValue(r[1]);else{const t=this.services.cartesianScales.getRangeScale().domain()[0];s=this.services.cartesianScales.getRangeValue(Math.max(0,t)),l=this.services.cartesianScales.getRangeValue(e)}const c=Math.abs(l-s);if(0!==c&&c<2&&(l=r>0&&a===Yy.VERTICAL||r<0&&a===Yy.HORIZONTAL?s-2:s+2),!this.isOutsideZoomedDomain(i,o))return f_({x0:i,x1:o,y0:s,y1:l},a)})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e.value)),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("path.bar").on("mouseover",(function(t,n){const r=ht(this);r.classed("hovered",!0),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,data:[n]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:t,element:ht(this),datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1),e.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class CC extends jO{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=d_(this.getOptions(),"data","loading"),n=!(d_(this.getOptions(),"grid","x","enabled")||d_(this.getOptions(),"grid","y","enabled")||d_(this.getOptions(),"axes","bottom","visible")||d_(this.getOptions(),"axes","left","visible"));t&&!n?super.renderGridSkeleton(t):t&&n?this.renderSparklineSkeleton(t):this.removeSkeleton()}renderSparklineSkeleton(e){this.setScales(),this.drawBackdrop(e),this.drawSparkline(e),this.updateBackdropStyle(),e&&this.setShimmerEffect("shimmer-lines")}drawSparkline(e){const t=this.backdrop.attr("width"),n=Cx.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",t).attr("y1",(e=>e)).attr("y2",(e=>e)),n.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const e=this.parent;this.backdrop=Cx.appendOrSelect(e,"svg.chart-skeleton.DAII"),Cx.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class TC extends Tx{constructor(){super(...arguments),this.type="area-stacked",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.area").transition("legend-hover-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-area"}))).attr("opacity",(e=>d_(e,0,r)!==t.datum().name?wb.unselected:wb.selected))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-area"}))).attr("opacity",wb.selected)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({withinChartClip:!0}),n=this,r=this.getOptions(),{groupMapsTo:i}=r.data,a=Object.keys(r.axes).some((e=>r.axes[e].percentage)),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),s=d_(o,0,0),l=this.services.cartesianScales.getDomainAxisPosition({datum:s}),c=this.services.cartesianScales.getRangeAxisPosition({datum:s}),u=this.services.cartesianScales.getScaleByPosition(c),d=t.selectAll("path.area").data(o,(e=>d_(e,0,i)));this.areaGenerator=qu().x((e=>this.services.cartesianScales.getValueThroughAxisPosition(l,e.data.sharedStackKey))).y0((e=>u(e[0]))).y1((e=>u(e[1]))).curve(this.services.curves.getD3Curve()),d.exit().attr("opacity",0).remove(),d.enter().append("path").attr("opacity",0).merge(d).data(o,(e=>d_(e,0,i))).attr("class","area").attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:d_(e,0,i),originalClassName:"area"}))).style("fill",(e=>n.model.getFillColor(d_(e,0,i)))).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",(e=>d_(e,0,i))).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"area-update-enter",animate:e}))).attr("opacity",wb.selected).attr("d",this.areaGenerator)}}class AC extends sC{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-bar"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-bar"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e){const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=t.selectAll("g.bars").data(i,(e=>d_(e,0,r)));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",AS.GROUP).attr("data-name","bars");const s=t.selectAll("g.bars").selectAll("path.bar").data((e=>e),(e=>e.data.sharedStackKey));s.exit().remove(),s.enter().append("path").merge(s).classed("bar",!0).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"bar-update-enter",animate:e}))).attr("class",(e=>this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[r],originalClassName:"bar"}))).style("fill",(e=>this.model.getFillColor(e[r]))).attr("d",(e=>{const t=e.data.sharedStackKey,r=this.getBarWidth(),i=this.services.cartesianScales.getDomainValue(t)-r/2,o=i+r,s=this.services.cartesianScales.getRangeValue(e[0]);let l=this.services.cartesianScales.getRangeValue(e[1]);if(!this.isOutsideZoomedDomain(i,o)){if(Math.abs(l-s)>0&&Math.abs(l-s)>n.bars.dividerSize){const t=e[0]<0&&e[1]<=0;t&&a.length>1?this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=0===e[1]?2:1:l-=1:t||(this.services.cartesianScales.getOrientation()===Yy.VERTICAL?l+=1:l-=1)}return f_({x0:i,x1:o,y0:s,y1:l},this.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",AS.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(e=>e[1]-e[0])),this.addEventListeners()}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,r){const i=ht(this);i.classed("hovered",!0),n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOVER,{event:e,element:i,datum:r});let a=n.model.getDisplayData(n.configs.groups).find((e=>{const i=n.services.cartesianScales.getDomainIdentifier(e);return e[n.services.cartesianScales.getRangeIdentifier(e)]===r.data[r[t]]&&e[i].toString()===r.data.sharedStackKey&&e[t]===r[t]}));if(void 0===a){const e=n.services.cartesianScales.getDomainIdentifier(),i=n.services.cartesianScales.getRangeIdentifier();a={[e]:r.data.sharedStackKey,[i]:r.data[r[t]],[t]:r[t]}}n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:e,hoveredElement:i,data:[a]})})).on("mousemove",(function(e,t){const r=ht(this);n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.Bar.BAR_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const r=ht(this);r.classed("hovered",!1),n.services.events.dispatchEvent(Fy.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}getBarWidth(){const e=this.getOptions();if(d_(e,"bars","width"))return e.bars.width;const t=this.services.cartesianScales.getMainXScale(),n=Cx.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,i=d_(e,"bars","spacingFactor");return t.step?Math.min(e.bars.maxWidth,t.step()/2):Math.min(e.bars.maxWidth,n*i/r)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const e=this.services.events;e.removeEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class MC extends $O{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=Vy.SVG}render(e){if(!d_(this.getOptions(),"points","enabled"))return;const t=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,i=Object.keys(n.axes).some((e=>n.axes[e].percentage)),a=this.model.getStackedData({groups:this.configs.groups,percentage:i}),o=t.selectAll("g.dots").data(a,(e=>d_(e,0,r)));o.exit().attr("opacity",0).remove();const s=o.enter().append("g").classed("dots",!0).attr("role",AS.GROUP).merge(o).selectAll("circle.dot").data((e=>e));s.exit().attr("opacity",0).remove();const l=s.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(s).datum((e=>{const t=e[r],n=this.services.cartesianScales.getDomainIdentifier(e),i=this.services.cartesianScales.getRangeIdentifier(e);return{[r]:t,[n]:e.data.sharedStackKey,[i]:e[1]}}));this.styleCircles(l,e),this.addEventListeners()}getTooltipData(e,t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=Object.keys(n.axes).some((e=>n.axes[e].percentage)),a=this.model.getStackedData({groups:this.configs.groups,percentage:i}),o=[];return a.forEach(((n,a)=>{n.forEach(((n,s)=>{const l=n[r],c=n.data.sharedStackKey;let u=n.data[l];const d=n[1],h=this.services.cartesianScales.getDomainIdentifier(n),f=this.services.cartesianScales.getRangeIdentifier(n);null!=u&&e===this.services.cartesianScales.getDomainValue(c)&&t===this.services.cartesianScales.getRangeValue(d)&&(i&&(u=this.model.getStackedData({groups:this.configs.groups})[a][s].data[l]),null!==u&&o.push({[r]:l,[h]:c,[f]:u}))}))})),this.model.getDisplayData(this.configs.groups).filter((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e),n=this.services.cartesianScales.getRangeIdentifier(e);return void 0!==o.find((i=>i[r]==e[r]&&i[t]==e[t]&&i[n]==e[n]))}))}}class kC extends Tx{constructor(){super(...arguments),this.type="tree",this.renderType=Vy.SVG}getLongestLabel(e){let t="";return e.forEach((e=>{const n=e.children?this.getLongestLabel(e.children):"";(n.length>t.length||e.name.length>t.length)&&(t=n.length>e.name.length?n:e.name)})),t}getMockLabelWidth(e,t){const n=e.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(t),{width:r}=Cx.getSVGElementSize(n.node(),{useBBox:!0});return n.remove(),r}render(e=!0){const t=this.getComponentContainer();t.html("");const{width:n,height:r}=Cx.getSVGElementSize(this.parent,{useAttrs:!0});if(n<1||r<1)return;const i=this.model.getOptions(),a=this.model.getDisplayData(),o=d_(i,"tree","rootTitle")||"Tree",s=this.getMockLabelWidth(t,o),l=this.getLongestLabel(a),c=this.getMockLabelWidth(t,l),u=0,d=s>0?s+6:24,h=Qo({name:o,children:a}),f=n/6,p=e=>{const r=h.descendants().reverse(),i=h.links();let a=h,o=h;h.eachBefore((e=>{e.x<a.x&&(a=e),e.x>o.x&&(o=e)}));const s=o.x-a.x,l=t.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"tree-update-viewbox",animate:!0}))).attr("viewBox",[-d,a.x,n,s].join(" ")),c=_.selectAll("g").data(r,(e=>e.id)),u=this,f=c.enter().append("g").attr("transform",(()=>`translate(${e.y0},${e.x0})`)).attr("class",(e=>0!==e.depth&&e.children&&e.children.length>0?"clickable":null)).on("mouseover",(function(e,t){u.services.events.dispatchEvent(Fy.Tree.NODE_MOUSEOVER,{event:e,element:ht(this),datum:t})})).on("click",(function(e,t){0!==t.depth&&(t.children=t.children?null:t._children,p(t)),u.services.events.dispatchEvent(Fy.Tree.NODE_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){u.services.events.dispatchEvent(Fy.Tree.NODE_MOUSEOUT,{event:e,element:ht(this),datum:t})}));f.append("circle").attr("r",2.5).attr("class",(e=>e._children?"parent":"child")).attr("stroke-width",10),f.append("text").attr("dy","0.31em").attr("x",(e=>e._children?-6:6)).attr("text-anchor",(e=>e._children?"end":"start")).text((e=>e.data.name)).clone(!0).attr("class","text-stroke").lower(),c.merge(f).transition(l).attr("transform",(e=>`translate(${e.y},${e.x})`)).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(l).remove().attr("transform",(()=>`translate(${e.y},${e.x})`)).attr("fill-opacity",0).attr("stroke-opacity",0);const m=b.selectAll("path").data(i,(e=>e.target.id)),g=m.enter().append("path").attr("d",(()=>{const t={x:e.x0,y:e.y0};return y({source:t,target:t})}));m.merge(g).transition(l).attr("d",y),m.exit().transition(l).remove().attr("d",(()=>{const t={x:e.x,y:e.y};return y({source:t,target:t})})),h.eachBefore((e=>{e.x0=e.x,e.y0=e.y}))},m=h.descendants(),g=m[m.length-1].depth,v=d_(i,"tree","type")===eb.DENDROGRAM?Ko().size([r,n-c-6*g-s]):Is().nodeSize([10,f]).size([r,n-c-6*g-s]),y=id().x((e=>e.y)).y((e=>e.x));h.x0=f/2,h.y0=0,h.descendants().forEach(((e,t)=>{e.id=t,e._children=e.children})),v(h),t.attr("viewBox",[-d,-u,n,10]).style("user-select","none");const b=t.append("g").attr("class","links"),_=t.append("g").attr("class","nodes");p(h)}}var LC={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}};const DC=function(){const e=ht(this.parentNode).select("rect.leaf"),t=Nt(getComputedStyle(e.node(),null).getPropertyValue("fill"));let n;if(t&&(n=(e=>{if(!e)return null;for(const t of Object.keys(LC)){const n=LC[t];for(const t of Object.keys(n))if(n[+t]===e)return t}return null})(t?t.hex():null)),null==n){const e=Wt(t).l;n=Math.abs(100*e-100)}return n>50?"white":"black"};let RC=0;class NC extends Tx{constructor(){super(...arguments),this.type="treemap",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-treemap"}))).attr("opacity",(e=>e.parent.data.name===t.datum().name?1:.3))},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-treemap"}))).attr("opacity",1)}}init(){const{events:e}=this.services;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer();this.model.getData();const n=this.model.getDisplayData(),r=this.model.getOptions(),i=d_(window,"location"),{width:a,height:o}=Cx.getSVGElementSize(t,{useAttrs:!0}),s=Qo({name:r.title||"Treemap",children:n}).sum((e=>e.value)).sort(((e,t)=>t.value-e.value)),l=function(){var e=$s,t=!1,n=1,r=1,i=[0],a=as,o=as,s=as,l=as,c=as;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(Ts),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,h=t.y1-n;d<r&&(r=d=(r+d)/2),h<u&&(u=h=(u+h)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=h,t.children&&(n=i[t.depth+1]=a(t)/2,r+=c(t)-n,u+=o(t)-n,(d-=s(t)-n)<r&&(r=d=(r+d)/2),(h-=l(t)-n)<u&&(u=h=(u+h)/2),e(t,r,u,d,h))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=is(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a="function"==typeof e?e:os(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o="function"==typeof e?e:os(+e),u):o},u.paddingRight=function(e){return arguments.length?(s="function"==typeof e?e:os(+e),u):s},u.paddingBottom=function(e){return arguments.length?(l="function"==typeof e?e:os(+e),u):l},u.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:os(+e),u):c},u}().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(s),c=t.selectAll("g[data-name='leaf']").data(l.leaves(),(e=>e.data.name));c.exit().attr("opacity",0).remove();const u=c.enter().append("g").attr("data-name","leaf").attr("data-uid",(()=>RC++)).merge(c);u.attr("data-name","leaf").transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"treemap-group-update",animate:e}))).attr("transform",(e=>`translate(${e.x0},${e.y0})`));const d=u.selectAll("rect.leaf").data((e=>[e]));d.exit().attr("width",0).attr("height",0).remove(),d.enter().append("rect").classed("leaf",!0).merge(d).attr("width",0).attr("height",0).attr("id",(function(){const e=ht(this.parentNode).attr("data-uid");return`${r.style.prefix}-leaf-${e}`})).attr("class",(e=>{for(;e.depth>1;)e=e.parent;return this.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e.data.name,originalClassName:"leaf"})})).transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"treemap-leaf-update-enter",animate:e}))).attr("width",(e=>e.x1-e.x0)).attr("height",(e=>e.y1-e.y0)).style("fill",(e=>{for(;e.depth>1;)e=e.parent;return this.model.getFillColor(e.data.name)})),u.selectAll("clipPath").data((e=>!0!==e.data.showLabel?[]:[1]),(e=>e)).join((e=>e.append("clipPath").attr("id",(function(){const e=ht(this.parentNode).attr("data-uid");return`${r.style.prefix}-clip-${e}`})).append("use").attr("xlink:href",(function(){const e=ht(this.parentNode.parentNode).attr("data-uid"),t=`${r.style.prefix}-leaf-${e}`;return new URL(`#${t}`,i)+""}))),(e=>null),(e=>e.remove())),u.selectAll("text").data((e=>{if(!0!==e.data.showLabel)return[];let t=e;for(;t.depth>1;)t=t.parent;const n=Wt(this.model.getFillColor(t.data.name));return[{text:e.data.name,color:n.l<.5?"white":"black"}]}),(e=>e)).join((e=>{const t=e.append("text").text((e=>e.text)).style("fill",DC).attr("x",7).attr("y",18);return i&&t.attr("clip-path",(function(){const e=ht(this.parentNode).attr("data-uid"),t=`${r.style.prefix}-clip-${e}`;return`url(${new URL(`#${t}`,i)+""})`})),t}),(e=>e.text((e=>e.text)).style("fill",DC)),(e=>e.remove())),this.addEventListeners()}addEventListeners(){const e=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(t,n){const r=ht(this);let i=getComputedStyle(this,null).getPropertyValue("fill"),a=n;for(;a.depth>1;)a=a.parent;r.transition("graph_element_mouseover_fill_update").call((t=>e.services.transitions.setupTransition({transition:t,name:"graph_element_mouseover_fill_update"}))).style("fill",(t=>{const n=e.model.getFillColor(t.parent.data.name);return n&&(i=n),Nt(i).darker(.7).toString()})),e.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:t,hoveredElement:r,items:[{color:i,label:a.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEOVER,{event:t,element:r,datum:n})})).on("mousemove",(function(t,n){const r=ht(this);e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(Fy.Treemap.LEAF_CLICK,{event:t,element:ht(this),datum:n})})).on("mouseout",(function(t,n){const r=ht(this);r.classed("hovered",!1);let i=n;for(;i.depth>1;)i=i.parent;r.transition().call((t=>e.services.transitions.setupTransition({transition:t,name:"graph_element_mouseout_fill_update"}))).style("fill",(t=>e.model.getFillColor(t.parent.data.name))),e.services.events.dispatchEvent(Fy.Treemap.LEAF_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:r})}))}}var IC={value:function(){}};function PC(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new $C(r)}function $C(e){this._=e}function BC(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function zC(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=IC,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}$C.prototype=PC.prototype={constructor:$C,on:function(e,t){var n,r=this._,i=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=i[a]).type)r[n]=zC(r[n],e.name,t);else if(null==t)for(n in r)r[n]=zC(r[n],e.name,null);return this}for(;++a<o;)if((n=(e=i[a]).type)&&(n=BC(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new $C(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};const UC=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}(Object.freeze(Object.defineProperty({__proto__:null,dispatch:PC},Symbol.toStringTag,{value:"Module"}))).dispatch,jC=Math.PI/180,FC={archimedean:eT,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}},VC=2048;function HC(e){return e.text}function GC(){return"serif"}function WC(){return"normal"}function qC(e){return Math.sqrt(e.value)}function ZC(){return 30*(~~(6*random())-3)}function YC(){return 1}function KC(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,2048/a,VC/a);var o=0,s=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;const e=i.measureText(t.text),c=-Math.floor(e.width/2);let g=(e.width+1)*a,v=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*jC),d=Math.cos(t.rotate*jC),h=g*d,f=g*u,p=v*d,m=v*u;g=Math.max(Math.abs(h+m),Math.abs(h-m))+31>>5<<5,v=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else g=g+31>>5<<5;if(v>l&&(l=v),o+g>=2048&&(o=0,s+=l,l=0),s+v>=VC)break;i.translate((o+(g>>1))/a,(s+(v>>1))/a),t.rotate&&i.rotate(t.rotate*jC),i.fillText(t.text,c,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,c,0)),i.restore(),t.width=g,t.height=v,t.xoff=o,t.yoff=s,t.x1=g>>1,t.y1=v>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=g}for(var g=i.getImageData(0,0,2048/a,VC/a).data,v=[];--r>=0;)if((t=n[r]).hasText){for(var y=t.width,b=y>>5,_=t.y1-t.y0,w=0;w<_*b;w++)v[w]=0;if(null==(o=t.xoff))return;s=t.yoff;for(var E=0,x=-1,S=0;S<_;S++){for(w=0;w<y;w++){var O=b*S+(w>>5),C=g[2048*(s+S)+(o+w)<<2]?1<<31-w%32:0;v[O]|=C,E|=C}E?x=S:(t.y0++,_--,S--,s++)}t.y1=t.y0+x,t.sprite=v.slice(0,(t.y1-t.y0)*b)}}}function XC(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(o>>5),d=0;d<c;d++){r=0;for(var h=0;h<=a;h++)if((r<<l|(h<a?(r=i[d*a+h])>>>s:0))&t[u+h])return!0;u+=n}return!1}function QC(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function JC(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function eT(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function tT(){return document.createElement("canvas")}function nT(e){return"function"==typeof e?e:function(){return e}}const rT=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(){var e=[256,256],t=HC,n=GC,r=qC,i=WC,a=WC,o=ZC,s=YC,l=eT,c=[],u=1/0,d=UC("word","end"),h=null,f=Math.random,p={},m=tT;function g(t,n,r){e[0],e[1];for(var i,a,o,s=n.x,c=n.y,u=Math.sqrt(e[0]*e[0]+e[1]*e[1]),d=l(e),h=f()<.5?1:-1,p=-h;(i=d(p+=h))&&(a=~~i[0],o=~~i[1],!(Math.min(Math.abs(a),Math.abs(o))>=u));)if(n.x=s+a,n.y=c+o,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1])&&(!r||JC(n,r))&&!XC(n,t,e[0])){for(var m,g=n.sprite,v=n.width>>5,y=e[0]>>5,b=n.x-(v<<4),_=127&b,w=32-_,E=n.y1-n.y0,x=(n.y+n.y0)*y+(b>>5),S=0;S<E;S++){m=0;for(var O=0;O<=v;O++)t[x+O]|=m<<w|(O<v?(m=g[S*v+O])>>>_:0);x+=y}return!0}return!1}return p.canvas=function(e){return arguments.length?(m=nT(e),p):m},p.start=function(){var l=function(e){const t=e.getContext("2d",{willReadFrequently:!0});e.width=e.height=1;const n=Math.sqrt(t.getImageData(0,0,1,1).data.length>>2);return e.width=2048/n,e.height=VC/n,t.fillStyle=t.strokeStyle="red",{context:t,ratio:n}}(m()),v=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((e[0]>>5)*e[1]),y=null,b=c.length,_=-1,w=[],E=c.map((function(e,l){return e.text=t.call(this,e,l),e.font=n.call(this,e,l),e.style=i.call(this,e,l),e.weight=a.call(this,e,l),e.rotate=o.call(this,e,l),e.size=~~r.call(this,e,l),e.padding=s.call(this,e,l),e})).sort((function(e,t){return t.size-e.size}));return h&&clearInterval(h),h=setInterval(x,0),x(),p;function x(){for(var t=Date.now();Date.now()-t<u&&++_<b&&h;){var n=E[_];n.x=e[0]*(f()+.5)>>1,n.y=e[1]*(f()+.5)>>1,KC(l,n,E,_),n.hasText&&g(v,n,y)&&(w.push(n),d.call("word",p,n),y?QC(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=e[0]>>1,n.y-=e[1]>>1)}_>=b&&(p.stop(),d.call("end",p,w,y))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const e of c)delete e.sprite;return p},p.timeInterval=function(e){return arguments.length?(u=e??1/0,p):u},p.words=function(e){return arguments.length?(c=e,p):c},p.size=function(t){return arguments.length?(e=[+t[0],+t[1]],p):e},p.font=function(e){return arguments.length?(n=nT(e),p):n},p.fontStyle=function(e){return arguments.length?(i=nT(e),p):i},p.fontWeight=function(e){return arguments.length?(a=nT(e),p):a},p.rotate=function(e){return arguments.length?(o=nT(e),p):o},p.text=function(e){return arguments.length?(t=nT(e),p):t},p.spiral=function(e){return arguments.length?(l=FC[e]||e,p):l},p.fontSize=function(e){return arguments.length?(r=nT(e),p):r},p.padding=function(e){return arguments.length?(s=nT(e),p):s},p.random=function(e){return arguments.length?(f=e,p):f},p.on=function(){var e=d.on.apply(d,arguments);return e===d?p:e},p}));class iT extends Tx{constructor(){super(...arguments),this.type="wordcloud",this.renderType=Vy.SVG,this.handleLegendOnHover=e=>{const{hoveredElement:t}=e.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-hover-wordcloud"}))).attr("opacity",(e=>e[n]!==t.datum().name?.3:1))},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call((e=>this.services.transitions.setupTransition({transition:e,name:"legend-mouseout-wordcloud"}))).attr("opacity",1)}}init(){const e=this.services.events;e.addEventListener(Fy.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(Fy.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:s}=a.wordCloud,{groupMapsTo:l}=a.data,{width:c,height:u}=Cx.getSVGElementSize(n,{useAttrs:!0});if(0===c||0===u)return;const d=rT().size([c,u]).words(r.map((function(e){const t=e[o];if("number"!=typeof e[o])throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[l]:e[l],text:e[s],size:t,value:t}}))).padding(5).rotate(0).fontSize((e=>i(e.size))).on("end",(function(r){const i=Cx.appendOrSelect(n,"g.words");i.attr("transform",`translate(${d.size()[0]/2}, ${d.size()[1]/2})`);const a=i.selectAll("text").data(r,(e=>`${e[l]}-${e.text}`));a.exit().attr("opacity",0).remove(),a.enter().append("text").attr("opacity",0).merge(a).style("font-size",(e=>`${e.size}px`)).text((function(e){return e.text})).attr("class",(e=>t.model.getColorClassName({classNameTypes:[Gy.FILL],dataGroupName:e[l],originalClassName:"word "+(e.size>32?"light":"")}))).style("fill",(e=>t.model.getFillColor(e[l],e.text,e))).attr("text-anchor","middle").transition().call((n=>t.services.transitions.setupTransition({transition:n,name:"wordcloud-text-update-enter",animate:e}))).attr("transform",(e=>`translate(${e.x}, ${e.y})`)).attr("opacity",1)}));d.start(),this.addEventListeners()}getFontSizeScale(e){const t=this.getOptions(),{fontSizeMapsTo:n}=t.wordCloud,r=e.map((e=>e[n])).filter((e=>e)),i=Cx.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=r.length>0,o=a?c(r):[1,1];return Js().domain(o).range(a?t.wordCloud.fontSizeRange(i,e):[4,4])}addEventListeners(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this,r=Hv((e=>{const t=n.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call((e=>n.services.transitions.setupTransition({transition:e,name:"wordcloud-word-mouse-highlight"})));null===e?t.attr("opacity",1):t.attr("opacity",(function(){return e===this?1:.3}))}),6);this.parent.selectAll("text.word").on("mouseover",(function(i,a){r(this),n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEOVER,{event:i,element:ht(this),datum:a}),n.services.events.dispatchEvent(Fy.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:e.tooltip.wordLabel,value:a.text},{label:e.tooltip.valueLabel,value:a.value},{label:e.tooltip.groupLabel,value:a[t],class:n.model.getColorClassName({classNameTypes:[Gy.TOOLTIP],dataGroupName:a[t]})}]})})).on("mousemove",(function(e,t){const r=ht(this);n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEMOVE,{element:r,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){n.services.events.dispatchEvent(Fy.WordCloud.WORD_CLICK,{event:e,element:ht(this),datum:t})})).on("mouseout",(function(e,t){const i=ht(this);r(null),n.services.events.dispatchEvent(Fy.WordCloud.WORD_MOUSEOUT,{event:e,element:i,datum:t}),n.services.events.dispatchEvent(Fy.Tooltip.HIDE,{hoveredElement:i})}))}}class aT extends Tx{constructor(){super(...arguments),this.type="geo",this.renderType=Vy.SVG}render(){const e=this.getComponentContainer({withinChartClip:!0}),{width:t,height:n}=Cx.getSVGElementSize(e,{useAttrs:!0});if(t<1||n<1)return;const r=this.getProjection(),i=d_(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},s={};Object.keys(a).forEach((e=>{"number"==typeof a[e].value?o[e]=a[e]:s[e]=a[e]}));const l=tC(i,Object.values(s)),c=function(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return QO(e,t)}))}:QO(e,t)}(i,{type:"GeometryCollection",geometries:Object.values(o)}),u=r.fitSize([t,n],c),d=function(e,t){let n,r,i=3,a=4.5;function o(e){return e&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),ji(e,n(r))),r.result()}return o.area=function(e){return ji(e,n(Aa)),Aa.result()},o.measure=function(e){return ji(e,n(mo)),mo.result()},o.bounds=function(e){return ji(e,n(Ra)),Ra.result()},o.centroid=function(e){return ji(e,n(ro)),ro.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,ga):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new _o(i)):new io(t=e),"function"!=typeof a&&r.pointRadius(a),o):t},o.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(r.pointRadius(+e),+e),o):a},o.digits=function(e){if(!arguments.length)return i;if(null==e)i=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);i=t}return null===t&&(r=new _o(i)),o},o.projection(e).digits(i).context(t)}().projection(u);Cx.appendOrSelect(e,"g.geo").selectAll("path").data(c.features).join("path").attr("d",d);const h=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),f=Cx.appendOrSelect(e,"defs");Cx.appendOrSelect(f,"pattern").attr("id",h).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Wu()([[0,0],[0,10]]));const p=Cx.appendOrSelect(e,"g.missing-data");Cx.appendOrSelect(p,"path").datum(l).attr("d",d).style("fill",`url(#${h})`)}getProjection(){let e=null;switch(d_(this.getOptions(),"thematic","projection")){case bb.geoEqualEarth:e=Lo(Go).scale(177.158);break;case bb.geoAlbers:e=Io().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7]);break;case bb.geoConicEqualArea:e=Io();break;case bb.geoConicEquidistant:e=Ro(zo).scale(131.154).center([0,13.9389]);break;case bb.geoEquirectangular:e=Lo(Bo).scale(152.63);break;case bb.geoMercator:e=$o();break;case bb.geoNaturalEarth1:e=Lo(Wo).scale(175.295);break;default:throw new Error("Projection is not supported.")}return e}}class oT extends aT{constructor(){super(...arguments),this.type="choropleth"}render(e=!0){super.render();const t=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",(e=>this.model.getColorClassName({value:t[e.properties.NAME].value,originalClassName:"border"}))),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const e=this,t=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEOVER,{event:n,element:i,datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.SHOW,{event:n,hoveredElement:i,items:[{label:r.properties.NAME,value:t[r.properties.NAME].value}]})})).on("mousemove",(function(n,r){e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEMOVE,{event:n,element:ht(this),datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.MOVE,{event:n})})).on("click",(function(n,r){e.services.events.dispatchEvent(jy.CHOROPLETH_CLICK,{event:n,element:ht(this),datum:t[r.properties.NAME]})})).on("mouseout",(function(n,r){const i=ht(this);e.services.events.dispatchEvent(jy.CHOROPLETH_MOUSEOUT,{event:n,element:i,datum:t[r.properties.NAME]}),e.services.events.dispatchEvent(Ny.HIDE,{event:n,hoveredElement:i})}))}}class sT extends $E{constructor(e){super(e),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(e){super.setData(e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()}setOptions(e){const t=this.getOptions(),n=sy({},e,this.getZoomOptions(e));u_(t,n);const r=this.getHierarchyLevel(),i=d_(t,"circlePack","hierarchyLevel");this.set({options:sy(t,n),depth:i&&i<4?i:r})}getZoomOptions(e){if(!this.getDisplayData())return{};const t=this.getDisplayData(),n=e||this.getOptions(),r=1===t.length&&d_(t,0,"children")?d_(t,0,"children"):t;let i=this.getHierarchyLevel();return r.some((e=>{if(e.children&&e.children.some((e=>e.children)))return i=3,!1})),!0===d_(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:mb.ZOOM,name:"Click to zoom"}]}}:null}setZoom(e){this.setOptions(this.getZoomOptions(e))}updateHierarchyLevel(e){this.set({depth:e})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const e=this.getData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=e.map((e=>{const t=e[n];return this.setChildrenDataGroup(e,t)}));this.set({data:r},{skipUpdate:!0})}setChildrenDataGroup(e,t){return e.children?{...e,dataGroupName:t,children:e.children.map((e=>this.setChildrenDataGroup(e,t)))}:{...e,dataGroupName:t}}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Parent","Value"]];return e.forEach((e=>{let n=e.value?e.value:0;e.children&&(n+=this.getChildrenDatums(e.children,e.name,t,0)),t.push(["–",e.name,n])})),t}getChildrenDatums(e,t,n=[],r=0){const i=t;return e.forEach((e=>{const t=e.name;let a=0;if(e.children)e.children.length>0&&("number"==typeof e.value&&(r+=e.value),a+=this.getChildrenDatums(e.children,t,n,a),n.push([t,i,a]),r+=a);else{let t=0;"number"==typeof e.value&&(t=e.value,r+=e.value),n.push([e.name,i,t])}})),r}}const lT={[hb.LINE]:[IO,$O],[hb.SCATTER]:[$O],[hb.AREA]:[NO,IO,$O],[hb.STACKED_AREA]:[TC,IO,MC,iC],[hb.SIMPLE_BAR]:[OC],[hb.GROUPED_BAR]:[mC,HO],[hb.STACKED_BAR]:[AC,iC]};class cT extends $E{constructor(e){super(e)}getTabularData(e){const t=super.getTabularData(e);return e!==t&&t.forEach((e=>{e.key&&e.key!==e.group&&(e.group=e.key)})),t}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data;return[["Group","Value"],...e.map((e=>[e[n],null===e.value?"–":e.value.toLocaleString()]))]}sanitize(e){return this.getTabularData(e).sort(((e,t)=>t.value-e.value))}}class uT extends jS{constructor(e,t,n=!1){super(e,t),this.model=new cT(this.services),!n&&(this.model.setOptions(a_(TE.pieChart,t.options)),this.init(e,t))}getComponents(){const e=[new uC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.PIE})];return this.getChartComponents(e)}}class dT extends $E{constructor(e){super(e)}getDataGroups(){return super.getDataGroups().filter((e=>"delta"!==e.name))}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data;return[["Group","Value"],...e.map((e=>[e[n],null===e.value?"–":e.value.toLocaleString()]))]}}class hT extends FS{constructor(e){super(e),this.axisFlavor=yb.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const t=d_(this.getOptions(),"axes");if(d_(t,"left","scaleType")&&d_(t,"left","scaleType")!==Ky.LABELS||d_(t,"right","scaleType")&&d_(t,"right","scaleType")!==Ky.LABELS||d_(t,"top","scaleType")&&d_(t,"top","scaleType")!==Ky.LABELS||d_(t,"bottom","scaleType")&&d_(t,"bottom","scaleType")!==Ky.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const e=c(this.getDisplayData(),(e=>e.value)),t=Js().domain(e).nice().domain();if(t[0]>0)t[0]=0;else if(0===t[0]&&0===t[1])return[0,1];return t[0]<0&&t[1]>0&&(Math.abs(t[0])>t[1]?t[1]=Math.abs(t[0]):t[0]=-t[1]),t}getFillColor(e){return this._colorScale(e)}getUniqueDomain(){if(iy(this._domains)){const e=this.getDisplayData(),{cartesianScales:t}=this.services,n=t.getDomainIdentifier(),r=t.getMainXAxisPosition(),i=t.getCustomDomainValuesByposition(r);if(i)return i;this._domains=Array.from(new Set(e.map((e=>e[n]))))}return this._domains}getUniqueRanges(){if(iy(this._ranges)){const e=this.getDisplayData(),{cartesianScales:t}=this.services,n=t.getRangeIdentifier(),r=t.getMainYAxisPosition(),i=t.getCustomDomainValuesByposition(r);if(i)return i;this._ranges=Array.from(new Set(e.map((e=>e[n]))))}return this._ranges}getMatrix(){if(iy(this._matrix)){const e=this.getUniqueDomain(),t=this.getUniqueRanges(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i={};t.forEach((e=>{i[e]={value:null,index:-1}})),e.forEach((e=>{this._matrix[e]=qg(i)})),this.getDisplayData().forEach(((e,t)=>{this._matrix[e[n]][e[r]]={value:e.value,index:t}}))}return this._matrix}setData(e){const t=this.sanitize(qg(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),this._domains=[],this._ranges=[],this._matrix={},t}getMatrixAsArray(){iy(this._matrix)&&this.getMatrix();const e=this.getUniqueDomain(),t=this.getUniqueRanges(),n=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),i=[];return e.forEach((e=>{t.forEach((t=>{const a={value:this._matrix[e][t].value,index:this._matrix[e][t].index};a[n]=e,a[r]=t,i.push(a)}))})),i}getTabularDataArray(){const e=this.getDisplayData(),{primaryDomain:t,primaryRange:n}=this.assignRangeAndDomains();return[[t.label,n.label,"Value"],...e.map((e=>[null===e[t.identifier]?"–":e[t.identifier],null===e[n.identifier]?"–":e[n.identifier].toLocaleString(),e.value]))]}getColorClassName(e){return`${e.originalClassName} ${this._colorScale(e.value)}`}setColorClassNames(){const e=this.getOptions(),t=d_(e,"color","gradient","colors"),n=!iy(t);let r=d_(e,"color","pairing","option");const i=this.getValueDomain(),a=i[0]<0&&i[1]>0?"diverge":"mono";(r<1&&r>4&&"mono"===a||r<1&&r>2&&"diverge"===a)&&(r=1);const o=n?t:[];if(!n){const e="diverge"===a?17:11;for(let t=1;t<e+1;t++)o.push(`fill-${a}-${r}-${t}`)}this._colorScale=cl().domain(i).range(o);const s=d_(this.getOptions(),"color");this._colorScale=YO(this.getDisplayData(),s)}}class fT extends FS{getTabularDataArray(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getBinnedStackedData();return[[wp(e,"bins.rangeLabel")||"Range",...n.map((e=>wp(e,`0.${t}`)))],...wp(n,0).map(((e,r)=>[`${wp(e,"data.x0")} – ${wp(e,"data.x1")}`,...n.map((e=>wp(e[r],`data.${wp(e[r],t)}`)))]))]}}class pT extends $E{constructor(e){super(e)}getMaximumDomain(e){return e.reduce(((e,t)=>e+t.value),0)}getFillColor(e){const t=this.getOptions(),n=d_(t,"color","scale"),r=this.getStatus();return n||!r?super.getFillColor(e):null}getStatus(){const e=this.getOptions(),t=d_(this.getDisplayData()),n=(null==t?void 0:t.reduce(((e,t)=>e+t.value),0))??0,r=d_(e,"meter","proportional")?n:n>100?100:n,i=d_(e,"meter","status","ranges");if(i){const e=i.filter((e=>e.range[0]<=r&&r<=e.range[1]));if(e.length>0)return e[0].status}return null}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getStatus(),i=d_(t,"meter","proportional");let a,o=[];if(null===i){a=100;const t=e[0];o=[["Group","Value",...r?["Status"]:[]],[t[n],t.value,...r?[r]:[]]]}else{const t=d_(i,"total");a=t||this.getMaximumDomain(e),o=[["Group","Value","Percentage of total"],...e.map((e=>[e[n],e.value,(e.value/a*100).toFixed(2)+" %"]))]}return o}}class mT extends FS{constructor(e){super(e)}getTabularDataArray(){const e=this.getOptions(),t=this.getGroupedData(),{angle:n,value:r}=d_(e,"radar","axes"),i=d_(t,"0","data").map((e=>e[n]));return[["Group",...i],...t.map((e=>[e.name,...i.map(((t,n)=>null!==d_(e,"data",n,r)?d_(e,"data",n,r).toLocaleString():"–"))]))]}}class gT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Parent"]];return e.forEach((e=>{this.getChildrenDatums(e,t),t.push([e.name,"–"])})),t}getChildrenDatums(e,t=[]){e.children&&e.children.length>0&&e.children.forEach((n=>{this.getChildrenDatums(n,t),t.push([n.name,e.name])}))}}class vT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=[["Child","Group","Value"]];return e.forEach((e=>{Array.isArray(e.children)?e.children.forEach((n=>{t.push([n.name,e.name,n.value])})):null!==d_(e.name)&&d_(e.value)&&t.push(["–",e.name,e.value])})),t}}class yT extends $E{constructor(e){super(e)}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{fontSizeMapsTo:n,wordMapsTo:r}=t.wordCloud,{groupMapsTo:i}=t.data;return[[t.tooltip.wordLabel,"Group",t.tooltip.valueLabel],...e.map((e=>[e[r],e[i],e[n]]))]}}t.Alignments=Qy,t.AlluvialChart=class extends jS{constructor(e,t){super(e,t),this.model=new VS(this.services),this.model.setOptions(a_(TE.alluvialChart,t.options)),this.init(e,t)}getComponents(){const e=[new EO(this.model,this.services)];return this.getChartComponents(e,{excludeLegend:!0})}},t.AreaChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(qg(TE.areaChart),t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new IO(this.model,this.services),new NO(this.model,this.services),new $O(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.AreaEvent=xy,t.ArrowDirections=cb,t.AxisEvent=Ey,t.AxisFlavor=yb,t.AxisPositions=Wy,t.AxisTitleOrientations=pb,t.BarEvent=Ty,t.BoxplotChart=class extends DO{constructor(e,t){super(e,t),this.model=new FO(this.services),this.model.setOptions(a_(TE.boxplotChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new VO(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e,{legend:{enabled:!1}})}},t.BoxplotEvent=Ay,t.BubbleChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.bubbleChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new GO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.BulletChart=class extends DO{constructor(e,t){super(e,t),this.model=new WO(this.services),this.model.setOptions(a_(TE.bulletChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new qO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.CalloutDirections=ib,t.CanvasZoomEvent=wy,t.CartesianOrientations=Yy,t.ChartEvent=my,t.ChartTheme=Hy,t.ChartTypes=hb,t.CirclePackChart=class extends jS{constructor(e,t){super(e,t),this.model=new sT(this.services),this.model.setOptions(a_(TE.circlePackChart,t.options)),this.init(e,t)}getComponents(){const e=[new lC(this.model,this.services)];return this.getChartComponents(e)}},t.ColorClassNameTypes=Gy,t.ColorLegendType=gb,t.ComboChart=class extends DO{constructor(e,t){super(e,t);const n=a_(TE.comboChart,t.options);t.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),n.comboChartTypes=[{type:hb.LINE,correspondingDatasets:[]}]),this.model.setOptions(n),this.init(e,t)}getGraphComponents(){const{comboChartTypes:e}=this.model.getOptions();let t=0;return Cp(e.map((e=>{const n=e.type;let r;if("string"==typeof e.type){if(!Object.keys(lT).includes(e.type))return console.error(`Invalid chart type "${e.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let n=!1;const i=`${Tm(e.type)}Chart`;return r=sy({},TE[i],this.model.getOptions(),e.options),e.type===hb.STACKED_AREA&&(n=!0),lT[e.type].map((i=>new i(this.model,this.services,{groups:e.correspondingDatasets,id:t++,options:r,stacked:n})))}return r=sy({},this.model.getOptions(),e.options),new n(this.model,this.services,{groups:e.correspondingDatasets,id:t++,options:r})})).filter((e=>null!==e)))}getComponents(){const{comboChartTypes:e}=this.model.getOptions(),t=e.some((e=>e.type===hb.STACKED_BAR||e.type===hb.STACKED_AREA)),n=[new UO(this.model,this.services),new RO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID}),...t?[]:[new PO(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(n)}},t.DividerStatus=vb,t.DominantBaseline=sb,t.DonutChart=class extends uT{constructor(e,t){super(e,t,!0),this.model.setOptions(a_(TE.donutChart,t.options)),this.init(e,t)}getComponents(){const e=[new dC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.DONUT})];return this.getChartComponents(e)}},t.ExperimentalChoroplethChart=class extends jS{constructor(e,t){super(e,t),this.model=new KO(this.services),this.model.setOptions(a_(TE.choroplethChart,t.options)),this.init(e,t)}getChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled"),i=!!this.model.getOptions().title,a={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},o={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},s={id:"header",components:[new Lx(this.model,this.services,[a,...r?[o]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},l={id:"legend",components:[new aC(this.model,this.services,{chartType:"choropleth"})],growth:nb.PREFERRED,renderType:Vy.SVG},c={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},u=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,d=tb.COLUMN_REVERSE,h={id:"spacer",components:[new Dx(this.model,this.services,{size:15})],growth:nb.PREFERRED},f={id:"full-frame",components:[new Lx(this.model,this.services,[...u?[l]:[],...u?[h]:[],c],{direction:d})],growth:nb.STRETCH},p=[];if(i||r){p.push(s);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};p.push(e)}return p.push(f),[new IS(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,p,{direction:tb.COLUMN})]}getComponents(){const e=[new oT(this.model,this.services)];return this.getChartComponents(e)}},t.GaugeChart=class extends jS{constructor(e,t){super(e,t),this.model=new dT(this.services),this.model.setOptions(a_(TE.gaugeChart,t.options)),this.init(e,t)}getComponents(){const e=[new pC(this.model,this.services)];return this.getChartComponents(e)}},t.GaugeEvent=Cy,t.GaugeTypes=lb,t.GroupedBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.groupedBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new mC(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e)}},t.HeatmapChart=class extends DO{constructor(e,t){super(e,t),this.model=new hT(this.services),this.model.setOptions(a_(TE.heatmapChart,t.options)),this.init(e,t)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=d_(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const i=!!this.model.getOptions().title,a={id:"title",components:[new OS(this.model,this.services)],growth:nb.STRETCH},o={id:"toolbar",components:[new Mx(this.model,this.services)],growth:nb.PREFERRED},s={id:"header",components:[new Lx(this.model,this.services,[a,...r?[o]:[]],{direction:tb.ROW,alignItems:rb.CENTER})],growth:nb.PREFERRED},l={id:"legend",components:[new aC(this.model,this.services,{chartType:"heatmap"})],growth:nb.PREFERRED,renderType:Vy.SVG},c={id:"graph-frame",components:e,growth:nb.STRETCH,renderType:Vy.SVG},u=!1!==d_(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,d=tb.COLUMN_REVERSE,h={id:"spacer",components:[new Dx(this.model,this.services,{size:15})],growth:nb.PREFERRED},f={id:"full-frame",components:[new Lx(this.model,this.services,[...u?[l]:[],...u?[h]:[],c],{direction:d})],growth:nb.STRETCH},p=[];if(i||r){p.push(s);const e={id:"spacer",components:[new Dx(this.model,this.services,r?{size:15}:void 0)],growth:nb.PREFERRED};p.push(e)}return p.push(f),[new AO(this.model,this.services),new SS(this.model,this.services),new Lx(this.model,this.services,p,{direction:tb.COLUMN})]}getComponents(){const e=[new UO(this.model,this.services),new gC(this.model,this.services)];return this.getAxisChartComponents(e)}},t.HistogramChart=class extends DO{constructor(e,t){super(e,t),this.model=new fT(this.services),this.model.setOptions(a_(TE.histogramChart,t.options)),this.init(e,t),this.update()}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new rC(this.model,this.services),new vC(this.model,this.services)];return this.getAxisChartComponents(e)}},t.LayoutAlignItems=rb,t.LayoutDirection=tb,t.LayoutGrowth=nb,t.LegendItemType=mb,t.LegendOrientations=Jy,t.LegendPositions=Xy,t.LineChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new IO(this.model,this.services),new $O(this.model,this.services,{handleThresholds:!0}),new CC(this.model,this.services),new HO(this.model,this.services)];return this.getAxisChartComponents(e)}},t.LineEvent=ky,t.LollipopChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.lollipopChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new yC(this.model,this.services),new $O(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.MeterChart=class extends jS{constructor(e,t){var n;super(e,t),this.model=new pT(this.services);const r=null!=(n=t.options.meter)&&n.proportional?sy(qg(TE.proportionalMeterChart),t.options):sy(qg(TE.meterChart),t.options);this.model.setOptions(r),this.init(e,t)}getComponents(){const e=[...d_(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new oC(this.model,this.services)],growth:nb.STRETCH,renderType:Vy.SVG},{id:"spacer",components:[new Dx(this.model,this.services,{size:8})],growth:nb.STRETCH}]:[],{id:"meter-graph",components:[new bC(this.model,this.services)],growth:nb.STRETCH,renderType:Vy.SVG}],t=[new Lx(this.model,this.services,e,{direction:tb.COLUMN})];return this.getChartComponents(t,{graphFrameRenderType:Vy.HTML})}},t.ModalEvent=gy,t.ModelEvent=vy,t.PieChart=uT,t.PieEvent=Oy,t.Projection=bb,t.RadarChart=class extends jS{constructor(e,t){super(e,t),this.model=new mT(this.services),this.model.setOptions(a_(TE.radarChart,t.options)),this.init(e,t)}getComponents(){const e=[new SC(this.model,this.services)];return this.getChartComponents(e)}},t.RadarEvent=Ly,t.RenderTypes=Vy,t.ScaleTypes=Ky,t.ScatterChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.scatterChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new PO(this.model,this.services),new $O(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.ScatterEvent=My,t.SimpleBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.simpleBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new OC(this.model,this.services),new HO(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ})];return this.getAxisChartComponents(e)}},t.Skeletons=ab,t.StackedAreaChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.stackedAreaChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new iC(this.model,this.services),new TC(this.model,this.services),new IO(this.model,this.services,{stacked:!0}),new MC(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new jO(this.model,this.services,{skeleton:ab.GRID})];return this.getAxisChartComponents(e)}},t.StackedBarChart=class extends DO{constructor(e,t){super(e,t),this.model.setOptions(a_(TE.stackedBarChart,t.options)),this.init(e,t)}getComponents(){const e=[new UO(this.model,this.services),new RO(this.model,this.services),new iC(this.model,this.services),new AC(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.VERT_OR_HORIZ}),new HO(this.model,this.services)];return this.getAxisChartComponents(e)}},t.Statuses=ub,t.TextAnchor=ob,t.ThresholdEvent=Iy,t.TickRotations=db,t.ToolbarControlTypes=fb,t.TooltipEvent=Ny,t.TreeChart=class extends jS{constructor(e,t){super(e,t),this.model=new gT(this.services),this.model.setOptions(a_(TE.treeChart,t.options)),this.init(e,t)}getComponents(){const e=[new kC(this.model,this.services)];return this.getChartComponents(e,{excludeLegend:!0})}},t.TreeEvent=Dy,t.TreeTypes=eb,t.TreemapChart=class extends jS{constructor(e,t){super(e,t),this.model=new vT(this.services),this.model.setOptions(a_(TE.treemapChart,t.options)),this.init(e,t)}getComponents(){const e=[new NC(this.model,this.services)];return this.getChartComponents(e)}},t.TreemapEvent=Ry,t.TruncationTypes=Zy,t.WordCloudChart=class extends jS{constructor(e,t){super(e,t),this.model=new yT(this.services),this.model.setOptions(a_(TE.wordCloudChart,t.options)),this.init(e,t)}getComponents(){const e=[new iT(this.model,this.services),new jO(this.model,this.services,{skeleton:ab.PIE})];return this.getChartComponents(e)}},t.WordCloudEvent=Sy,t.ZoomBarTypes=qy,t.ZoomDomainEvent=_y,t.ZoombarEvent=by,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(t)},5508:(e,t,n)=>{"use strict";n.d(t,{iA:()=>s});var r,i=n(7900),a=n.n(i),o=n(9703);const s=a().forwardRef((function(e,t){let{children:n,size:i=16,...s}=e;return a().createElement(o.I,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...s},r||(r=a().createElement("path",{d:"M29,5a2,2,0,0,0-2-2H5A2,2,0,0,0,3,5V27a2,2,0,0,0,2,2H27a2,2,0,0,0,2-2ZM27,5V9H5V5Zm0,22H5V23H27Zm0-6H5V17H27Zm0-6H5V11H27Z"})),n)}))},2074:(e,t,n)=>{"use strict";n.d(t,{BV:()=>M,XZ:()=>A,_M:()=>L,_Q:()=>R,eA:()=>T,kF:()=>k,s$:()=>D});var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,_,w,E,x,S=n(7900),O=n.n(S),C=n(9703);const T=O().forwardRef((function(e,t){let{children:n,size:i=16,...a}=e;return O().createElement(C.I,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},r||(r=O().createElement("path",{d:"M13,15c1.4854,0,2.5544,1.4966,3.6863,3.0811C17.9983,19.918,19.4854,22,22,22c5.6709,0,7.78-10.79,8-12l-1.9678-.3584C27.55,12.2827,25.3938,20,22,20c-1.4854,0-2.5544-1.4966-3.6863-3.0811C17.0017,15.082,15.5146,13,13,13c-4.186,0-7.4448,7.4043-9,11.7617V2H2V28a2.0025,2.0025,0,0,0,2,2H30V28H5.0439C6.5544,22.8574,9.9634,15,13,15Z"})),n)})),A=O().forwardRef((function(e,t){let{children:n,size:r=16,...a}=e;return O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},i||(i=O().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),n)})),M=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},a||(a=O().createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),o||(o=O().createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),n)})),k=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},s||(s=O().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),l||(l=O().createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=O().createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),u||(u=O().createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},d||(d=O().createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),h||(h=O().createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=O().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),p||(p=O().createElement("path",{fill:"none",d:"M14 21.591L9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),n)})),L=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...i},m||(m=O().createElement("path",{d:"M5 6L0 1 0.7 0.3 5 4.6 9.3 0.3 10 1z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},g||(g=O().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},v||(v=O().createElement("path",{d:"M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),n)})),D=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},y||(y=O().createElement("path",{d:"M0 5L5 0 5.7 0.7 1.4 5 5.7 9.3 5 10z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},b||(b=O().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},_||(_=O().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),R=O().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},w||(w=O().createElement("path",{d:"M6 5L1 10 0.3 9.3 4.6 5 0.3 0.7 1 0z"})),n):16===r||"16"===r||"16px"===r?O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},E||(E=O().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):O().createElement(C.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},x||(x=O().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)}))},9703:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{I:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(3980),d=n.n(u),h=n(7900),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:a,...u}=e;const{tabindex:d,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,a=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=o(e,s),d=u.tabindex,h=o(u,l),f=i(i(i({},c),h),{},{width:t,height:n,viewBox:a});return f["aria-label"]||f["aria-labelledby"]||f.title?(f.role="img",null!=d&&(f.focusable="true",f.tabindex=d)):f["aria-hidden"]=!0,f}({...u,tabindex:a});return n&&(h.className=n),null!=d&&(h.tabIndex=d),t&&(h.ref=t),f().createElement("svg",h,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().string,"aria-label":d().string,"aria-labelledby":d().string,children:d().node,className:d().string,height:d().oneOfType([d().number,d().string]),preserveAspectRatio:d().string,tabIndex:d().string,viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string},p.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"},d().oneOfType([d().number,d().string])},9449:(e,t,n)=>{"use strict";n.d(t,{UQy:()=>O,Qdk:()=>X,zxk:()=>de,wQF:()=>Er,gqd:()=>pe,hU:()=>ce,lSo:()=>Ot,mh4:()=>xt,rUS:()=>me,tlE:()=>Kr,OK9:()=>$e,tdY:()=>Ie,iA_:()=>Ut,RMI:()=>Zt,pj1:()=>Yt,xJi:()=>Kt,ssF:()=>tn,xDH:()=>on,SCH:()=>cn,mQc:()=>Ne,n9L:()=>pt});var r={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?r.enableCssCustomProperties=!0:r.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?r.enableUseControlledStateWithValue=!0:r.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?r.enableCssGrid=!0:r.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?r.enableV11Release=!0:r.enableV11Release=!1:r.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?r.enableExperimentalTileContrast=!0:r.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?r.enableV12TileDefaultIcons=!0:r.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1}catch(e){r.enableCssCustomProperties=!1,r.enableUseControlledStateWithValue=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12Overflowmenu=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:r.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:r.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:r.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:r.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:r.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu}];function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i)),r)}var i}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=o(t.value,2),i=r[0],a=r[1];this.flags.has(i)||this.flags.set(i,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=new c(void 0),d=0;d<i.length;d++){var h=i[d];u.add(h.name,h.enabled)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}!function(){u.merge.apply(u,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1});var m=n(2779),g=n.n(m),v=n(7900),y=n.n(v);const b=y().createContext("cds");function _(){return y().useContext(b)}var w=n(3980),E=n.n(w);const x=(0,v.createContext)({disabled:!1}),S=e=>{let{disabled:t,children:n}=e;return y().createElement(x.Provider,{value:{disabled:t}},n)};function O(e){let{align:t="end",children:n,className:r,disabled:i=!1,isFlush:a=!1,size:o,...s}=e;const l=_(),c=g()(`${l}--accordion`,r,{[`${l}--accordion--${t}`]:t,[`${l}--accordion--${o}`]:o,[`${l}--layout--size-${o}`]:o,[`${l}--accordion--flush`]:a&&"start"!==t});return y().createElement(S,{disabled:i},y().createElement("ul",p({className:c},s),n))}O.propTypes={align:E().oneOf(["start","end"]),children:E().node,className:E().string,disabled:E().bool,isFlush:E().bool,size:E().oneOf(["sm","md","lg"])};var C=n(2074);function T(){let e=0;return function(){return++e}}const A=!("undefined"==typeof window||!window.document||!window.document.createElement),M=y().createContext(null),k=T(),L=A?v.useLayoutEffect:v.useEffect;let D=!1;function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=y().useContext(M),[n,r]=(0,v.useState)((()=>D?`${t?`${t}-`:""}${e}-${k()}`:null));if(L((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${k()}`)}),[k]),(0,v.useEffect)((()=>{!1===D&&(D=!0)}),[]),"function"==typeof y().useId){const n=function(e,t){return`${e?`${e}-`:""}${t}-${y().useId()}`}(t,e);return n}return n}const N={};function I(e,t){return function(t,n,r){if(void 0!==t[n]){N[r]&&N[r][n]||(N[r]={...N[r],[n]:!0});for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return e(t,n,r,...a)}}}const P=(0,v.createContext)(null);function $(e){let{as:t,children:n,dir:r,...i}=e;const a=(0,v.useContext)(P),o={},s=t??"span",l={...a};if(a){const{direction:e,getTextDirection:t}=a;if(t&&t.current){const r=function(e){if("string"==typeof e)return e;const t=y().Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t}(n),i=t.current(r);e!==i?(o.dir=i,l.direction=i):"auto"===e&&(o.dir=i)}else e!==r?(o.dir=r,l.direction=r):"auto"===e&&(o.dir=r)}else o.dir=r,l.direction=r;return y().createElement(P.Provider,{value:l},y().createElement(s,p({},i,o),n))}function B(e,t){for(let n=0;n<t.length;n++)if(z(e,t[n]))return!0;return!1}function z(e){let{key:t,which:n,keyCode:r,code:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?-1!==t.indexOf(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i}$.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node.isRequired,dir:E().oneOf(["ltr","rtl","auto"])};const U={key:"Enter",which:13,keyCode:13,code:"Enter"},j={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},F={key:" ",which:32,keyCode:32,code:"Space"},V={key:"End",which:35,keyCode:35,code:"Numpad1"},H={key:"Home",which:36,keyCode:36,code:"Numpad7"},G={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},W={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},q={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},Z={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},Y={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},K=e=>y().createElement("button",p({type:"button"},e));function X(e){let{children:t,className:n="",open:r=!1,onHeadingClick:i,renderExpando:a=K,renderToggle:o,title:s="title",disabled:l,handleAnimationEnd:c,...u}=e;const[d,h]=(0,v.useState)(r),[f,m]=(0,v.useState)(r),[b,w]=(0,v.useState)(""),E=(0,v.useContext)(x),S="boolean"==typeof l?l:E.disabled,O=R("accordion-item"),T=_(),A=g()({[`${T}--accordion__item`]:!0,[`${T}--accordion__item--active`]:d,[`${T}--accordion__item--${b}`]:b,[`${T}--accordion__item--disabled`]:S,[n]:!!n}),M=o||a;return r!==f&&(w(d?"collapsing":"expanding"),h(r),m(r)),y().createElement("li",p({className:A},u,{onAnimationEnd:function(e){c&&c(e),w("")}}),y().createElement(M,{disabled:S,"aria-controls":O,"aria-expanded":d,className:`${T}--accordion__heading`,onClick:function(e){const t=!d;w(d?"collapsing":"expanding"),h(t),i&&i({isOpen:t,event:e})},onKeyDown:function(e){d&&z(e,j)&&h(!1)},type:"button"},y().createElement(C._Q,{className:`${T}--accordion__arrow`}),y().createElement($,{as:"div",className:`${T}--accordion__title`},s)),y().createElement("div",{id:O,className:`${T}--accordion__content`},t))}X.propTypes={children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onHeadingClick:E().func,open:E().bool,renderExpando:I(E().func),renderToggle:E().func,title:E().node};var Q="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;const J=e=>(0,v.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e);function ee(e,t,n){const r=(0,v.useRef)(null);(0,v.useEffect)((()=>{r.current=n}),[n]),(0,v.useEffect)((()=>{const n=e=>{r.current&&r.current(e)},i="current"in e?e.current:e;return i?.addEventListener?.(t,n),()=>{i?.removeEventListener?.(t,n)}}),[e,t])}function te(e,t){const n=(0,v.useRef)(null);(0,v.useEffect)((()=>{n.current=t}),[t]),(0,v.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}const ne=y().createContext({floating:{current:null}}),re=y().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-left":"bottom"),as:i="span",autoAlign:a=!1,caret:o=!n,className:s,children:l,dropShadow:c=!0,highContrast:u=!1,onRequestClose:d,open:h,...f}=e;const m=_(),b=(0,v.useRef)(null),w=(0,v.useRef)(null);te("blur",(()=>{h&&d?.()})),te("click",(e=>{h&&!w?.current?.contains(e.target)&&d?.()}));const E=(0,v.useMemo)((()=>({floating:b})),[]);n&&(["bottom-left","bottom-right"].includes(r)||(r="bottom-left"));const x=J([t,w]),[S,O]=(0,v.useState)(!1),[C,T]=(0,v.useState)(r),A=g()({[`${m}--popover-container`]:!0,[`${m}--popover--caret`]:o,[`${m}--popover--drop-shadow`]:c,[`${m}--popover--high-contrast`]:u,[`${m}--popover--open`]:h,[`${m}--popover--${C}`]:S&&!n,[`${m}--popover--${r}`]:!S,[`${m}--popover--tab-tip`]:n},s);Q((()=>{if(!h)return;if(!a||n)return void O(!1);if(!b.current)return;if(!0===S)return;const e=b.current.getBoundingClientRect(),t=e.x<-16,i=e.y<-16,o=e.x+(e.width-16)>document.documentElement.clientWidth,s=e.y+(e.height-16)>document.documentElement.clientHeight;if(!(t||i||o||s))return void O(!1);const l=["top","top-left","right-bottom","right","right-top","bottom-left","bottom","bottom-right","left-top","left","left-bottom","top-right"],c=[r];let u=l[(l.indexOf(r)+1)%l.length];for(;u&&!c.includes(u);)c.push(u),u=l[(l.indexOf(u)+1)%l.length];function d(e){if(!w.current||!b.current)return!1;w.current.classList.add(`${m}--popover--${e}`);const t=b.current.getBoundingClientRect();return t.x<-16||t.y<-16||t.x+(t.width-16)>document.documentElement.clientWidth||t.y+(t.height-16)>document.documentElement.clientHeight?(w.current.classList.remove(`${m}--popover--${e}`),!1):(w.current.classList.remove(`${m}--popover--${e}`),!0)}let f=null;for(let e=0;e<c.length;e++){const t=c[e];if(d(t)){f=t;break}}f&&(O(!0),T(f))}),[S,r,a,m,h,n]);const M=y().Children.map(l,(e=>{const t=e;if("button"===t?.type){const{className:e}=t.props,n=g()(`${m}--popover--tab-tip__button`,e);return y().cloneElement(t,{className:n})}return t})),k=i;return y().createElement(ne.Provider,{value:E},y().createElement(k,p({},f,{className:A,ref:x}),n?M:l))}));function ie(e,t){let{className:n,children:r,...i}=e;const a=_(),{floating:o}=y().useContext(ne),s=J([o,t]);return y().createElement("span",p({},i,{className:`${a}--popover`}),y().createElement("span",{className:g()(`${a}--popover-content`,n),ref:s},r),y().createElement("span",{className:`${a}--popover-caret`}))}re.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),as:E().oneOfType([E().string,E().elementType]),autoAlign:E().bool,caret:E().bool,children:E().node,className:E().string,dropShadow:E().bool,highContrast:E().bool,isTabTip:E().bool,onRequestClose:E().func,open:E().bool.isRequired};const ae=y().forwardRef(ie);function oe(e){if(!e||!e.childNodes)return null;if(function(e){if(e.tabIndex<0)return!1;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}(e))return e;for(const t of e.childNodes){const e=oe(t);if(e)return e}return null}function se(e){if(!e||!e.childNodes)return null;if(e?.getAttribute?.("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes){const e=se(t);if(e)return e}return null}function le(e){let{align:t="top",className:n,children:r,label:i,description:a,enterDelayMs:o=100,leaveDelayMs:s=300,defaultOpen:l=!1,closeOnActivation:c=!1,...u}=e;const d=(0,v.useRef)(null),h=(0,v.useRef)(null),[f,m]=function(e){const[t,n]=(0,v.useState)(e),r=(0,v.useRef)(null),i=(0,v.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout((()=>{n(e),r.current=null}),t):n(e)}),[]);return(0,v.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(l),b=R("tooltip"),w=_(),E=y().Children.only(r),x={onFocus:()=>m(!0),onBlur:()=>m(!1),onClick:()=>c&&m(!1),onMouseEnter:function(){m(!0,o)}};return i?x["aria-labelledby"]=b:x["aria-describedby"]=b,(0,v.useEffect)((()=>{null!==d&&d.current&&(oe(d.current)||m(!1))})),y().createElement(re,p({},u,{align:t,className:g()(`${w}--tooltip`,n),dropShadow:!1,highContrast:!0,onKeyDown:function(e){f&&z(e,j)&&(e.stopPropagation(),m(!1)),f&&c&&(z(e,U)||z(e,F))&&m(!1)},onMouseLeave:function(){m(!1,s)},open:f,ref:d}),y().createElement("div",{className:`${w}--tooltip-trigger__wrapper`},void 0!==E?y().cloneElement(E,{...x,...function(e){const t={};return["onFocus","onBlur","onClick","onMouseEnter"].forEach((n=>{t[n]=t=>{x[n](),e?.[n]&&e?.[n](t)}})),t}(E.props)}):null),y().createElement(ae,{"aria-hidden":f?"false":"true",className:`${w}--tooltip-content`,id:b,ref:h,role:"tooltip"},i||a))}ae.propTypes={children:E().node,className:E().string},le.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,description:E().node,enterDelayMs:E().number,label:E().node,leaveDelayMs:E().number};const ce=y().forwardRef((function(e,t){const{align:n,children:r,className:i,closeOnActivation:a=!0,defaultOpen:o=!1,disabled:s,enterDelayMs:l=100,kind:c,label:u,leaveDelayMs:d=100,wrapperClasses:h,size:f,isSelected:m,...v}=e,b=_(),w=g()(h,`${b}--icon-tooltip`,{[`${b}--icon-tooltip--disabled`]:s});return y().createElement(le,{align:n,closeOnActivation:a,className:w,defaultOpen:o,enterDelayMs:l,label:u,leaveDelayMs:d},y().createElement(de,p({},v,{disabled:s,kind:c,ref:t,size:f,className:g()(`${b}--btn--icon-only`,{[`${b}--btn--selected`]:m},i)}),r))}));ce.propTypes={align:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:E().node,className:E().string,closeOnActivation:E().bool,defaultOpen:E().bool,disabled:E().bool,enterDelayMs:E().number,isSelected:E().bool,kind:E().oneOf(["primary","secondary","ghost","tertiary"]),label:E().node.isRequired,leaveDelayMs:E().number,size:E().oneOf(["sm","md","lg"]),wrapperClasses:E().string};const ue=e=>function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n=0;n<e.length&&!t.defaultPrevented;n++){const i=e[n];"function"==typeof i&&i(t,...r)}},de=y().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:a="danger",disabled:o=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:m,onFocus:b,onMouseEnter:w,onMouseLeave:E,renderIcon:x,size:S,tabIndex:O,tooltipAlignment:C="center",tooltipPosition:T="top",type:A="button",...M}=e;const k=(0,v.useRef)(null),L=_(),D=e=>{e.target!==k.current||e.preventDefault()},N={tabIndex:O,className:g()(i,{[`${L}--btn`]:!0,[`${L}--btn--sm`]:"sm"===S&&!u,[`${L}--btn--md`]:"md"===S&&!u,[`${L}--btn--xl`]:"xl"===S,[`${L}--btn--2xl`]:"2xl"===S,[`${L}--layout--size-${S}`]:S,[`${L}--btn--${h}`]:h,[`${L}--btn--disabled`]:o,[`${L}--btn--expressive`]:u,[`${L}--btn--icon-only`]:s,[`${L}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},I=x?y().createElement(x,{"aria-label":c,className:`${L}--btn__icon`,"aria-hidden":"true"}):null,P=x?y().createElement(x,null):null,$=["danger","danger--tertiary","danger--ghost"];let B="button";const z=R("danger-description"),{"aria-pressed":U}=M;let j={disabled:o,type:A,"aria-describedby":$.includes(h)?z:void 0,"aria-pressed":U??(s&&"ghost"===h?d:void 0)};const F={href:l};let V=null;if($.includes(h)&&(V=y().createElement("span",{id:z,className:`${L}--visually-hidden`},a)),n?(B=n,j={...j,...F}):l&&!o&&(B="a",j=F),s){let e;return"top"!==T&&"bottom"!==T||("center"===C&&(e=T),"end"===C&&(e=`${T}-right`),"start"===C&&(e=`${T}-left`)),"right"!==T&&"left"!==T||(e=T),y().createElement(ce,p({as:n,align:e,label:c,kind:h,size:S,onMouseEnter:w,onMouseLeave:E,onFocus:b,onBlur:f,onClick:ue([m,D])},M,N,j),P||r)}return y().createElement(B,{onMouseEnter:w,onMouseLeave:E,onFocus:b,onBlur:f,onClick:m,...M,...N,...j},V,r,I)}));var he,fe;de.displayName="Button",de.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,dangerDescription:E().string,disabled:E().bool,hasIconOnly:E().bool,href:E().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:E().bool,isSelected:E().bool,kind:E().oneOf(["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"]),onBlur:E().func,onClick:E().func,onFocus:E().func,onMouseEnter:E().func,onMouseLeave:E().func,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:E().number,tooltipAlignment:E().oneOf(["start","center","end"]),tooltipPosition:E().oneOf(["top","right","bottom","left"]),type:E().oneOf(["button","reset","submit"])};const pe=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:a=!1,className:o,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=_(),d=g()(o,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:a}),h=n,f=Array(h),m=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=y().createElement("tr",{key:e},m.map((e=>y().createElement("td",{key:e},he||(he=y().createElement("span",null))))));return y().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?y().createElement("div",{className:`${u}--data-table-header`},y().createElement("div",{className:`${u}--data-table-header__title`}),y().createElement("div",{className:`${u}--data-table-header__description`})):null,l?y().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},y().createElement("div",{className:`${u}--toolbar-content`},y().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,y().createElement("table",p({className:d},c),y().createElement("thead",null,y().createElement("tr",null,m.map((e=>y().createElement("th",{key:e},t?y().createElement("div",{className:"bx--table-header-label"},t[e]?.header):fe||(fe=y().createElement("span",null))))))),y().createElement("tbody",null,f)))};pe.propTypes={className:E().string,columnCount:E().number,compact:E().bool,headers:E().arrayOf(E().shape({header:E().node.isRequired}).isRequired),rowCount:E().number,showHeader:E().bool,showToolbar:E().bool,zebra:E().bool};const me=y().forwardRef((function(e,t){let{children:n,className:r,href:i,disabled:a=!1,inline:o=!1,visited:s=!1,renderIcon:l,size:c,target:u,...d}=e;const h=_(),f={className:g()(`${h}--link`,r,{[`${h}--link--disabled`]:a,[`${h}--link--inline`]:o,[`${h}--link--visited`]:s,[`${h}--link--${c}`]:c}),rel:"_blank"===u?"noopener":void 0,target:u};return a?(f.role="link",f["aria-disabled"]=!0):f.href=i,y().createElement("a",p({ref:t},f,d),n,!o&&l&&y().createElement("div",{className:`${h}--link__icon`},y().createElement(l,null)))}));me.displayName="Link",me.propTypes={children:E().node,className:E().string,disabled:E().bool,href:E().string,inline:E().bool,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),visited:E().bool};var ge,ve=n(9703);const ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},ge||(ge=y().createElement("path",{d:"M17.4141 16L24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),n)}));var be=16;function _e(e){return"".concat(e/be,"rem")}_e(320),_e(672),_e(16);var we={width:_e(1056),columns:16,margin:_e(16)};_e(1312),_e(16),_e(1584),_e(24);function Ee(e){return _e(8*e)}Ee(.25),Ee(.5),Ee(1),Ee(1.5),Ee(2),Ee(3),Ee(4),Ee(5),Ee(6),Ee(8),Ee(10),Ee(12),Ee(20),Ee(2),Ee(3),Ee(4),Ee(6),Ee(8),Ee(12),Ee(20),Ee(3),Ee(4),Ee(5),Ee(6),Ee(8),_e(24),_e(32),_e(40),_e(48),_e(64),_e(80);var xe,Se,Oe=n(594),Ce=n.n(Oe),Te=n(9074);function Ae(e){const t=(0,v.useRef)(e),n=(0,v.useRef)(!1);(0,v.useEffect)((()=>{t.current=e})),(0,v.useEffect)((()=>{!0!==n.current&&(n.current=!0,t.current())}),[])}function Me(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:a=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=(0,v.useRef)(t),s=(0,v.useRef)(n),l=(0,v.useRef)(r),c=(0,v.useRef)(i),[u,d]=(0,v.useState)(!1),[h,f]=(0,v.useState)(!1),p=(0,v.useRef)({longPress:!1});(0,v.useEffect)((()=>{o.current=t}),[t]),(0,v.useEffect)((()=>{s.current=n}),[n]),(0,v.useEffect)((()=>{l.current=r}),[r]),(0,v.useEffect)((()=>{c.current=i}),[i]),(0,v.useEffect)((()=>{const{current:t}=e;function n(e){d(!0),s.current?.(),e.preventDefault()}function r(){d(!1),f(!1),l.current?.(p.current)}function i(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function a(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),o.current?.(p.current),p.current.longPress=!1}function u(e){e.preventDefault()}return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",a),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",a),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,v.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),a);return()=>{clearTimeout(e)}}}),[u,a]),(0,v.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const ke=y().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Le=y().createContext({index:0,hasSecondaryLabel:!1}),De=`(min-width: ${we.width})`,Re=y().createContext(0);function Ne(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:a,onTabCloseRequest:o}=e;const s=R("ccs"),[l,c]=(0,v.useState)(n),[u,d]=function(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[a,o]=(0,v.useState)(i??t),s=(0,v.useRef)(null);function l(e){const t="function"==typeof e?e(a):e;!1===s.current&&o(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,v.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[a,l]}({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:a,onTabCloseRequest:o,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return y().createElement(ke.Provider,{value:h},t)}function Ie(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:a=!1,fullWidth:o=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:m,selectedIndex:b,setSelectedIndex:w,setActiveIndex:E,dismissable:x}=y().useContext(ke),S=_(),O=(0,v.useRef)(null),T=(0,v.useRef)(null),M=(0,v.useRef)(null),[k,L]=(0,v.useState)(!1),[D,R]=(0,v.useState)(0);let N=!1;a&&(N=y().Children.toArray(r).some((e=>(0,Te.isElement)(e)&&!!e.props.secondaryLabel)));const I=function(e){const[t,n]=(0,v.useState)((()=>!!A&&window.matchMedia(e).matches));return(0,v.useEffect)((()=>{function t(e){n(e.matches)}const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",t):r.addListener(t),n(r.matches),()=>{r.addEventListener?r.removeEventListener("change",t):r.removeListener(t)}}),[e]),t}(De),P=o&&a&&I&&y().Children.toArray(r).length<9,$=g()(`${S}--tabs`,{[`${S}--tabs--contained`]:a,[`${S}--tabs--light`]:c,[`${S}--tabs__icon--default`]:"default"===s,[`${S}--tabs__icon--lg`]:"lg"===s,[`${S}--layout--size-lg`]:"lg"===s,[`${S}--tabs--tall`]:N,[`${S}--tabs--full-width`]:P},i),U=44,[j,F]=(0,v.useState)(!!O.current&&D+U+O.current.clientWidth<O.current.scrollWidth),W=!!O.current&&k&&D>0,Z=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--previous`,{[`${S}--tab--overflow-nav-button--hidden`]:!W}),Y=g()(`${S}--tab--overflow-nav-button`,`${S}--tab--overflow-nav-button--next`,{[`${S}--tab--overflow-nav-button--hidden`]:!j}),K=(0,v.useRef)([]),X=(0,v.useCallback)((()=>Ce()((e=>{R(e.target.scrollLeft)}),d)),[d]);return Ae((()=>{const e=K.current[b];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})})),(0,v.useEffect)((()=>{F(!!O.current&&D+U+O.current.clientWidth<O.current.scrollWidth),x&&O.current&&L(O.current.scrollWidth>O.current.clientWidth)}),[D,r,x]),Ae((()=>{if(K.current[b].disabled){const e=K.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];w(K.current.indexOf(t))}}})),Q((()=>{O.current&&L(O.current.scrollWidth>O.current.clientWidth);const e=Ce()((function(){O.current&&L(O.current.scrollWidth>O.current.clientWidth)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),Q((()=>{null!==D&&O.current&&(O.current.scrollLeft=D)}),[D]),Q((()=>{if(!k||!O.current)return;const e="manual"===t?K.current[m]:K.current[b];if(e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=O.current.scrollLeft+U,a=O.current.scrollLeft+O.current.clientWidth-U;n<i&&R(n-U),r>a&&R(r+U-O.current.clientWidth)}}),[t,m,b,k,r]),Me(T,{onPress(e){let{longPress:t}=e;!t&&O.current&&R(Math.max(D-O.current.scrollWidth/K.current.length*1.5,0))},onLongPress:()=>Pe(O,"backward",R)}),Me(M,{onPress(e){let{longPress:t}=e;!t&&O.current&&R(Math.min(D+O.current.scrollWidth/K.current.length*1.5,O.current.scrollWidth-O.current.clientWidth))},onLongPress:()=>Pe(O,"forward",R)}),y().createElement("div",{className:$},y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:T,className:Z,type:"button"},l),xe||(xe=y().createElement(C.s$,null))),y().createElement("div",p({},f,{"aria-label":n,ref:O,role:"tablist",className:`${S}--tab--list`,onScroll:X,onKeyDown:function(e){if(B(e,[q,G,H,V])){e.preventDefault();const n=K.current.filter((e=>!e.disabled)),r=n.indexOf(K.current["automatic"===t?b:m]),i=K.current.indexOf(n[function(e,t,n){switch(!0){case z(e,q):return(n+1)%t;case z(e,G):return(t+n-1)%t;case z(e,H):return 0;case z(e,V):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?w(i):"manual"===t&&E(i),K.current[i]?.focus()}}}),y().Children.map(r,((e,t)=>(0,Te.isElement)(e)?y().createElement(Le.Provider,{value:{index:t,hasSecondaryLabel:N,contained:a}},y().cloneElement(e,{ref:e=>{K.current[t]=e}})):null))),y().createElement("button",p({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:M,className:Y,type:"button"},u),Se||(Se=y().createElement(C._Q,null))))}function Pe(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const a="forward"===t?5:-5;let o=null;return o=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+a,o=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),o&&cancelAnimationFrame(o)}}Ne.propTypes={children:E().node,defaultSelectedIndex:E().number,dismissable:E().bool,onChange:E().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:E().number},Ie.propTypes={activation:E().oneOf(["automatic","manual"]),"aria-label":E().string.isRequired,children:E().node,className:E().string,contained:E().bool,fullWidth:E().bool,iconSize:E().oneOf(["default","lg"]),leftOverflowButtonProps:E().object,light:I(E().bool),rightOverflowButtonProps:E().object,scrollDebounceWait:E().number,scrollIntoView:E().bool};const $e=(0,v.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:a,onClick:o,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=_(),{selectedIndex:h,setSelectedIndex:f,baseId:m,dismissable:b,onTabCloseRequest:w}=y().useContext(ke),{index:E,hasSecondaryLabel:x,contained:S}=y().useContext(Le),O=(0,v.useRef)(null),C=(0,v.useRef)(null),T=J([t,C]),[A,M]=(0,v.useState)(!1),k=`${m}-tab-${E}`,L=`${m}-tabpanel-${E}`,D=g()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===E,[`${d}--tabs__nav-item--disabled`]:a,[`${d}--tabs__nav-item--hover-off`]:A},i),R=n;ee(O,"mouseover",(e=>{S&&C.current&&(e.stopPropagation(),M(!0),C.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),ee(O,"mouseleave",(()=>{S&&C.current&&(C.current.classList.remove(`${d}--tabs__nav-item--hover-off`),M(!1))}));const N=e=>{e.stopPropagation(),w?.(E)},I=y().createElement("div",{tabIndex:-1,"aria-hidden":!0,className:g()(`${d}--tabs__nav-item--close-icon`,{[`${d}--visually-hidden`]:!b}),onClick:N,title:"Close tab",ref:O},y().createElement(ye,{"aria-hidden":b?"false":"true","aria-label":"Press delete to close tab"})),P=c??b;return y().createElement(R,p({},u,{"aria-controls":L,"aria-disabled":a,"aria-selected":h===E,ref:T,id:k,role:"tab",className:D,disabled:a,onClick:e=>{a||(f(E),o?.(e))},onKeyDown:e=>{b&&z(e,Y)&&N(e),s?.(e)},tabIndex:h===E?"0":"-1",type:"button"}),y().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},b&&c&&y().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},y().createElement(c,{size:16})),y().createElement("span",{className:`${d}--tabs__nav-item-label`,title:r},r),y().createElement("div",{className:g()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!P})},I,!b&&c&&y().createElement(c,{size:16}))),x&&y().createElement("div",{className:`${d}--tabs__nav-item-secondary-label`,title:l},l))}));var Be,ze,Ue,je,Fe,Ve,He,Ge,We;$e.propTypes={as:E().oneOfType([E().string,E().elementType]),children:E().node,className:E().string,disabled:E().bool,onClick:E().func,onKeyDown:E().func,renderButton:E().func,renderIcon:E().oneOfType([E().func,E().object]),secondaryLabel:E().string},y().forwardRef((function(e,t){let{children:n,className:r,defaultOpen:i=!1,enterDelayMs:a,leaveDelayMs:o,label:s,...l}=e;const c=_(),u=g()(`${c}--tabs__nav-item--icon-only`,r);return y().createElement(le,{align:"bottom",defaultOpen:i,className:`${c}--icon-tooltip`,enterDelayMs:a,label:s,leaveDelayMs:o},y().createElement($e,p({className:u,ref:t},l),n))})).propTypes={children:E().node,className:E().string,defaultOpen:E().bool,enterDelayMs:E().number,label:E().node.isRequired,leaveDelayMs:E().number},y().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const a=_(),o=(0,v.useRef)(null),s=J([t,o]),[l,c]=(0,v.useState)(0),[u,d]=(0,v.useState)(!1),{selectedIndex:h,baseId:f}=y().useContext(ke),m=y().useContext(Re),b=`${f}-tabpanel-${m}`,w=`${f}-tab-${m}`,E=g()(`${a}--tab-content`,r,{[`${a}--tab-content--interactive`]:u});return Ae((()=>{o.current&&oe(o.current)&&(d(!0),c(-1))})),(0,v.useEffect)((()=>{const e=o.current;if(!e)return;const t=new MutationObserver((function(){oe(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),y().createElement("div",p({},i,{"aria-labelledby":w,id:b,className:E,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==m}),n)})).propTypes={children:E().node,className:E().string},E().node;const qe=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Be||(Be=y().createElement("path",{d:"M16,2A14.1725,14.1725,0,0,0,2,16,14.1725,14.1725,0,0,0,16,30,14.1725,14.1725,0,0,0,30,16,14.1725,14.1725,0,0,0,16,2Zm8,15H17v7H15V17H8V15h7V8h2v7h7Z"})),ze||(ze=y().createElement("path",{fill:"none",d:"M24 17L17 17 17 24 15 24 15 17 8 17 8 15 15 15 15 8 17 8 17 15 24 15 24 17z","data-icon-path":"inner-path"})),n)})),Ze=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Ue||(Ue=y().createElement("path",{d:"M9.3 3.7L13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},je||(je=y().createElement("path",{d:"M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Fe||(Fe=y().createElement("path",{d:"M14 4L12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ve||(Ve=y().createElement("path",{d:"M18 6L16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),n)})),Ye=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},He||(He=y().createElement("path",{d:"M3.7 6.7L7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ge||(Ge=y().createElement("path",{d:"M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"})),n)})),Ke=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},We||(We=y().createElement("path",{d:"M27.6 20.6L24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22zM9 4L3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"})),n)}));var Xe,Qe,Je,et,tt,nt,rt,it,at;const ot=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Xe||(Xe=y().createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),n)})),st=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Qe||(Qe=y().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),Je||(Je=y().createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},et||(et=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),tt||(tt=y().createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},nt||(nt=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),rt||(rt=y().createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},it||(it=y().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),at||(at=y().createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),n)})),lt=(0,v.createContext)(u);function ct(e){return(0,v.useContext)(lt).enabled(e)}var ut,dt,ht,ft;E().node,E().objectOf(E().bool);const pt=y().forwardRef((function(e,t){let{children:n,className:r,light:i=!1,...a}=e;const o=_(),s=g()(`${o}--tile`,i&&`${o}--tile--light`,r);return y().createElement("div",p({className:s,ref:t},a),n)}));pt.displayName="Tile",pt.propTypes={children:E().node,className:E().string,light:I(E().bool)};const mt=y().forwardRef((function(e,t){let{children:n,className:r,clicked:i=!1,disabled:a,href:o,light:s,onClick:l=(()=>{}),onKeyDown:c=(()=>{}),renderIcon:u,...d}=e;const h=_(),f=g()(`${h}--tile`,`${h}--tile--clickable`,i&&`${h}--tile--is-clicked`,s&&`${h}--tile--light`,r),[m,b]=(0,v.useState)(i),w=ct("enable-v12-tile-default-icons");w&&(u||(u=Ze),a&&(u=ot));const E=g()({[`${h}--tile--icon`]:!w||w&&!a,[`${h}--tile--disabled-icon`]:w&&a});return y().createElement(me,p({className:f,href:o,onClick:a?void 0:function(e){e?.persist?.(),b(!m),l(e)},onKeyDown:function(e){e?.persist?.(),B(e,[U,F])&&(e.preventDefault(),b(!m),c(e)),c(e)},ref:t,disabled:a},d),n,u&&y().createElement(u,{className:E,"aria-hidden":"true"}))}));mt.displayName="ClickableTile",mt.propTypes={children:E().node,className:E().string,clicked:E().bool,disabled:E().bool,href:E().string,light:I(E().bool),onClick:E().func,onKeyDown:E().func,rel:E().string,renderIcon:E().oneOfType([E().func,E().object])};const gt=y().forwardRef((function(e,t){let{children:n,className:r,disabled:i,id:a,light:o,onClick:s=(()=>{}),onChange:l=(()=>{}),onKeyDown:c=(()=>{}),selected:u=!1,tabIndex:d=0,title:h="title",...f}=e;const m=_(),b=s,w=c,[E,x]=(0,v.useState)(u),[S,O]=(0,v.useState)(u),T=g()(`${m}--tile`,`${m}--tile--selectable`,E&&`${m}--tile--is-selected`,o&&`${m}--tile--light`,i&&`${m}--tile--disabled`,r);return u!==S&&(x(u),O(u)),y().createElement("div",p({className:T,onClick:i?void 0:function(e){e.preventDefault(),e?.persist?.(),x(!E),b(e),l(e)},role:"checkbox","aria-checked":E,onKeyDown:i?void 0:function(e){e?.persist?.(),B(e,[U,F])&&(e.preventDefault(),x(!E),l(e)),w(e)},tabIndex:i?void 0:d,ref:t,id:a,onChange:i?void 0:function(e){x(e.target.checked),l(e)},title:h},f),y().createElement("span",{className:`${m}--tile__checkmark ${m}--tile__checkmark--persistent`},E?ut||(ut=y().createElement(C.BV,null)):dt||(dt=y().createElement(C.XZ,null))),y().createElement("label",{htmlFor:a,className:`${m}--tile-content`},n))}));gt.displayName="SelectableTile",gt.propTypes={children:E().node,className:E().string,disabled:E().bool,id:E().string,light:I(E().bool),name:E().string,onChange:E().func,onClick:E().func,onKeyDown:E().func,selected:E().bool,tabIndex:E().number,title:E().string,value:E().oneOfType([E().string,E().number]).isRequired};const vt=y().forwardRef((function(e,t){let{tabIndex:n=0,className:r,children:i,expanded:a=!1,tileMaxHeight:o=0,tilePadding:s=0,onClick:l,onKeyUp:c,tileCollapsedIconText:u="Interact to expand Tile",tileExpandedIconText:d="Interact to collapse Tile",tileCollapsedLabel:h,tileExpandedLabel:f,light:m,...b}=e;const[w,E]=(0,v.useState)(o),[x,S]=(0,v.useState)(s),[O,T]=(0,v.useState)(a),[A,M]=(0,v.useState)(o),[k,L]=(0,v.useState)(s),[D,N]=(0,v.useState)(a),[I,P]=(0,v.useState)(!0),$=(0,v.useRef)(null),z=(0,v.useRef)(null),j=(0,v.useRef)(null),V=(0,v.useRef)(null),H=J([t,V]),G=_();function W(){D&&j.current&&E(j.current.getBoundingClientRect()?.height),$.current&&E($.current.getBoundingClientRect().height)}function q(e){e?.persist?.(),N(!D),W()}function Z(e){e.target!==V.current&&B(e,[U,F])&&e.preventDefault()}a!==O&&(N(a),T(a),W()),o!==A&&(E(o),M(o)),s!==k&&(S(s),L(s));const Y=g()(`${G}--tile`,`${G}--tile--expandable`,{[`${G}--tile--is-expanded`]:D,[`${G}--tile--light`]:m},r),K=g()(`${G}--tile`,`${G}--tile--expandable`,`${G}--tile--expandable--interactive`,D&&`${G}--tile--is-expanded`,m&&`${G}--tile--light`,r),X=g()(`${G}--tile__chevron`,`${G}--tile__chevron--interactive`),ee=y().Children.toArray(i);Q((()=>{if(!V.current||!$.current)return;const e=window.getComputedStyle(V.current,null),{current:t}=$,{height:n}=t.getBoundingClientRect(),r=parseInt(e.getPropertyValue("padding-top"),10),i=parseInt(e.getPropertyValue("padding-bottom"),10);E(n),S(r+i)}),[w]),Q((()=>{$.current&&z.current&&(oe(z.current)||se(z.current)||oe($.current)||se($.current)||P(!1))}),[]),Q((()=>{V.current&&(V.current.style.maxHeight=D?"":w+x+"px")}),[D,w,x]),(0,v.useEffect)((()=>{if(!$.current)return;const e=new ResizeObserver((e=>{const[t]=e;E(t.contentRect.height)}));return e.observe($.current),()=>e.disconnect()}),[]);const te=R("expandable-tile-interactive");return I?y().createElement("div",p({ref:H,className:K},b),y().createElement("div",{ref:j},y().createElement("div",{ref:$,className:`${G}--tile-content`},ee[0]),y().createElement("button",{type:"button","aria-expanded":D,"aria-controls":te,onKeyUp:ue([c,Z]),onClick:ue([l,q]),"aria-label":D?d:u,className:X},ht||(ht=y().createElement(C._M,null))),y().createElement("div",{ref:z,className:`${G}--tile-content`,id:te},ee[1]))):y().createElement("button",p({type:"button",ref:H,className:Y,"aria-expanded":D,title:D?d:u},b,{onKeyUp:ue([c,Z]),onClick:ue([l,q]),tabIndex:n}),y().createElement("div",{ref:j},y().createElement("div",{ref:$,className:`${G}--tile-content`},ee[0]),y().createElement("div",{className:`${G}--tile__chevron`},y().createElement("span",null,D?f:h),ft||(ft=y().createElement(C._M,null))),y().createElement("div",{ref:z,className:`${G}--tile-content`},ee[1])))}));vt.propTypes={children:E().node,className:E().string,expanded:E().bool,id:E().string,light:I(E().bool),onClick:E().func,onKeyUp:E().func,tabIndex:E().number,tileCollapsedIconText:E().string,tileCollapsedLabel:E().string,tileExpandedIconText:E().string,tileExpandedLabel:E().string},vt.displayName="ExpandableTile";const yt=y().forwardRef((function(e,t){let{children:n}=e;const r=_();return y().createElement("span",{ref:t,className:`${r}--tile-content__above-the-fold`},n)}));yt.propTypes={children:E().node},yt.displayName="TileAboveTheFoldContent";const bt=y().forwardRef((function(e,t){let{children:n}=e;const r=_();return y().createElement("span",{ref:t,className:`${r}--tile-content__below-the-fold`},n)}));bt.propTypes={children:E().node},bt.displayName="TileBelowTheFoldContent";const _t=y().createContext(1),wt=["one","two","three"],Et=wt.length-1,xt=y().forwardRef((function(e,t){let{as:n="div",className:r,children:i,level:a,...o}=e;const s=y().useContext(_t),l=a??s,c=_(),u=g()(`${c}--layer-${wt[l]}`,r),d=Math.max(0,Math.min(l+1,Et));return y().createElement(_t.Provider,{value:d},y().createElement(n,p({ref:t},o,{className:u}),i))}));function St(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:a="loading",...o}=e;const s=_(),l=g()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=g()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=y().createElement("div",p({},o,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),y().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},y().createElement("title",null,a),i?y().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"44"}):null,y().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:"44"})));return r?y().createElement("div",{className:c},u):u}function Ot(e){let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:a,successDelay:o=1500,...s}=e;const l=_(),c=g()(`${l}--inline-loading`,t),u=y().createElement("div",{className:`${l}--inline-loading__text`},i),d=(()=>{let e=r||n;return"error"===n?y().createElement(st,{className:`${l}--inline-loading--error`},y().createElement("title",null,e)):"finished"===n?(setTimeout((()=>{a&&a()}),o),y().createElement(C.kF,{className:`${l}--inline-loading__checkmark-container`},y().createElement("title",null,e))):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),y().createElement(St,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),h=d&&y().createElement("div",{className:`${l}--inline-loading__animation`},d);return y().createElement("div",p({className:c},s,{"aria-live":"assertive"}),h,i&&u)}xt.propTypes={as:E().oneOfType([E().func,E().string,E().elementType]),children:E().node,className:E().string,level:E().oneOf([0,1,2])},St.propTypes={active:E().bool,className:E().string,description:E().string,id:I(E().string),small:E().bool,withOverlay:E().bool},Ot.propTypes={className:E().string,description:E().node,iconDescription:E().string,onSuccess:E().func,status:E().oneOf(["inactive","active","finished","error"]),successDelay:E().number};var Ct=n(3958),Tt=n.n(Ct);const At={NONE:"NONE",DESC:"DESC",ASC:"ASC"},Mt=(e,t)=>`${e}:${t}`,kt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return null===e&&(e=""),null===t&&(t=""),"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?Lt(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props.children&&"string"==typeof t.props.children?Lt(e.props.children,t.props.children,n):Lt(""+e,""+t,n)},Lt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return isNaN(e)||isNaN(parseFloat(e))||isNaN(t)||isNaN(parseFloat(t))?e.localeCompare(t,n):e.localeCompare(t,n,{numeric:!0})},Dt=At.NONE,Rt=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:a}=t,o=(s=i,r===a?"NONE"===s?At.ASC:"ASC"===s?At.DESC:At.NONE:At.ASC);var s;return Nt(e,t,r,o)},Nt=(e,t,n,r)=>{const{rowIds:i,cellsById:a,initialRowOrder:o}=t,{locale:s,sortRow:l}=e,c=r!==At.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:a,sortRow:o}=e;return t.slice().sort(((e,t)=>{const s=n[Mt(e,i)],l=n[Mt(t,i)];return o(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:a,sortStates:At,compare:kt,rowIds:[e,t]})}))})({rowIds:i,cellsById:a,sortDirection:r,key:n,locale:s,sortRow:l}):o;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var It=(e,t)=>{const{rowIds:n,rowsById:r,cellsById:i}=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{rowsById:r}=n,i=new Array(e.length),a={},o={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;a[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(a[e.id].isSelected=r[e.id].isSelected,a[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r}=t;const i=Mt(e.id,r);o[i]={id:i,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,info:{header:r}},a[e.id].cells[n]=i}))})),{rowIds:i,rowsById:a,cellsById:o}}(e.rows,e.headers,t),a={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||Dt,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Nt(e,a,t.sortHeaderKey,t.sortDirection);a.rowIds=n}return a.isExpandedAll=a.rowIds.every((e=>!0===a.rowsById[e].isExpanded)),a},Pt=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))}))),$t=()=>{let e=0;return function(){return++e}};const Bt=(0,v.createContext)({titleId:void 0,descriptionId:void 0}),zt=(e,t)=>{if(e.children.length>0)return!1;const n=window.getComputedStyle(e);t.font=n.font?n.font:`${n.fontSize}" "${n.fontFamily}`;const r=t?.measureText(e.textContent??"");let i=r.width??0;const a=n.letterSpacing?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0])*(e.textContent?.length??0));const o=n.paddingLeft?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},Ut=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:a=!1,useStaticWidth:o,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,...u}=e;const{titleId:d,descriptionId:h}=(0,v.useContext)(Bt),f=_(),[m,b]=(0,v.useState)(!1),w=(0,v.useRef)(null),E=g()(`${f}--data-table`,t,{[`${f}--data-table--${i}`]:i,[`${f}--data-table--sort`]:a,[`${f}--data-table--zebra`]:r,[`${f}--data-table--static`]:o,[`${f}--data-table--sticky-header`]:s,[`${f}--data-table--visible-overflow-menu`]:!l}),x=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?w.current?.classList.add(`${f}--data-table--top-aligned-body`):w.current?.classList.remove(`${f}--data-table--top-aligned-body`)}),[f]),S=(0,v.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?w.current?.classList.add(`${f}--data-table--top-aligned-header`):w.current?.classList.remove(`${f}--data-table--top-aligned-header`)}),[f]),O=(0,v.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(w.current&&e){const t=Array.from(w.current.querySelectorAll("td")).some((t=>zt(t,e))),n=Array.from(w.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${f}--table-header-label`);return n&&zt(n,e)}));x(t),S(n)}}else x(!1),S(!1)}),[c,x,S,f]);te("resize",Ce()(O,100));const C=(0,v.useCallback)((()=>{const e=w?.current?.parentNode,t=w?.current?.firstChild;b(t?.scrollWidth>e?.clientWidth)}),[]);te("resize",Ce()(C,100)),(0,v.useLayoutEffect)((()=>{C()}),[C]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{O()})),(0,v.useLayoutEffect)((()=>{O()}),[O,i]);const T=y().createElement("div",{className:`${f}--data-table-content`,tabIndex:m?0:void 0},y().createElement("table",p({"aria-labelledby":d,"aria-describedby":h},u,{className:E,ref:w}),n));return s?y().createElement("section",{className:`${f}--data-table_inner-container`},T):T};Ut.propTypes={children:E().node,className:E().string,experimentalAutoAlign:E().bool,isSortable:E().bool,overflowMenuOnHover:E().bool,size:E().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:E().bool,useStaticWidth:E().bool,useZebraStyles:E().bool},Ut.defaultProps={isSortable:!1,overflowMenuOnHover:!0};var jt=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const a=_(),o=g()("function"==typeof n?n(a):n,t);return y().createElement(r,{...i,className:o||void 0})}return i.displayName=t,i.propTypes={className:E().string},i},Ft=jt({name:"TableActionList",type:"div",className:e=>`${e}--action-list`});const Vt=e=>y().createElement(de,e);Vt.propTypes={hasIconOnly:E().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:E().oneOfType([E().func,E().object])},Vt.defaultProps={renderIcon:qe,iconDescription:"Add"};var Ht=Vt;const Gt={"carbon.table.batch.cancel":"Cancel","carbon.table.batch.items.selected":"items selected","carbon.table.batch.item.selected":"item selected","carbon.table.batch.selectAll":"Select all"},Wt=function(e){let{totalSelected:t,totalCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{totalSelected:0,totalCount:0};return"carbon.table.batch.cancel"===e?Gt[e]:"carbon.table.batch.selectAll"===e?`${Gt[e]} (${n})`:`${t} ${Gt[e]}`},qt=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:a,onCancel:o,onSelectAll:s,translateWithId:l=Wt,...c}=e;const[u,d]=y().useState(!1),h=_(),f=g()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),m=g()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return y().createElement("div",p({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),y().createElement("div",{className:m},y().createElement("p",{className:`${h}--batch-summary__para`},y().createElement($,{as:"span"},l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&y().createElement(y().Fragment,null,y().createElement("span",{className:`${h}--batch-summary__divider`},"|"),y().createElement(de,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:a})))),y().createElement(Ft,null,n,y().createElement(de,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:o},l("carbon.table.batch.cancel"))))};qt.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],qt.propTypes={children:E().node,className:E().string,onCancel:E().func.isRequired,onSelectAll:E().func,shouldShowBatchActions:E().bool,totalCount:E().number,totalSelected:E().number.isRequired,translateWithId:E().func},qt.defaultProps={translateWithId:Wt};const Zt=e=>{let{children:t,className:n,...r}=e;return y().createElement("tbody",p({className:n},r),t)};Zt.propTypes={"aria-live":E().oneOf(["polite","assertive","off"]),children:E().node,className:E().string},Zt.defaultProps={"aria-live":"polite"};const Yt=jt({name:"TableCell",type:"td"}),Kt=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:a,useStaticWidth:o,...s}=e;const l=R("tc"),c=`${l}-title`,u=`${l}-description`,d=_(),h=g()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:a,[`${d}--data-table-container--static`]:o}),f=(0,v.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return y().createElement(Bt.Provider,{value:f},y().createElement("div",p({},s,{className:h}),r&&y().createElement("div",{className:`${d}--data-table-header`},y().createElement("h4",{className:`${d}--data-table-header__title`,id:c},r),y().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};function Xt(e,t){return function(e,n,r){for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return t(e,n,r,...a)}}Kt.propTypes={children:E().node,className:E().string,description:E().node,stickyHeader:E().bool,title:E().node,useStaticWidth:E().bool};const Qt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:a,enableToggle:o,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=_(),m=g()(`${f}--table-expand`,i),v=l?"collapsed":void 0;return y().createElement("th",p({scope:"col",className:m,"data-previous-value":v,id:s},h),a||o?y().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},y().createElement(C._Q,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};Qt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,enableExpando:I(E().bool),enableToggle:E().bool,expandIconDescription:E().string,id:E().string,isExpanded:Xt(0,E().bool),onExpand:E().oneOfType([Xt(0,E().func),Xt(0,E().func)])};const Jt=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,children:a,isExpanded:o,onExpand:s,expandIconDescription:l,isSelected:c,expandHeader:u="expand",...d}=e;const h=_(),f=g()({[`${h}--parent-row`]:!0,[`${h}--expandable-row`]:o,[`${h}--data-table--selected`]:c},i),m=o?"collapsed":void 0;return y().createElement("tr",p({},d,{className:f,"data-parent-row":!0}),y().createElement(Yt,{className:`${h}--table-expand`,"data-previous-value":m,headers:u},y().createElement("button",{type:"button",className:`${h}--table-expand__button`,onClick:s,title:l,"aria-label":r||n,"aria-expanded":o,"aria-controls":t},y().createElement(C._Q,{className:`${h}--table-expand__svg`,"aria-label":l}))),a)};Jt.propTypes={"aria-controls":E().string,"aria-label":E().string,ariaLabel:E().string,children:E().node,className:E().string,expandHeader:E().string,expandIconDescription:E().string,isExpanded:E().bool.isRequired,isSelected:E().bool,onExpand:E().func.isRequired};const en=e=>{let{className:t,children:n,colSpan:r,...i}=e;const a=(0,v.useRef)(null),o=_(),s=g()(`${o}--expandable-row`,t),l=e=>{if(a&&a.current&&a.current.previousElementSibling){const t=a.current.previousElementSibling;"enter"===e?t.classList.add(`${o}--expandable-row--hover`):t.classList.remove(`${o}--expandable-row--hover`)}};return y().createElement("tr",p({ref:a,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),y().createElement(Yt,{colSpan:r},y().createElement("div",{className:`${o}--child-row-inner-container`},n)))};en.propTypes={children:E().node,className:E().string,colSpan:E().number.isRequired};const tn=jt({name:"TableHead",type:"thead"}),nn="col",rn={buttonDescription:"carbon.table.header.icon.description"},an={[At.NONE]:"none",[At.ASC]:"ascending",[At.DESC]:"descending"},on=y().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,isSortable:a,isSortHeader:o,onClick:s,scope:l=nn,sortDirection:c,translateWithId:u,id:d,...h}=e;const f=_(),m=R("table-sort");if(!a)return y().createElement("th",p({},h,{id:d,className:n,scope:l,colSpan:i,ref:t}),r?y().createElement("div",{className:`${f}--table-header-label`},r):null);const v=g()(n,{[`${f}--table-sort`]:!0,[`${f}--table-sort--active`]:o&&c!==At.NONE,[`${f}--table-sort--descending`]:o&&c===At.DESC}),b=o&&c?an[c]:"none",w=u&&u("carbon.table.header.icon.description",{header:r,sortDirection:c,isSortHeader:o,sortStates:At}),E=g()(n,`${f}--table-sort__header`);return y().createElement("th",{id:d,"aria-sort":b,className:E,colSpan:i,ref:t,scope:l},y().createElement("div",{className:`${f}--table-sort__description`,id:m},w),y().createElement("button",p({type:"button","aria-describedby":m,className:v,onClick:s},h),y().createElement("span",{className:`${f}--table-sort__flex`},y().createElement("div",{className:`${f}--table-header-label`},r),y().createElement(Ye,{size:20,className:`${f}--table-sort__icon`}),y().createElement(Ke,{size:20,className:`${f}--table-sort__icon-unsorted`}))))}));on.propTypes={children:E().node,className:E().string,colSpan:E().number,id:E().string,isSortHeader:E().bool,isSortable:E().bool,onClick:E().func,scope:E().string.isRequired,sortDirection:E().oneOf(Object.values(At)),translateWithId:E().func},on.defaultProps={isSortable:!1,scope:nn,translateWithId:(e,t)=>t&&e===rn.buttonDescription?t.isSortHeader&&At?t.sortDirection===At.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===At.ASC?`Click to sort rows by ${t.header} header in descending order`:`Click to unsort rows by ${t.header} header`:`Click to sort rows by ${t.header} header in ascending order`:""},on.translationKeys=Object.values(rn),on.displayName="TableHeader";var sn=n(8979),ln=n.n(sn);const cn=e=>{const t=_(),n=g()(e.className,{[`${t}--data-table--selected`]:e.isSelected}),r={...ln()(e,["ariaLabel","aria-label","aria-controls","onExpand","isExpanded","isSelected"]),className:n||void 0};return y().createElement("tr",r)};cn.propTypes={className:E().string,isSelected:E().bool};const un=y().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:a,id:o,indeterminate:s,name:l,onChange:c=(()=>{}),onClick:u,onKeyDown:d,title:h}=e,f=_(),p=(0,v.useRef)(null),m=J([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:a,id:o,name:l,onClick:u,onChange:e=>{c(e.target.checked,o,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,v.useEffect)((()=>{p?.current&&(p.current.indeterminate=s)}),[s]),y().createElement("div",{className:`${f}--checkbox--inline`},y().createElement("input",g),y().createElement("label",{htmlFor:o,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},y().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));un.propTypes={"aria-label":E().string.isRequired,ariaLabel:I(E().string.isRequired),checked:E().bool,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onChange:E().func,onClick:E().func,onKeyDown:E().func,title:E().string};var dn=un;const hn=e=>{let{ariaLabel:t,checked:n,id:r,indeterminate:i,name:a,onSelect:o,disabled:s,className:l}=e;const c=_();return y().createElement("th",{"aria-live":"off",scope:"col",className:g()(`${c}--table-column-checkbox`,l)},y().createElement(dn,{"aria-label":t,checked:n,id:r,indeterminate:i,name:a,onClick:o,disabled:s}))};hn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,indeterminate:E().bool,name:E().string.isRequired,onSelect:E().func.isRequired},hn.defaultProps={ariaLabel:"Select all rows in the table"};var fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):Object(t)===t&&(t.current=e)}))}};const pn=y().forwardRef(((e,t)=>{const{className:n,disabled:r,hideLabel:i,id:a,labelPosition:o="right",labelText:s="",name:l,onChange:c=(()=>{}),value:u="",...d}=e,h=_(),f=R("radio-button"),m=a||f,b=g()(`${h}--radio-button__label-text`,{[`${h}--visually-hidden`]:i}),w=g()(n,`${h}--radio-button-wrapper`,{[`${h}--radio-button-wrapper--label-${o}`]:"right"!==o}),E=(0,v.useRef)(null);return y().createElement("div",{className:w},y().createElement("input",p({},d,{type:"radio",className:`${h}--radio-button`,onChange:function(e){c(u,l,e)},id:m,ref:fn(E,t),disabled:r,value:u,name:l})),y().createElement("label",{htmlFor:m,className:`${h}--radio-button__label`},y().createElement("span",{className:`${h}--radio-button__appearance`}),s&&y().createElement($,{className:b},s)))}));pn.displayName="RadioButton",pn.propTypes={checked:E().bool,className:E().string,defaultChecked:E().bool,disabled:E().bool,hideLabel:E().bool,id:E().string,labelPosition:E().oneOf(["right","left"]),labelText:E().node.isRequired,name:E().string,onChange:E().func,onClick:E().func,value:E().oneOfType([E().string,E().number])};const mn=e=>{let{ariaLabel:t,checked:n,id:r,name:i,onSelect:a,onChange:o,disabled:s,radio:l,className:c}=e;const u=_(),d={id:r,name:i,onClick:a,onChange:o,checked:n,disabled:s},h=l?pn:dn,f=g()(`${u}--table-column-checkbox`,{...c&&{[c]:!0},[`${u}--table-column-radio`]:l});return y().createElement("td",{className:f,"aria-live":"off"},y().createElement(h,p({},d,l&&{labelText:t,hideLabel:!0},!l&&{"aria-label":t})))};mn.propTypes={ariaLabel:E().string.isRequired,checked:E().bool.isRequired,className:E().string,disabled:E().bool,id:E().string.isRequired,name:E().string.isRequired,onChange:E().func,onSelect:E().func.isRequired,radio:E().bool};const gn=(vn={"aria-label":E().string,"aria-labelledby":E().string},Object.keys(vn).reduce(((e,t)=>{return{...e,[t]:(n=vn[t],function(e,t,r){for(var i=arguments.length,a=new Array(i>3?i-3:0),o=3;o<i;o++)a[o-3]=arguments[o];return n(e,t,r,...a)})};var n}),{}));var vn;const yn=e=>{let{children:t,size:n,...r}=e;const i=_(),a=g()({[`${i}--table-toolbar`]:!0,[`${i}--table-toolbar--${n}`]:n});return y().createElement("section",p({},r,{className:a}),t)};yn.propTypes={...gn,children:E().node,size:E().oneOf(["sm","lg"])},yn.defaultProps={"aria-label":"data table toolbar"};const bn=y().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:a,hasDivider:o=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=(()=>{}),onKeyDown:h=(()=>{}),requireTitle:f,title:m,wrapperClassName:v,...b}=e;const w=_(),E=g()(`${w}--overflow-menu-options__btn`,n),x=g()(`${w}--overflow-menu-options__option`,{[`${w}--overflow-menu--divider`]:o,[`${w}--overflow-menu-options__option--danger`]:l,[`${w}--overflow-menu-options__option--disabled`]:i},v),S=s?"a":"button",O="string"!=typeof u?u:y().createElement("div",{className:`${w}--overflow-menu-options__option-content`},u);return y().createElement("li",{className:x,role:"none"},y().createElement(S,p({className:E,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){z(e,Z)&&a?.({currentIndex:c,direction:1}),z(e,W)&&a?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?m||u:void 0},b),O))}));bn.propTypes={className:E().string,closeMenu:E().func,disabled:E().bool,handleOverflowMenuItemFocus:E().func,hasDivider:E().bool,href:E().string,index:E().number,isDelete:E().bool,itemText:E().node.isRequired,onBlur:E().func,onClick:E().func,onFocus:E().func,onKeyDown:E().func,onKeyUp:E().func,onMouseDown:E().func,onMouseEnter:E().func,onMouseLeave:E().func,onMouseUp:E().func,requireTitle:E().bool,title:E().string,wrapperClassName:E().string};const _n=y().forwardRef(((e,t)=>{let{children:n,...r}=e;return y().createElement(bn,p({ref:t,itemText:n},r))}));_n.displayName="TableToolbarAction",_n.propTypes={children:E().node,className:E().string,onClick:E().func.isRequired};const wn=jt({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var En,xn,Sn,On,Cn,Tn;const An=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},En||(En=y().createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},xn||(xn=y().createElement("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"})),n)})),Mn=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Sn||(Sn=y().createElement("path",{d:"M13.5,8.4c0-0.1,0-0.3,0-0.4c0-0.1,0-0.3,0-0.4l1-0.8c0.4-0.3,0.4-0.9,0.2-1.3l-1.2-2C13.3,3.2,13,3,12.6,3 c-0.1,0-0.2,0-0.3,0.1l-1.2,0.4c-0.2-0.1-0.4-0.3-0.7-0.4l-0.3-1.3C10.1,1.3,9.7,1,9.2,1H6.8c-0.5,0-0.9,0.3-1,0.8L5.6,3.1 C5.3,3.2,5.1,3.3,4.9,3.4L3.7,3C3.6,3,3.5,3,3.4,3C3,3,2.7,3.2,2.5,3.5l-1.2,2C1.1,5.9,1.2,6.4,1.6,6.8l0.9,0.9c0,0.1,0,0.3,0,0.4 c0,0.1,0,0.3,0,0.4L1.6,9.2c-0.4,0.3-0.5,0.9-0.2,1.3l1.2,2C2.7,12.8,3,13,3.4,13c0.1,0,0.2,0,0.3-0.1l1.2-0.4 c0.2,0.1,0.4,0.3,0.7,0.4l0.3,1.3c0.1,0.5,0.5,0.8,1,0.8h2.4c0.5,0,0.9-0.3,1-0.8l0.3-1.3c0.2-0.1,0.4-0.2,0.7-0.4l1.2,0.4 c0.1,0,0.2,0.1,0.3,0.1c0.4,0,0.7-0.2,0.9-0.5l1.1-2c0.2-0.4,0.2-0.9-0.2-1.3L13.5,8.4z M12.6,12l-1.7-0.6c-0.4,0.3-0.9,0.6-1.4,0.8 L9.2,14H6.8l-0.4-1.8c-0.5-0.2-0.9-0.5-1.4-0.8L3.4,12l-1.2-2l1.4-1.2c-0.1-0.5-0.1-1.1,0-1.6L2.2,6l1.2-2l1.7,0.6 C5.5,4.2,6,4,6.5,3.8L6.8,2h2.4l0.4,1.8c0.5,0.2,0.9,0.5,1.4,0.8L12.6,4l1.2,2l-1.4,1.2c0.1,0.5,0.1,1.1,0,1.6l1.4,1.2L12.6,12z"})),On||(On=y().createElement("path",{d:"M8,11c-1.7,0-3-1.3-3-3s1.3-3,3-3s3,1.3,3,3C11,9.6,9.7,11,8,11C8,11,8,11,8,11z M8,6C6.9,6,6,6.8,6,7.9C6,7.9,6,8,6,8 c0,1.1,0.8,2,1.9,2c0,0,0.1,0,0.1,0c1.1,0,2-0.8,2-1.9c0,0,0-0.1,0-0.1C10,6.9,9.2,6,8,6C8.1,6,8,6,8,6z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Cn||(Cn=y().createElement("path",{d:"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"})),Tn||(Tn=y().createElement("path",{d:"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"})),n)})),kn=(0,v.createContext)({isFluid:!1});var Ln;const Dn=y().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:a,disabled:o,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=(()=>{}),onClear:h=(()=>{}),onKeyDown:f,onExpand:m,placeholder:b="Search",renderIcon:w,role:E="searchbox",size:x="md",type:S="text",value:O,...C}=e;const T=!(!O&&!a),A=_(),{isFluid:M}=(0,v.useContext)(kn),k=(0,v.useRef)(null),L=J([t,k]),D=(0,v.useRef)(null),N=R("search-input"),I=l||N,P=`${I}-search`,[$,B]=(0,v.useState)(T||!1),[V,H]=(0,v.useState)(O),G=g()({[`${A}--search`]:!0,[`${A}--search--sm`]:"sm"===x,[`${A}--search--md`]:"md"===x,[`${A}--search--lg`]:"lg"===x,[`${A}--search--light`]:u,[`${A}--search--disabled`]:o,[`${A}--search--fluid`]:M},r),W=g()({[`${A}--search-close`]:!0,[`${A}--search-close--hidden`]:!$||!s});function q(){!O&&k.current&&(k.current.value="");const e=Object.assign({},k.current,{value:""});d({target:e,type:"change"}),h(),B(!1),function(e){const t=e.current||e;t&&t.focus&&document.activeElement!==t&&t.focus()}(k)}return O!==V&&(B(!!O),H(O)),y().createElement("div",{role:"search","aria-label":b,className:G},y().createElement("div",{"aria-labelledby":m?I:void 0,role:m?"button":void 0,className:`${A}--search-magnifier`,onClick:m,onKeyDown:function(e){(z(e,U)||z(e,F))&&(e.stopPropagation(),m&&m(e))},tabIndex:m&&!s?0:-1,ref:D,"aria-expanded":!(!m||!s)||void 0,"aria-controls":m?I:void 0},y().createElement(Rn,{icon:w})),y().createElement("label",{id:P,htmlFor:I,className:`${A}--label`},c),y().createElement("input",p({autoComplete:n,className:`${A}--search-input`,defaultValue:a,disabled:o,role:E,ref:L,id:I,onChange:ue([d,function(e){B(""!==e.target.value)}]),onKeyDown:ue([f,function(e){z(e,j)&&(e.stopPropagation(),k.current?.value?q():m&&s&&D.current?.focus())}]),placeholder:b,type:S,value:O,tabIndex:m&&!s?-1:void 0},C)),y().createElement("button",{"aria-label":i,className:W,disabled:o,onClick:q,title:i,type:"button"},Ln||(Ln=y().createElement(ye,null))))}));function Rn(e){let{icon:t}=e;const n=_();return t?y().createElement(t,{className:`${n}--search-magnifier-icon`}):y().createElement(An,{className:`${n}--search-magnifier-icon`})}Dn.displayName="Search",Dn.propTypes={autoComplete:E().string,className:E().string,closeButtonLabelText:E().string,defaultValue:E().oneOfType([E().string,E().number]),disabled:E().bool,id:E().string,isExpanded:E().bool,labelText:E().node.isRequired,light:I(E().bool),onChange:E().func,onClear:E().func,onExpand:E().func,onKeyDown:E().func,placeholder:E().string,renderIcon:E().oneOfType([E().func,E().object]),role:E().string,size:E().oneOf(["sm","md","lg"]),type:E().string,value:E().oneOfType([E().string,E().number])},Rn.propTypes={icon:E().oneOfType([E().func,E().object])};const Nn=$t(),In={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},Pn=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i,translateWithId:a,placeholder:o,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f,id:m,onBlur:b,onFocus:w,size:E="lg",tabIndex:x,...S}=e;const{current:O}=(0,v.useRef)(void 0!==l),[C,T]=(0,v.useState)(c||u),A=O?l:C,[M,k]=(0,v.useState)(u||""),L=(0,v.useMemo)(Nn,[]),[D,R]=(0,v.useState)(null),N=_();(0,v.useEffect)((()=>{D&&(D.current?.querySelector?.("input")?.focus(),R(null))}),[D]),(0,v.useEffect)((()=>{u&&r?.("",u)}),[]);const I=g()(t,{[n]:n,[`${N}--toolbar-search-container-active`]:A,[`${N}--toolbar-search-container-disabled`]:d,[`${N}--toolbar-search-container-expandable`]:!f,[`${N}--toolbar-search-container-persistent`]:f}),P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!A;d||(O||f||T(t),h&&h(e,t))};return y().createElement(Dn,p({disabled:d,className:I,value:M,id:void 0!==m?m:L.toString(),labelText:s||a("carbon.table.toolbar.search.label"),placeholder:o||a("carbon.table.toolbar.search.placeholder"),onChange:e=>{k(e.target.value),r&&r(e)},onClear:i,onFocus:w?e=>w(e,P):e=>P(e,!0),onBlur:b?e=>b(e,P):e=>!M&&P(e,!1),size:E,tabIndex:x},S))};var $n,Bn,zn;Pn.propTypes={children:E().node,className:E().string,defaultExpanded:E().bool,defaultValue:E().string,disabled:E().bool,expanded:E().bool,id:E().string,labelText:E().string,onBlur:E().func,onChange:E().func,onClear:E().func,onExpand:E().func,onFocus:E().func,persistent:E().bool,placeholder:E().string,searchContainerClass:E().string,size:E().oneOf(["sm","md","lg"]),tabIndex:E().oneOfType([E().number,E().string]),translateWithId:E().func.isRequired},Pn.defaultProps={tabIndex:"0",translateWithId:e=>In[e],persistent:!1,onClear:()=>{}};const Un=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},$n||($n=y().createElement("circle",{cx:"16",cy:"8",r:"2"})),Bn||(Bn=y().createElement("circle",{cx:"16",cy:"16",r:"2"})),zn||(zn=y().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));var jn=n(8316);function Fn(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Vn=y().createContext({state:{isRoot:!0,hasIcons:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:()=>{}}),Hn=y().createContext({direction:"ltr"}),Gn=y().forwardRef((function(e,t){let{children:n,className:r,label:i,onClose:a,onOpen:o,open:s,size:l="sm",target:c=document.body,x:u=0,y:d=0,...h}=e;const f=_(),m=(0,v.useRef)(null),b=(0,v.useContext)(Vn),w=b.state.isRoot,E=w?l:b.state.size,[x,S]=(0,v.useReducer)(Fn,{...b.state,isRoot:!1,size:l,requestCloseRoot:w?R:b.state.requestCloseRoot}),O=(0,v.useMemo)((()=>({state:x,dispatch:S})),[x,S]),C=(0,v.useRef)(),T=J([t,C]),[A,M]=(0,v.useState)([-1,-1]),k=O.state.items.filter((e=>!e.disabled&&e.ref.current)),{direction:L}=(0,v.useContext)(Hn);function D(){m.current&&m.current.focus()}function R(e){/^key/.test(e.type)?window.addEventListener("keyup",D,{once:!0}):"click"===e.type&&C.current?C.current.addEventListener("focusout",D,{once:!0}):D(),a&&a()}function N(e){const t=k.findIndex((e=>e.ref.current.contains(document.activeElement)));let n=t;-1===t?n=0:e&&(z(e,W)&&(n-=1),z(e,Z)&&(n+=1)),n<0&&(n=k.length-1),n>=k.length&&(n=0),n!==t&&k[n].ref.current.focus()}function I(e,t){const{width:n,height:r}=C.current.getBoundingClientRect(),i=w?"vertical":"horizontal",a={x:{max:window.innerWidth,size:n,anchor:"horizontal"===i?e[1]:e[0],reversedAnchor:"horizontal"===i?e[0]:e[1],offset:0},y:{max:window.innerHeight,size:r,anchor:"horizontal"===i?e[0]:e[1],reversedAnchor:"horizontal"===i?e[1]:e[0],offset:w?0:4}},{max:o,size:s,anchor:l,reversedAnchor:c,offset:u}=a[t],d=[o-8-s-l>=0&&l-u,c-s>=0&&c-s+u,o-8-s].find((e=>!1!==e));return d>=8?d:8}(0,v.useEffect)((()=>{s&&k.length>0&&N()}),[s,k]),(0,v.useEffect)((()=>{s?function(){if(C.current){m.current=document.activeElement;const e=function(){if(C.current){const e={x:"object"==typeof u&&2===u.length?u:[u,u],y:"object"==typeof d&&2===d.length?d:[d,d]};return[I(e.x,"x"),I(e.y,"y")]}return[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==L||h?.id?.includes("MenuButton")?(C.current.style.insetInlineStart=`${e[0]}px`,C.current.style.insetInlineEnd="initial"):(C.current.style.insetInlineStart="initial",C.current.style.insetInlineEnd=`${e[0]}px`),C.current.style.insetBlockStart=`${e[1]}px`,M(e),C.current.focus(),o&&o()}}():M(-1,-1)}),[s]);const P=g()(r,`${f}--menu`,`${f}--menu--${E}`,{[`${f}--menu--open`]:s,[`${f}--menu--shown`]:A[0]>=0&&A[1]>=0,[`${f}--menu--with-icons`]:O.state.hasIcons}),$=y().createElement(Vn.Provider,{value:O},y().createElement("ul",p({},h,{className:P,role:"menu",ref:T,"aria-label":i,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(z(e,j)||!w&&z(e,G))&&a?R(e):N(e)},onBlur:function(e){s&&a&&w&&!C.current.contains(e.relatedTarget)&&R(e)}}),n));return w?s&&(0,jn.createPortal)($,c)||null:$}));Gn.propTypes={children:E().node,className:E().string,label:E().string,onClose:E().func,onOpen:E().func,open:E().bool,size:E().oneOf(["xs","sm","md","lg"]),target:E().object,x:E().oneOfType([E().number,E().arrayOf(E().number)]),y:E().oneOfType([E().number,E().arrayOf(E().number)])};const Wn="md",qn=y().forwardRef((function(e,t){let{children:n,className:r,label:i="Options",renderIcon:a=Un,size:o=Wn,tooltipAlignment:s,...l}=e;const c=R("overflowmenu"),u=_(),d=(0,v.useRef)(null),{open:h,x:f,y:m,handleClick:b,handleMousedown:w,handleClose:E}=function(e){const[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)([[-1,-1],[-1,-1]]);function a(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?a():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:a}=t.getBoundingClientRect();i([[e,r],[n,a]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:a}}(d),x=g()(r,`${u}--overflow-menu__container`),S=g()(`${u}--overflow-menu`,{[`${u}--overflow-menu--open`]:h},o!==Wn&&`${u}--overflow-menu--${o}`);return y().createElement("div",p({},l,{className:x,"aria-owns":h?c:null,ref:t}),y().createElement(ce,{"aria-controls":h?c:null,"aria-haspopup":!0,"aria-expanded":h,className:S,onClick:b,onMouseDown:w,ref:d,label:i,align:s},y().createElement(a,{className:`${u}--overflow-menu__icon`})),y().createElement(Gn,{id:c,size:o,open:h,onClose:E,x:f,y:m,label:i},n))}));qn.propTypes={children:E().node,className:E().string,label:E().string,renderIcon:E().oneOfType([E().func,E().object]),size:E().oneOf(["sm","md","lg"]),tooltipAlignment:E().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"])},n(7677);class Zn extends y().Component{static getEventTarget(e){return e.composed&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target}constructor(e){super(e),this.handleRef=this.handleRef.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick)}handleDocumentClick(e){this.element&&this.element.contains&&!this.element.contains(Zn.getEventTarget(e))&&this.props.onClickOutside(e)}handleRef(e){const{children:t}=this.props;this.element=e,t.ref&&"function"==typeof t.ref&&t.ref(e)}render(){return y().cloneElement(this.props.children,{ref:this.handleRef})}}f(Zn,"propTypes",{children:E().element.isRequired,onClickOutside:E().func.isRequired});var Yn=n(3883),Kn=n.n(Yn),Xn=function(){const e=[];let t=!1;function n(){e.forEach((e=>{e()})),t=!1}function r(){t||(t=!0,Kn().requestAnimationFrame(n))}return{add:t=>(e.length||Kn().addEventListener("resize",r),function(t){t&&e.indexOf(t)<0&&e.push(t)}(t),{release(){const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}}();const Qn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS,Jn="undefined"!=typeof Node&&Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY,er="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n";var tr=n(8431),nr=n.n(tr);const rr="left",ir="top",ar="right",or="bottom",sr=e=>{let{menuSize:t,refPosition:n={},offset:r={},direction:i=or,scrollX:a=0,scrollY:o=0,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:a,f="static"!==s.position?0:o,p="static"!==s.position?s.rect.top:0,m="static"!==s.position?s.rect.left:0,{width:g,height:v}=t,{top:y=0,left:b=0}=r,_=(l+u)/2,w=(c+d)/2;return{[rr]:()=>({left:l-g+h-b-m,top:w-v/2+f+y-9-p}),[ir]:()=>({left:_-g/2+h+b-m,top:c-v+f-y-p}),[ar]:()=>({left:u+h+b-m,top:w-v/2+f+y+3-p}),[or]:()=>({left:_-g/2+h+b-m,top:d+f+y-p})}[i]()};class lr extends y().Component{constructor(){var e;super(...arguments),e=this,f(this,"_placeInProgress",!1),f(this,"state",{floatingPosition:void 0}),f(this,"_menuContainer",null),f(this,"_menuBody",null),f(this,"startSentinel",y().createRef()),f(this,"endSentinel",y().createRef()),f(this,"_updateMenuSize",(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e._menuBody;if(!r)return;const{menuOffset:i={},menuDirection:a}=t,{menuOffset:o={},menuDirection:s}=e.props;if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return typeof e!=typeof t||(Object(t)===t&&"function"!=typeof t?e.top!==t.top||e.left!==t.left:e!==t)}(i,o)||a!==s||n){const{flipped:t,triggerRef:i,updateOrientation:a}=e.props,{current:l}=i,c=r.getBoundingClientRect(),u=l&&l.getBoundingClientRect(),d="function"!=typeof o?o:o(r,s,l,t);a&&a({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}}),(c.width>0&&c.height>0||!d)&&e.setState({floatingPosition:sr({menuSize:c,refPosition:u,direction:s,offset:d,scrollX:Kn().pageXOffset,scrollY:Kn().pageYOffset,container:{rect:e.props.target().getBoundingClientRect(),position:getComputedStyle(e.props.target()).position}})},(()=>{n||r.getBoundingClientRect()!==c&&e._updateMenuSize(e.props,!0)}))}})),f(this,"_focusMenuContent",(e=>{const t=e.querySelector(this.props.selectorPrimaryFocus||null),n=e.querySelector(er),r=e.querySelector("\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n");(t||n||r||e).focus()})),f(this,"_menuRef",(e=>{const{menuRef:t}=this.props;this._placeInProgress=!!e,t&&t(this._menuBody=e),e&&this._updateMenuSize()})),f(this,"_getChildrenWithProps",(()=>{const{styles:e,children:t}=this.props,{floatingPosition:n}=this.state,r=n?{left:`${n.left}px`,top:`${n.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return y().cloneElement(t,{ref:this._menuRef,style:{...e,...r,position:"absolute",opacity:1}})})),f(this,"handleBlur",(e=>{let{target:t,relatedTarget:n}=e;if(n&&t){const{current:e}=this.startSentinel,{current:r}=this.endSentinel;!function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:a,selectorsFloatingMenus:o}=e;if(t&&i&&a&&!t.contains(i)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e&&"function"==typeof e.closest)return[".cds--overflow-menu-options",".cds--tooltip",".flatpickr-calendar",...t].some((t=>e.closest(t)))}(i,o)){const e=a.compareDocumentPosition(i);if(i===n||e&Qn){const e=nr()(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==a&&t.focus()}else if(i===r||e&Jn){const e=Array.prototype.find.call(t.querySelectorAll(er),(e=>Boolean(e.offsetParent)));e?e.focus():t!==a&&t.focus()}}}({bodyNode:this._menuBody,startSentinelNode:e,endSentinelNode:r,currentActiveNode:n,oldActiveNode:t})}}))}componentWillUnmount(){this.hResize.release()}componentDidMount(){this.hResize=Xn.add((()=>{this._updateMenuSize()}))}componentDidUpdate(e){this._updateMenuSize(e);const{onPlace:t}=this.props;this._placeInProgress&&this.state.floatingPosition&&(this._menuBody&&!this._menuBody.contains(document.activeElement)&&this._focusMenuContent(this._menuBody),"function"==typeof t&&(t(this._menuBody),this._placeInProgress=!1))}render(){const{context:e}=this;if("undefined"!=typeof document){const{focusTrap:t,target:n}=this.props;return jn.createPortal(y().createElement("div",{onBlur:t?this.handleBlur:null},y().createElement("span",{ref:this.startSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel"),this._getChildrenWithProps(),y().createElement("span",{ref:this.endSentinel,tabIndex:"0",role:"link",className:`${e}--visually-hidden`},"Focus sentinel")),n?n():document.body)}return null}}f(lr,"contextType",b),f(lr,"propTypes",{children:E().object,flipped:E().bool,focusTrap:E().bool,menuDirection:E().oneOf([rr,ir,ar,or]),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuRef:E().func,onPlace:E().func,selectorPrimaryFocus:E().string,styles:E().object,target:E().func,triggerRef:E().oneOfType([E().func,E().shape({current:E().any})]),updateOrientation:E().func}),f(lr,"defaultProps",{menuOffset:{},menuDirection:or,updateOrientation:null});var cr=lr;const ur=T(),dr={[ir]:"bottom",[or]:"top"},hr=(e,t,n,r)=>{const i=dr[t],{offsetWidth:a,offsetHeight:o}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(a/2-(n?n.offsetWidth:0)/2),top:0};case"left":case"right":return{left:0,top:(r?-1:1)*(o/2-(n?n.offsetHeight:0)/2)}}};class fr extends v.Component{constructor(){super(...arguments),f(this,"state",{}),f(this,"instanceId",ur()),f(this,"_hFocusIn",null),f(this,"_hBlurTimeout",void 0),f(this,"_triggerRef",y().createRef()),f(this,"handleClick",(e=>{e.stopPropagation(),this._menuBody&&this._menuBody.contains(e.target)||(this.setState({open:!this.state.open}),this.props.onClick(e))})),f(this,"closeMenuAndFocus",(()=>{let e=this.state.open;this.closeMenu((()=>{e&&this.focusMenuEl()}))})),f(this,"handleKeyPress",(e=>{this.state.open&&B(e,[W,q,Z,G])&&e.preventDefault(),B(e,[j])&&(this.closeMenuAndFocus(),e.stopPropagation())})),f(this,"handleClickOutside",(e=>{!this.state.open||this._menuBody&&this._menuBody.contains(e.target)||this.closeMenu()})),f(this,"closeMenu",(e=>{this.setState({open:!1},(()=>{e&&e(),this.props.onClose()}))})),f(this,"focusMenuEl",(()=>{const{current:e}=this._triggerRef;e&&e.focus()})),f(this,"handleOverflowMenuItemFocus",(e=>{let{currentIndex:t,direction:n}=e;const r=y().Children.toArray(this.props.children).reduce(((e,t,n)=>(t.props.disabled||e.push(n),e)),[]),i=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),a=this[`overflowMenuItem${r[i]}`];a?.focus()})),f(this,"_bindMenuBody",(e=>{e||(this._menuBody=e),!e&&this._hFocusIn&&(this._hFocusIn=this._hFocusIn.release())})),f(this,"_handlePlace",(e=>{if(e){this._menuBody=e;const t="onfocusin"in window,n=t?"focusin":"focus";this._hFocusIn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener(...n),{release:()=>(e.removeEventListener(...n),null)}}(e.ownerDocument,n,(t=>{const n=Zn.getEventTarget(t),{current:r}=this._triggerRef;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${this.context}--overflow-menu,.${this.context}--overflow-menu-options`)||this.closeMenuAndFocus())}),!t),this.props.onOpen()}})),f(this,"_getTarget",(()=>{const{current:e}=this._triggerRef;return e&&e.closest("[data-floating-menu-container]")||document.body}))}componentDidUpdate(e,t){const{onClose:n}=this.props;!this.state.open&&t.open&&n()}componentDidMount(){this._triggerRef.current&&this.setState({hasMountedTrigger:!0})}static getDerivedStateFromProps(e,t){let{open:n}=e;const{prevOpen:r}=t;return r===n?null:{open:n,prevOpen:n}}componentWillUnmount(){"number"==typeof this._hBlurTimeout&&(clearTimeout(this._hBlurTimeout),this._hBlurTimeout=void 0)}render(){const e=this.context,{id:t,"aria-label":n,ariaLabel:r,children:i,iconDescription:a,direction:o,flipped:s,focusTrap:l,menuOffset:c,menuOffsetFlip:u,iconClass:d,onClick:h,onOpen:f,selectorPrimaryFocus:m="[data-floating-menu-primary-focus]",renderIcon:v,innerRef:b,menuOptionsClass:_,light:w,size:E="md",...x}=this.props,{open:S}=this.state,O=g()(this.props.className,`${e}--overflow-menu`,{[`${e}--overflow-menu--open`]:S,[`${e}--overflow-menu--light`]:w,[`${e}--overflow-menu--${E}`]:E}),C=g()(_,`${e}--overflow-menu-options`,{[`${e}--overflow-menu--flip`]:this.props.flipped,[`${e}--overflow-menu-options--open`]:S,[`${e}--overflow-menu-options--light`]:w,[`${e}--overflow-menu-options--${E}`]:E}),T=g()(`${e}--overflow-menu__icon`,d),A=y().Children.toArray(i).map(((e,t)=>y().cloneElement(e,{closeMenu:e?.props?.closeMenu||this.closeMenuAndFocus,handleOverflowMenuItemFocus:this.handleOverflowMenuItemFocus,ref:e=>{this[`overflowMenuItem${t}`]=e},index:t}))),M=`overflow-menu-${this.instanceId}__menu-body`,k=y().createElement("ul",{className:C,tabIndex:"-1",role:"menu","aria-label":n||r,onKeyDown:this.handleKeyPress,id:M},A),L=y().createElement(cr,{focusTrap:l,triggerRef:this._triggerRef,menuDirection:o,menuOffset:s?u:c,menuRef:this._bindMenuBody,flipped:this.props.flipped,target:this._getTarget,onPlace:this._handlePlace,selectorPrimaryFocus:this.props.selectorPrimaryFocus},y().cloneElement(k,{"data-floating-menu-direction":o})),D={className:T,"aria-label":a};return y().createElement(Zn,{onClickOutside:this.handleClickOutside},y().createElement("span",{className:`${e}--overflow-menu__wrapper`,"aria-owns":S?M:null},y().createElement(ce,p({},x,{type:"button","aria-haspopup":!0,"aria-expanded":this.state.open,"aria-controls":S?M:null,className:O,onClick:this.handleClick,id:t,ref:fn(this._triggerRef,b),size:E,label:a}),y().createElement(v,D)),S&&this.state.hasMountedTrigger&&L))}}f(fr,"propTypes",{"aria-label":E().string,ariaLabel:I(E().string),children:E().node,className:E().string,direction:E().oneOf([ir,or]),flipped:E().bool,focusTrap:E().bool,iconClass:E().string,iconDescription:E().string.isRequired,id:E().string,light:I(E().bool),menuOffset:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOffsetFlip:E().oneOfType([E().shape({top:E().number,left:E().number}),E().func]),menuOptionsClass:E().string,onClick:E().func,onClose:E().func,onFocus:E().func,onKeyDown:E().func,onOpen:E().func,open:E().bool,renderIcon:E().oneOfType([E().func,E().object]),selectorPrimaryFocus:E().string,size:E().oneOf(["sm","md","lg"])}),f(fr,"contextType",b),f(fr,"defaultProps",{"aria-label":null,iconDescription:"Options",open:!1,direction:or,flipped:!1,focusTrap:!0,renderIcon:Un,onClick:()=>{},onKeyDown:()=>{},onClose:()=>{},onOpen:()=>{},menuOffset:hr,menuOffsetFlip:hr,selectorPrimaryFocus:"[data-overflow-menu-primary-focus]"});const pr=function(e){function t(t){return y().createElement(e,t)}const n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t}(fr);function mr(e){return ct("enable-v12-overflowmenu")?y().createElement(qn,e):y().createElement(pr,e)}mr.displayName="OverflowMenu";const gr="Settings",vr=e=>{let{className:t,renderIcon:n,iconDescription:r=gr,children:i,...a}=e;const o=_(),s=g()(t,`${o}--toolbar-action ${o}--overflow-menu`);return y().createElement(mr,p({"aria-label":r,renderIcon:n,className:s,title:r,iconDescription:r,flipped:!0},a),i)};vr.defaultProps={renderIcon:Mn,iconDescription:gr},vr.propTypes={children:E().node.isRequired,className:E().string,iconDescription:E().string.isRequired,renderIcon:E().oneOfType([E().func,E().object])};const yr=$t(),br={expandRow:"carbon.table.row.expand",collapseRow:"carbon.table.row.collapse",expandAll:"carbon.table.all.expand",collapseAll:"carbon.table.all.collapse",selectAll:"carbon.table.all.select",unselectAll:"carbon.table.all.unselect",selectRow:"carbon.table.row.select",unselectRow:"carbon.table.row.unselect"},_r={[br.expandAll]:"Expand all rows",[br.collapseAll]:"Collapse all rows",[br.expandRow]:"Expand current row",[br.collapseRow]:"Collapse current row",[br.selectAll]:"Select all rows",[br.unselectAll]:"Unselect all rows",[br.selectRow]:"Select row",[br.unselectRow]:"Unselect row"},wr={filterRows:e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:a}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const o=a(e,n);return"boolean"!=typeof r[o].value&&(""+r[o].value).toLowerCase().includes(i.toLowerCase())}))))},locale:"en",overflowMenuOnHover:!0,size:"lg",sortRow:(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:a}=n;return r===i.ASC?kt(e,t,a):kt(t,e,a)},translateWithId:e=>_r[e]};class Er extends y().Component{constructor(e){var t;super(e),t=this,f(this,"instanceId",void 0),f(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:a,sortHeaderKey:o}=this.state;return{...i,key:t.key,sortDirection:a,isSortable:r,isSortHeader:o===t.key,onClick:e=>{const r=Rt(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),f(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props,{isExpandedAll:a,rowIds:o,rowsById:s}=t.state,l=a||o.every((e=>s[e].isExpanded)),c=l?br.collapseAll:br.expandAll;return{...r,ariaLabel:i(c),"aria-label":i(c),"aria-controls":o.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:ue([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),f(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),f(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),f(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i}=this.props,a=t.isExpanded?br.collapseRow:br.expandRow;return{...r,key:t.id,onExpand:ue([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,ariaLabel:i(a),"aria-label":i(a),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),f(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),f(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i}=t.props;if(n){const a=n.isSelected?br.unselectRow:br.selectRow;return{...r,checked:n.isSelected,onSelect:ue([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:"select-row",ariaLabel:i(a),disabled:n.disabled,radio:t.props.radio||null}}const a=t.state.rowIds.length,o=t.getSelectedRows().length,s=a>0&&o===a,l=a>0&&o>0&&o!==a,c=s||l?br.unselectAll:br.selectAll;return{...r,ariaLabel:i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:"select-all",onSelect:ue([t.handleSelectAll,e])}})),f(this,"getToolbarProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{size:n}=t.props;return{...e,size:"xs"===n||"sm"===n?"sm":void 0}})),f(this,"getBatchActionProps",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{shouldShowBatchActions:n}=t.state,r=t.getSelectedRows().length;return{onSelectAll:void 0,totalCount:t.state.rowIds.length||0,...e,shouldShowBatchActions:n&&r>0,totalSelected:r,onCancel:t.handleOnCancel}})),f(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:a,experimentalAutoAlign:o}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:a,experimentalAutoAlign:o}})),f(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),f(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),f(this,"getFilteredRowIds",(()=>{const e="string"==typeof this.state.filterInputValue?this.props.filterRows({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:Mt}):this.state.rowIds;return 0==e.length?[]:e})),f(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),f(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,a)=>{const o={...e.rowsById[a]};return o.disabled||i&&!n.includes(a)||(o.isSelected=t),r[a]=o,r}),{})}})),f(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),f(this,"handleSelectAll",(()=>{this.setState((e=>{const t=this.getFilteredRowIds(),{rowsById:n}=e,r=!(Object.values(n).filter((e=>e.isSelected&&!e.disabled)).length>0);return{shouldShowBatchActions:r,...this.setAllSelectedState(e,r,t)}}))})),f(this,"handleOnSelectRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e];if(this.props.radio)return{shouldShowBatchActions:!1,rowsById:{...Object.entries(t.rowsById).reduce(((e,t)=>{const[n,r]=t;return r.isSelected=!1,e[n]=r,e}),{}),[e]:{...n,isSelected:!n.isSelected}}};const r=t.rowIds.filter((e=>t.rowsById[e].isSelected)).length,i=n.isSelected?r-1:r+1;return{shouldShowBatchActions:!n.isSelected||i>0,rowsById:{...t.rowsById,[e]:{...n,isSelected:!n.isSelected}}}}))})),f(this,"handleOnExpandRow",(e=>()=>{this.setState((t=>{const n=t.rowsById[e],{isExpandedAll:r}=t;return{isExpandedAll:!n.isExpanded&&r,rowsById:{...t.rowsById,[e]:{...n,isExpanded:!n.isExpanded}}}}))})),f(this,"handleOnExpandAll",(()=>{this.setState((e=>{const{rowIds:t,isExpandedAll:n}=e;return{isExpandedAll:!n,rowsById:t.reduce(((t,r)=>({...t,[r]:{...e.rowsById[r],isExpanded:!n}})),{})}}))})),f(this,"handleSortBy",(e=>()=>{this.setState((t=>Rt(this.props,t,{key:e})))})),f(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...It(e,{}),isExpandedAll:!1},this.instanceId=yr()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!Tt()(t,n))return this.setState((e=>It(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!Tt()(r,i))return this.setState((e=>It(this.props,e))),!1;if(!Tt()(e.rows,this.props.rows))return this.setState((e=>It(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:a,rowsById:o,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:a,headers:n,cellsById:s,inputValue:i,getCellId:Mt}):a,c={rows:Pt(l,o,s),headers:this.props.headers,selectedRows:Pt(this.getSelectedRows(),o,s),getHeaderProps:this.getHeaderProps,getExpandHeaderProps:this.getExpandHeaderProps,getRowProps:this.getRowProps,getExpandedRowProps:this.getExpandedRowProps,getSelectionProps:this.getSelectionProps,getToolbarProps:this.getToolbarProps,getBatchActionProps:this.getBatchActionProps,getTableProps:this.getTableProps,getTableContainerProps:this.getTableContainerProps,onInputChange:this.handleOnInputValueChange,sortBy:e=>this.handleSortBy(e)(),selectAll:this.handleSelectAll,selectRow:e=>this.handleOnSelectRow(e)(),expandRow:e=>this.handleOnExpandRow(e)(),expandAll:this.handleOnExpandAll,radio:this.props.radio};return void 0!==r?r(c):void 0!==e?e(c):null}}var xr,Sr,Or,Cr;f(Er,"defaultProps",wr),f(Er,"propTypes",{experimentalAutoAlign:E().bool,filterRows:E().func,headers:E().arrayOf(E().shape({key:E().string.isRequired,header:E().node.isRequired})).isRequired,isSortable:E().bool,locale:E().string,overflowMenuOnHover:E().bool,radio:E().bool,rows:E().arrayOf(E().shape({id:E().string.isRequired,disabled:E().bool,isSelected:E().bool,isExpanded:E().bool})).isRequired,size:E().oneOf(["xs","sm","md","lg","xl"]),sortRow:E().func,stickyHeader:E().bool,translateWithId:E().func,useStaticWidth:E().bool,useZebraStyles:E().bool}),f(Er,"translationKeys",Object.values(br)),f(Er,"Table",void 0),f(Er,"TableActionList",void 0),f(Er,"TableBatchAction",void 0),f(Er,"TableBatchActions",void 0),f(Er,"TableBody",void 0),f(Er,"TableCell",void 0),f(Er,"TableContainer",void 0),f(Er,"TableExpandHeader",void 0),f(Er,"TableExpandRow",void 0),f(Er,"TableExpandedRow",void 0),f(Er,"TableHead",void 0),f(Er,"TableHeader",void 0),f(Er,"TableRow",void 0),f(Er,"TableSelectAll",void 0),f(Er,"TableSelectRow",void 0),f(Er,"TableToolbar",void 0),f(Er,"TableToolbarAction",void 0),f(Er,"TableToolbarContent",void 0),f(Er,"TableToolbarSearch",void 0),f(Er,"TableToolbarMenu",void 0),Er.Table=Ut,Er.TableActionList=Ft,Er.TableBatchAction=Ht,Er.TableBatchActions=qt,Er.TableBody=Zt,Er.TableCell=Yt,Er.TableContainer=Kt,Er.TableExpandHeader=Qt,Er.TableExpandRow=Jt,Er.TableExpandedRow=en,Er.TableHead=tn,Er.TableHeader=on,Er.TableRow=cn,Er.TableSelectAll=hn,Er.TableSelectRow=mn,Er.TableToolbar=yn,Er.TableToolbarAction=_n,Er.TableToolbarContent=wn,Er.TableToolbarSearch=Pn,Er.TableToolbarMenu=vr;const Tr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},xr||(xr=y().createElement("path",{d:"M5 8L0 4 5 0z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Sr||(Sr=y().createElement("path",{d:"M20 24L10 16 20 8z"})),n)})),Ar=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor",...i},Or||(Or=y().createElement("path",{d:"M0 0L5 4 0 8z"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Cr||(Cr=y().createElement("path",{d:"M12 8L22 16 12 24z"})),n)}));var Mr,kr,Lr,Dr,Rr,Nr,Ir,Pr,$r,Br,zr;const Ur=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Mr||(Mr=y().createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),kr||(kr=y().createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),Lr||(Lr=y().createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),n)})),jr=y().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Dr||(Dr=y().createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),Rr||(Rr=y().createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),n):20===r||"20"===r||"20px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},Nr||(Nr=y().createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),Ir||(Ir=y().createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),n):24===r||"24"===r||"24px"===r?y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Pr||(Pr=y().createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),$r||($r=y().createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),n):y().createElement(ve.I,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Br||(Br=y().createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),zr||(zr=y().createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),n)})),Fr=T(),Vr=y().forwardRef((function(e,t){let{className:n,id:r,inline:i=!1,labelText:a,disabled:o=!1,children:s,noLabel:l=!1,hideLabel:c=!1,invalid:u=!1,invalidText:d,helperText:h,light:f=!1,readOnly:m,size:b,warn:w=!1,warnText:E,onChange:x,...S}=e;const O=_(),{isFluid:T}=(0,v.useContext)(kn),[A,M]=(0,v.useState)(!1),[k,L]=(0,v.useState)(""),{current:D}=(0,v.useRef)(Fr()),R=g()({[`${O}--select`]:!0,[`${O}--select--inline`]:i,[`${O}--select--light`]:f,[`${O}--select--invalid`]:u,[`${O}--select--disabled`]:o,[`${O}--select--readonly`]:m,[`${O}--select--warning`]:w,[`${O}--select--fluid--invalid`]:T&&u,[`${O}--select--fluid--focus`]:T&&A}),N=g()(`${O}--label`,{[`${O}--visually-hidden`]:c,[`${O}--label--disabled`]:o}),I=g()({[`${O}--select-input`]:!0,[`${O}--select-input--${b}`]:b}),P=`${r}-error-msg`,$=u?d:w?E:void 0,B=u||w?y().createElement("div",{className:`${O}--form-requirement`,id:P},$):null,z=g()(`${O}--form__helper-text`,{[`${O}--form__helper-text--disabled`]:o}),U=h?`select-helper-text-${D}`:void 0,j=h?y().createElement("div",{id:U,className:z},h):null,F={};u?F["aria-describedby"]=P:i||T||(F["aria-describedby"]=j?U:void 0);const V=e=>{M("focus"===e.type)},H={onMouseDown:e=>{m&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{m&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}},G=y().createElement(y().Fragment,null,y().createElement("select",p({},S,F,{id:r,className:I,disabled:o||void 0,"aria-invalid":u||void 0,"aria-readonly":m||void 0,title:k,onChange:ue([x,e=>{L(e?.target?.value)}])},H,{ref:t}),s),y().createElement(C._M,{className:`${O}--select__arrow`}),u&&y().createElement(jr,{className:`${O}--select__invalid-icon`}),!u&&w&&y().createElement(Ur,{className:`${O}--select__invalid-icon ${O}--select__invalid-icon--warning`}));return y().createElement("div",{className:g()(`${O}--form-item`,n)},y().createElement("div",{className:R},!l&&y().createElement("label",{htmlFor:r,className:N},a),i&&y().createElement("div",{className:`${O}--select-input--inline__wrapper`},y().createElement("div",{className:`${O}--select-input__wrapper`,"data-invalid":u||null},G),B),!i&&y().createElement("div",{className:`${O}--select-input__wrapper`,"data-invalid":u||null,onFocus:V,onBlur:V},G,T&&y().createElement("hr",{className:`${O}--select__divider`}),T&&B?B:null),i||T||!B?j:B))}));Vr.displayName="Select",Vr.propTypes={children:E().node,className:E().string,defaultValue:E().any,disabled:E().bool,helperText:E().node,hideLabel:E().bool,id:E().string.isRequired,inline:E().bool,invalid:E().bool,invalidText:E().node,labelText:E().node,light:I(E().bool),noLabel:E().bool,onChange:E().func,readOnly:E().bool,size:E().oneOf(["sm","md","lg"]),warn:E().bool,warnText:E().node},Vr.defaultProps={disabled:!1,labelText:"Select",inline:!1,invalid:!1,invalidText:"",helperText:""};const Hr=e=>{let{className:t,value:n,disabled:r,hidden:i,text:a,...o}=e;const s=_(),l=g()({[`${s}--select-option`]:!0,...t&&{[t]:t}});return y().createElement("option",p({},o,{className:l,value:n,disabled:r,hidden:i}),a)};var Gr,Wr;function qr(e){return"object"==typeof e[0]&&null!==e[0]?e:e.map((e=>({text:e,value:e})))}function Zr(e,t){return t&&e.find((e=>t===e.value))?t:e[0].value}Hr.propTypes={className:E().string,disabled:E().bool,hidden:E().bool,text:E().string.isRequired,value:E().any.isRequired},Hr.defaultProps={disabled:!1,hidden:!1,value:"",text:""};const Yr=y().forwardRef((function(e,t){let{backwardText:n="Previous page",className:r,disabled:i=!1,forwardText:a="Next page",id:o,isLastPage:s=!1,itemText:l=((e,t)=>`${e}–${t} items`),itemRangeText:c=((e,t,n)=>`${e}–${t} of ${n} items`),itemsPerPageText:u="Items per page:",onChange:d,pageNumberText:h="Page Number",pageRangeText:f=((e,t)=>`of ${t} ${1===t?"page":"pages"}`),page:m=1,pageInputDisabled:b,pageSize:w,pageSizeInputDisabled:E,pageSizes:x,pageText:S=((e,t)=>`page ${t?"":e}`),pagesUnknown:O=!1,size:C="md",totalItems:T,...A}=e;const M=_(),k=function(e){const t=R();return e??t}(o),L=(0,v.useRef)(null),D=(0,v.useRef)(null),[N,I]=(0,v.useState)((()=>qr(x))),[P,$]=(0,v.useState)(x),[B,z]=(0,v.useState)(m),[U,j]=(0,v.useState)(m),[F,V]=(0,v.useState)((()=>Zr(N,w))),[H,G]=(0,v.useState)(w),W=g()({[`${M}--pagination`]:!0,[`${M}--pagination--${C}`]:C,[r]:!!r}),q=Math.max(Math.ceil(T/F),1),Z=i||1===B,Y=g()({[`${M}--pagination__button`]:!0,[`${M}--pagination__button--backward`]:!0,[`${M}--pagination__button--no-index`]:Z}),K=i||B===q,X=g()({[`${M}--pagination__button`]:!0,[`${M}--pagination__button--forward`]:!0,[`${M}--pagination__button--no-index`]:K}),Q=function(e){let t=1,n=[];for(;t<=e;)n.push(y().createElement(Hr,{key:t,value:t,text:String(t)})),t++;return n}(q);if(m!==U&&(z(m),j(m)),w!==H&&(V(Zr(N,w)),G(w)),!function(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;if(e===t)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,P)){const e=qr(x),t=e.find((e=>e.value===F));t||z(1),I(e),$(x)}return y().createElement("div",p({className:W,ref:t},A),y().createElement("div",{className:`${M}--pagination__left`},y().createElement("label",{id:`${M}-pagination-select-${k}-count-label`,className:`${M}--pagination__text`,htmlFor:`${M}-pagination-select-${k}`},u),y().createElement(Vr,{id:`${M}-pagination-select-${k}`,className:`${M}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};z(t.page),V(t.pageSize),d&&d(t)},disabled:E||i,value:F},N.map((e=>y().createElement(Hr,{key:e.value,value:e.value,text:String(e.text)})))),y().createElement("span",{className:`${M}--pagination__text ${M}--pagination__items-count`},O?l(F*(B-1)+1,B*F):c(Math.min(F*(B-1)+1,T),Math.min(B*F,T),T))),y().createElement("div",{className:`${M}--pagination__right`},O?y().createElement("span",{className:`${M}--pagination__text ${M}--pagination__page-text`},O?S(B,O):f(B,q)):null,y().createElement(Vr,{id:`${M}-pagination-select-${k}-right`,className:`${M}--select__page-number`,labelText:`Page number, of ${q} pages`,inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&t<=Math.max(Math.ceil(T/F),1)&&(z(t),d&&d({page:t,pageSize:F}))},value:B,disabled:b||i},Q),O?null:y().createElement("span",{className:`${M}--pagination__text`},O?S(B,O):f(B,q)),y().createElement("div",{className:`${M}--pagination__control-buttons`},y().createElement(ce,{align:"top",disabled:Z,kind:"ghost",className:Y,label:n,onClick:function(){const e=B-1;z(e),1===e&&D.current.focus(),d&&d({page:e,pageSize:F,forwardBtnRef:D})},ref:L},Gr||(Gr=y().createElement(Tr,null))),y().createElement(ce,{align:"top-right",disabled:K||s,kind:"ghost",className:X,label:a,onClick:function(){const e=B+1;z(e),e===q&&L.current.focus(),d&&d({page:e,pageSize:F,backBtnRef:L})},ref:D},Wr||(Wr=y().createElement(Ar,null))))))}));Yr.propTypes={backwardText:E().string,className:E().string,disabled:E().bool,forwardText:E().string,id:E().oneOfType([E().string,E().number]),isLastPage:E().bool,itemRangeText:E().func,itemText:E().func,itemsPerPageText:E().string,onChange:E().func,page:E().number,pageInputDisabled:E().bool,pageNumberText:E().string,pageRangeText:E().func,pageSize:E().number,pageSizeInputDisabled:E().bool,pageSizes:E().oneOfType([E().arrayOf(E().number),E().arrayOf(E().shape({text:E().text,value:E().number}))]).isRequired,pageText:E().func,pagesUnknown:E().bool,size:E().oneOf(["sm","md","lg"]),totalItems:E().number};var Kr=Yr},8230:(e,t)=>{"use strict";var n=Symbol.for("react.element");Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}},9074:(e,t,n)=>{"use strict";e.exports=n(8230)},321:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},o=[],s=0;s<e.length;s++){var l=e[s],c=r.base?l[0]+r.base:l[0],u=a[c]||0,d="".concat(c," ").concat(u);a[c]=u+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:p,references:1})}o.push(d)}return o}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var a=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var s=n(a[o]);t[s].references--}for(var l=r(e,i),c=0;c<a.length;c++){var u=n(a[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=l}}},3275:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},2094:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7162:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},1195:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},757:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},4512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-generic-patient-widgets__obs-graph__label01___nqHbU,.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT{display:flex;margin:0rem 1rem;flex-direction:row;justify-content:space-between}.-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph{flex-grow:1;margin:.5rem 0;padding-right:1rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve{flex-grow:4;padding:0 1rem 3rem}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .cds--cc--layout-row{height:0}.-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve .layout-child{margin-top:.5rem}.-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin{margin-bottom:1rem;display:inline-block}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw{margin:1rem 0;scroll-behavior:smooth}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw>ul{flex-direction:column !important}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item{margin-left:0rem}.-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw .cds--tabs--scrollable .cds--tabs--scrollable__nav-link{border-bottom:0 !important;border-left:2px solid #c6c6c6}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi{outline:0;outline-offset:0}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:active,.-esm-generic-patient-widgets__obs-graph__tab___dw7mi:focus{outline:2px solid var(--brand-03) !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=true]{border-left:3px solid var(--brand-03);border-bottom:none;font-weight:600;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tab___dw7mi[aria-selected=false]{border-bottom:none;border-left:2px solid #e0e0e0;margin-left:0rem !important}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm .cds--tab--list{flex-direction:column;max-height:fit-content;overflow-x:visible}.-esm-generic-patient-widgets__obs-graph__tablist___f25Mm>button .cds--tabs .cds--tabs__nav-link{border-bottom:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-graph/obs-graph.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yHC81BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CD11BJ,8DC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDt1BJ,iEACE,YAAA,CACA,gBAAA,CACA,kBAAA,CACA,6BAAA,CAGF,oEACE,WAAA,CACA,cAAA,CACA,kBESW,CFNb,qEACE,WAAA,CACA,mBAAA,CAEA,0FACE,QAAA,CAGF,mFACE,gBEbS,CFiBb,+DAEE,kBETW,CFUX,oBAAA,CAGF,+DACE,aAAA,CACA,sBAAA,CAEA,kEACE,gCAAA,CAGF,wJACE,gBAAA,CAGF,uHACE,0BAAA,CACA,6BAAA,CAIJ,sDACE,SAAA,CACA,gBAAA,CAEA,yHACE,4CAAA,CAGF,0EACE,qCAAA,CACA,kBAAA,CACA,eAAA,CACA,2BAAA,CAGF,2EACE,kBAAA,CACA,6BAAA,CACA,2BAAA,CAKF,0EACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CAGF,iGACE,kBAAA",sourceRoot:""}]),o.locals={label01:"-esm-generic-patient-widgets__obs-graph__label01___nqHbU",conceptLabel:"-esm-generic-patient-widgets__obs-graph__conceptLabel___JcAin",bodyShort01:"-esm-generic-patient-widgets__obs-graph__bodyShort01___MXPMj",graphContainer:"-esm-generic-patient-widgets__obs-graph__graphContainer___peSeT",conceptPickerTabs:"-esm-generic-patient-widgets__obs-graph__conceptPickerTabs___Gk0Ph",lineChartContainer:"-esm-generic-patient-widgets__obs-graph__lineChartContainer___DWcve",verticalTabs:"-esm-generic-patient-widgets__obs-graph__verticalTabs___PGFpw",tab:"-esm-generic-patient-widgets__obs-graph__tab___dw7mi",tablist:"-esm-generic-patient-widgets__obs-graph__tablist___f25Mm"};const s=o},1897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;border:1px solid #e0e0e0}.-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem}.-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI{width:fit-content;margin:0 .5rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg{padding:.5rem;color:#0f62fe;min-height:0px}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary{border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--tooltip__trigger:active:not([disabled]){border-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:active{border-color:#0f62fe;background-color:#edf5ff;color:#edf5ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:focus{background-color:#0f62fe;color:#fff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--tertiary:hover{color:#fff;background-color:#0f62fe}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost{border-color:#a6c8ff}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg.cds--btn--ghost:hover{color:#000;background-color:#f4f4f4}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type{border-radius:.25rem 0 0 .25rem}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:first-of-type.cds--btn--ghost{border-right:0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type{border-radius:0 .25rem .25rem 0}.-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg:last-of-type.cds--btn--ghost{border-left:0rem}.-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6{background-color:#fff;position:relative}.-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq{align-items:center;display:flex;flex:1 1 0%;justify-content:end}.-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ{align-items:center;display:flex;flex:1 1 0%;justify-content:end}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/obs-switchable/obs-switchable.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCpDF,uEACE,qBDGc,CCFd,wBAAA,CAGF,uEACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CAGF,qEACE,iBAAA,CACA,cAAA,CAGF,8DACE,aAAA,CACA,aDDe,CCEf,cAAA,CAEA,iFACE,oBDLa,CCQf,2GACE,oBDTa,CCYf,wFACE,oBDba,CCcb,wBAAA,CACA,aAAA,CAGF,uFACE,wBDnBa,CCoBb,UDlCY,CCqCd,uFACE,UDtCY,CCuCZ,wBDzBa,CC4Bf,8EACE,oBAAA,CAGF,oFACE,UAAA,CACA,wBDvDI,CC2DR,4EACE,+BAAA,CAEA,4FACE,cAAA,CAIJ,2EACE,+BAAA,CAEA,2FACE,gBAAA,CAIJ,uEACE,qBDrEc,CCsEd,iBAAA,CAGF,yEACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA,CAGF,uFACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,mBAAA",sourceRoot:""}]),o.locals={widgetContainer:"-esm-generic-patient-widgets__obs-switchable__widgetContainer___MDvE6",headerContainer:"-esm-generic-patient-widgets__obs-switchable__headerContainer___Nd3VW",toggleButtons:"-esm-generic-patient-widgets__obs-switchable__toggleButtons___ObgOI",toggle:"-esm-generic-patient-widgets__obs-switchable__toggle___IoDvg",headerActionItems:"-esm-generic-patient-widgets__obs-switchable__headerActionItems___yfiRq",backgroundDataFetchingIndicator:"-esm-generic-patient-widgets__obs-switchable__backgroundDataFetchingIndicator___V8vgZ"};const s=o},5136:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,".-esm-generic-patient-widgets__obs-table__customRow___Kp7z_ tbody{white-space:nowrap}.-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK{width:max-content;max-width:300px}","",{version:3,sources:["webpack://./src/obs-table/obs-table.scss"],names:[],mappings:"AAAA,kEACE,kBAAA,CAGF,8DACE,iBAAA,CACA,eAAA",sourceRoot:""}]),o.locals={customRow:"-esm-generic-patient-widgets__obs-table__customRow___Kp7z_",tableHeader:"-esm-generic-patient-widgets__obs-table__tableHeader___i_IBK"};const s=o},2609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,a){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&o[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[t].concat([a]).join("\n")}return[t].join("\n")}},7677:e=>{"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},594:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||o.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,a,o,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=i;return r=i=void 0,c=t,o=e.apply(a,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function _(){var e=p();if(b(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return d?f(n,a-(e-c)):n}(e))}function w(e){return s=void 0,v&&r?y(e):(r=i=void 0,o)}function E(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(_,t),u?y(e):o}(l);if(d)return s=setTimeout(_,t),y(l)}return void 0===s&&(s=setTimeout(_,t)),o}return t=g(t)||0,m(n)&&(u=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?o:w(p())},E}},8431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,a=2,o=1/0,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",y="[object Promise]",b="[object RegExp]",_="[object Set]",w="[object String]",E="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,A=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/^\s+|\s+$/g,L=/\\(\\)?/g,D=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,N=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,P=/^(?:0|[1-9]\d*)$/,$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$[l]=$[c]=$[S]=$[u]=$[O]=$[d]=$[h]=$[f]=$[m]=$[g]=$[v]=$[b]=$[_]=$[w]=$[x]=!1;var B=parseInt,z="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,U="object"==typeof self&&self&&self.Object===Object&&self,j=z||U||Function("return this")(),F=t&&!t.nodeType&&t,V=F&&e&&!e.nodeType&&e,H=V&&V.exports===F&&z.process,G=function(){try{return H&&H.binding("util")}catch(e){}}(),W=G&&G.isTypedArray;function q(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function Z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function Y(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var X,Q,J,ee=Array.prototype,te=Function.prototype,ne=Object.prototype,re=j["__core-js_shared__"],ie=(X=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",ae=te.toString,oe=ne.hasOwnProperty,se=ne.toString,le=RegExp("^"+ae.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=j.Symbol,ue=j.Uint8Array,de=ne.propertyIsEnumerable,he=ee.splice,fe=(Q=Object.keys,J=Object,function(e){return Q(J(e))}),pe=Math.max,me=Math.min,ge=Ve(j,"DataView"),ve=Ve(j,"Map"),ye=Ve(j,"Promise"),be=Ve(j,"Set"),_e=Ve(j,"WeakMap"),we=Ve(Object,"create"),Ee=Xe(ge),xe=Xe(ve),Se=Xe(ye),Oe=Xe(be),Ce=Xe(_e),Te=ce?ce.prototype:void 0,Ae=Te?Te.valueOf:void 0,Me=Te?Te.toString:void 0;function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Le(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){var t=-1,n=e?e.length:0;for(this.__data__=new De;++t<n;)this.add(e[t])}function Ne(e){this.__data__=new Le(e)}function Ie(e,t){for(var n=e.length;n--;)if(tt(e[n][0],t))return n;return-1}function Pe(e,t){for(var n=0,r=(t=We(t,e)?[t]:Ue(t)).length;null!=e&&n<r;)e=e[Ke(t[n++])];return n&&n==r?e:void 0}function $e(e,t){return null!=e&&t in Object(e)}function Be(e,t,n,r,o){return e===t||(null==e||null==t||!st(e)&&!lt(t)?e!=e&&t!=t:function(e,t,n,r,o,s){var f=rt(e),p=rt(t),y=c,x=c;f||(y=(y=He(e))==l?v:y),p||(x=(x=He(t))==l?v:x);var C=y==v&&!Z(e),T=x==v&&!Z(t),A=y==x;if(A&&!C)return s||(s=new Ne),f||ut(e)?je(e,t,n,r,o,s):function(e,t,n,r,o,s,l){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!r(new ue(e),new ue(t)));case u:case d:case g:return tt(+e,+t);case h:return e.name==t.name&&e.message==t.message;case b:case w:return e==t+"";case m:var c=Y;case _:var f=s&a;if(c||(c=K),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;s|=i,l.set(e,t);var v=je(c(e),c(t),r,o,s,l);return l.delete(e),v;case E:if(Ae)return Ae.call(e)==Ae.call(t)}return!1}(e,t,y,n,r,o,s);if(!(o&a)){var M=C&&oe.call(e,"__wrapped__"),k=T&&oe.call(t,"__wrapped__");if(M||k){var L=M?e.value():e,D=k?t.value():t;return s||(s=new Ne),n(L,D,r,o,s)}}return!!A&&(s||(s=new Ne),function(e,t,n,r,i,o){var s=i&a,l=dt(e),c=l.length;if(c!=dt(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:oe.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,o):r(m,g,d,e,t,o);if(!(void 0===v?m===g||n(m,g,r,i,o):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,s))}(e,t,Be,n,r,o))}function ze(e){return"function"==typeof e?e:null==e?ht:"object"==typeof e?rt(e)?function(e,t){return We(e)&&qe(t)?Ze(Ke(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Pe(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r,i=-1,a=(t=We(t,e)?[t]:Ue(t)).length;++i<a;){var o=Ke(t[i]);if(!(r=null!=e&&n(e,o)))break;e=e[o]}return r||!!(a=e?e.length:0)&&ot(a)&&Ge(o,a)&&(rt(e)||nt(e))}(e,t,$e)}(n,e):Be(t,r,void 0,i|a)}}(e[0],e[1]):(n=function(e){for(var t=dt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,qe(i)]}return t}(t=e),1==n.length&&n[0][2]?Ze(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var o=n.length,s=o;if(null==e)return!s;for(e=Object(e);o--;){var l=n[o];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var c=(l=n[o])[0],u=e[c],d=l[1];if(l[2]){if(void 0===u&&!(c in e))return!1}else{var h,f=new Ne;if(!(void 0===h?Be(d,u,r,i|a,f):h))return!1}}return!0}(e,0,n)}):We(r=e)?(o=Ke(r),function(e){return null==e?void 0:e[o]}):function(e){return function(t){return Pe(t,e)}}(r);var t,n,r,o}function Ue(e){return rt(e)?e:Ye(e)}function je(e,t,n,r,o,s){var l=o&a,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=o&i?new Re:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!q(t,(function(e,t){if(!p.has(t)&&(m===e||n(m,e,r,o,s)))return p.add(t)}))){f=!1;break}}else if(m!==g&&!n(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Fe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!st(e)||function(e){return!!ie&&ie in e}(e))&&(at(e)||Z(e)?le:N).test(Xe(e))}(n)?n:void 0}ke.prototype.clear=function(){this.__data__=we?we(null):{}},ke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ke.prototype.get=function(e){var t=this.__data__;if(we){var n=t[e];return n===r?void 0:n}return oe.call(t,e)?t[e]:void 0},ke.prototype.has=function(e){var t=this.__data__;return we?void 0!==t[e]:oe.call(t,e)},ke.prototype.set=function(e,t){return this.__data__[e]=we&&void 0===t?r:t,this},Le.prototype.clear=function(){this.__data__=[]},Le.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0||(n==t.length-1?t.pop():he.call(t,n,1),0))},Le.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?void 0:t[n][1]},Le.prototype.has=function(e){return Ie(this.__data__,e)>-1},Le.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new ke,map:new(ve||Le),string:new ke}},De.prototype.delete=function(e){return Fe(this,e).delete(e)},De.prototype.get=function(e){return Fe(this,e).get(e)},De.prototype.has=function(e){return Fe(this,e).has(e)},De.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Re.prototype.add=Re.prototype.push=function(e){return this.__data__.set(e,r),this},Re.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.clear=function(){this.__data__=new Le},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Le){var r=n.__data__;if(!ve||r.length<199)return r.push([e,t]),this;n=this.__data__=new De(r)}return n.set(e,t),this};var He=function(e){return se.call(e)};function Ge(e,t){return!!(t=null==t?s:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function We(e,t){if(rt(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ct(e))||T.test(e)||!C.test(e)||null!=t&&e in Object(t)}function qe(e){return e==e&&!st(e)}function Ze(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ge&&He(new ge(new ArrayBuffer(1)))!=O||ve&&He(new ve)!=m||ye&&He(ye.resolve())!=y||be&&He(new be)!=_||_e&&He(new _e)!=x)&&(He=function(e){var t=se.call(e),n=t==v?e.constructor:void 0,r=n?Xe(n):void 0;if(r)switch(r){case Ee:return O;case xe:return m;case Se:return y;case Oe:return _;case Ce:return x}return t});var Ye=et((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ct(e))return Me?Me.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return A.test(e)&&n.push(""),e.replace(M,(function(e,t,r,i){n.push(r?i.replace(L,"$1"):t||e)})),n}));function Ke(e){if("string"==typeof e||ct(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function Xe(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Qe,Je=(Qe=function(e,t,n){var r=e?e.length:0;if(!r)return-1;var i,a,s,l=r-1;return void 0!==n&&(a=(i=(s=n)?(s=function(e){if("number"==typeof e)return e;if(ct(e))return NaN;if(st(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=st(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(k,"");var n=R.test(e);return n||I.test(e)?B(e.slice(2),n?2:8):D.test(e)?NaN:+e}(s))===o||s===-o?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0)%1,l=i==i?a?i-a:i:0,l=n<0?pe(r+l,0):me(l,r-1)),function(e,t,n,r){e.length;for(var i=n+1;i--;)if(t(e[i],i,e))return i;return-1}(e,ze(t),l)},function(e,t,n){var r=Object(e);if(!it(e)){var i=ze(t);e=dt(e),t=function(e){return i(r[e],e,r)}}var a=Qe(e,t,n);return a>-1?r[i?e[a]:a]:void 0});function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(et.Cache||De),n}function tt(e,t){return e===t||e!=e&&t!=t}function nt(e){return function(e){return lt(e)&&it(e)}(e)&&oe.call(e,"callee")&&(!de.call(e,"callee")||se.call(e)==l)}et.Cache=De;var rt=Array.isArray;function it(e){return null!=e&&ot(e.length)&&!at(e)}function at(e){var t=st(e)?se.call(e):"";return t==f||t==p}function ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function lt(e){return!!e&&"object"==typeof e}function ct(e){return"symbol"==typeof e||lt(e)&&se.call(e)==E}var ut=W?function(e){return function(t){return e(t)}}(W):function(e){return lt(e)&&ot(e.length)&&!!$[se.call(e)]};function dt(e){return it(e)?function(e,t){var n=rt(e)||nt(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!oe.call(e,a)||i&&("length"==a||Ge(a,r))||n.push(a);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||ne))return fe(e);var t,n,r=[];for(var i in Object(e))oe.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e)}function ht(e){return e}e.exports=Je},3958:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",_="[object Proxy]",w="[object RegExp]",E="[object Set]",x="[object String]",S="[object Undefined]",O="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",A=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[s]=k[l]=k[C]=k[u]=k[T]=k[d]=k[h]=k[f]=k[m]=k[g]=k[y]=k[w]=k[E]=k[x]=k[O]=!1;var L="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,D="object"==typeof self&&self&&self.Object===Object&&self,R=L||D||Function("return this")(),N=t&&!t.nodeType&&t,I=N&&e&&!e.nodeType&&e,P=I&&I.exports===N,$=P&&L.process,B=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),z=B&&B.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function j(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function F(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V,H,G,W=Array.prototype,q=Function.prototype,Z=Object.prototype,Y=R["__core-js_shared__"],K=q.toString,X=Z.hasOwnProperty,Q=(V=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",J=Z.toString,ee=RegExp("^"+K.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=P?R.Buffer:void 0,ne=R.Symbol,re=R.Uint8Array,ie=Z.propertyIsEnumerable,ae=W.splice,oe=ne?ne.toStringTag:void 0,se=Object.getOwnPropertySymbols,le=te?te.isBuffer:void 0,ce=(H=Object.keys,G=Object,function(e){return H(G(e))}),ue=Ie(R,"DataView"),de=Ie(R,"Map"),he=Ie(R,"Promise"),fe=Ie(R,"Set"),pe=Ie(R,"WeakMap"),me=Ie(Object,"create"),ge=ze(ue),ve=ze(de),ye=ze(he),be=ze(fe),_e=ze(pe),we=ne?ne.prototype:void 0,Ee=we?we.valueOf:void 0;function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function Te(e){var t=this.__data__=new Se(e);this.size=t.size}function Ae(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Me(e){return null==e?void 0===e?S:v:oe&&oe in Object(e)?function(e){var t=X.call(e,oe),n=e[oe];try{e[oe]=void 0;var r=!0}catch(e){}var i=J.call(e);return r&&(t?e[oe]=n:delete e[oe]),i}(e):function(e){return J.call(e)}(e)}function ke(e){return qe(e)&&Me(e)==s}function Le(e,t,n,r,o){return e===t||(null==e||null==t||!qe(e)&&!qe(t)?e!=e&&t!=t:function(e,t,n,r,o,c){var f=Fe(e),p=Fe(t),v=f?l:$e(e),b=p?l:$e(t),_=(v=v==s?y:v)==y,S=(b=b==s?y:b)==y,O=v==b;if(O&&Ve(e)){if(!Ve(t))return!1;f=!0,_=!1}if(O&&!_)return c||(c=new Te),f||Ze(e)?De(e,t,n,r,o,c):function(e,t,n,r,o,s,l){switch(n){case T:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case u:case d:case g:return Ue(+e,+t);case h:return e.name==t.name&&e.message==t.message;case w:case x:return e==t+"";case m:var c=j;case E:var f=r&i;if(c||(c=F),e.size!=t.size&&!f)return!1;var p=l.get(e);if(p)return p==t;r|=a,l.set(e,t);var v=De(c(e),c(t),r,o,s,l);return l.delete(e),v;case"[object Symbol]":if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,v,n,r,o,c);if(!(n&i)){var A=_&&X.call(e,"__wrapped__"),M=S&&X.call(t,"__wrapped__");if(A||M){var k=A?e.value():e,L=M?t.value():t;return c||(c=new Te),o(k,L,n,r,c)}}return!!O&&(c||(c=new Te),function(e,t,n,r,a,o){var s=n&i,l=Re(e),c=l.length;if(c!=Re(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:X.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);for(var p=s;++u<c;){var m=e[d=l[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,o):r(m,g,d,e,t,o);if(!(void 0===v?m===g||a(m,g,n,r,o):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,c))}(e,t,n,r,Le,o))}function De(e,t,n,r,o,s){var l=n&i,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&a?new Ce:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!U(t,(function(e,t){if(i=t,!p.has(i)&&(m===e||o(m,e,n,r,s)))return p.push(t);var i}))){f=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function Re(e){return function(e,t,n){var r=t(e);return Fe(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ye,Pe)}function Ne(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!We(e)||function(e){return!!Q&&Q in e}(e))&&(He(e)?ee:A).test(ze(e))}(n)?n:void 0}xe.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},xe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xe.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return X.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:X.call(t,e)},xe.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[],this.size=0},Se.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),--this.size,0))},Se.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Ae(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Oe.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(de||Se),string:new xe}},Oe.prototype.delete=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},Oe.prototype.get=function(e){return Ne(this,e).get(e)},Oe.prototype.has=function(e){return Ne(this,e).has(e)},Oe.prototype.set=function(e,t){var n=Ne(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,r),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.clear=function(){this.__data__=new Se,this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(r)}return n.set(e,t),this.size=n.size,this};var Pe=se?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,i=null==t?0:t.length,a=0,o=[];++r<i;){var s=t[r];l=s,ie.call(e,l)&&(o[a++]=s)}var l;return o}(se(e)))}:function(){return[]},$e=Me;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(ue&&$e(new ue(new ArrayBuffer(1)))!=T||de&&$e(new de)!=m||he&&$e(he.resolve())!=b||fe&&$e(new fe)!=E||pe&&$e(new pe)!=O)&&($e=function(e){var t=Me(e),n=t==y?e.constructor:void 0,r=n?ze(n):"";if(r)switch(r){case ge:return T;case ve:return m;case ye:return b;case be:return E;case _e:return O}return t});var je=ke(function(){return arguments}())?ke:function(e){return qe(e)&&X.call(e,"callee")&&!ie.call(e,"callee")},Fe=Array.isArray,Ve=le||function(){return!1};function He(e){if(!We(e))return!1;var t=Me(e);return t==f||t==p||t==c||t==_}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function We(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qe(e){return null!=e&&"object"==typeof e}var Ze=z?function(e){return function(t){return e(t)}}(z):function(e){return qe(e)&&Ge(e.length)&&!!k[Me(e)]};function Ye(e){return null!=(t=e)&&Ge(t.length)&&!He(t)?function(e,t){var n=Fe(e),r=!n&&je(e),i=!n&&!r&&Ve(e),a=!n&&!r&&!i&&Ze(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)!t&&!X.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Be(c,l))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Z))return ce(e);var t,n,r=[];for(var i in Object(e))X.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}e.exports=function(e,t){return Le(e,t)}},8979:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")();function f(e,t){return!(!e||!e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,a=-1;++a<i;)if(t(e[a],a,e))return a;return-1}(e,g);for(var r=-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t)>-1}function p(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function m(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function g(e){return e!=e}function v(e,t){return e.has(t)}function y(e,t){return function(n){return e(t(n))}}var b,_=Array.prototype,w=Function.prototype,E=Object.prototype,x=h["__core-js_shared__"],S=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",O=w.toString,C=E.hasOwnProperty,T=E.toString,A=RegExp("^"+O.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=h.Symbol,k=y(Object.getPrototypeOf,Object),L=E.propertyIsEnumerable,D=_.splice,R=M?M.isConcatSpreadable:void 0,N=Object.getOwnPropertySymbols,I=Math.max,P=G(h,"Map"),$=G(Object,"create");function B(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.__data__=new U;++t<n;)this.add(e[t])}function F(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function V(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Z),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?V(s,t-1,n,r,i):m(i,s):r||(i[i.length]=s)}return i}function H(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!te(e)||S&&S in e)return!1;var t=ee(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?A:l;return t.test(function(e){if(null!=e){try{return O.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}B.prototype.clear=function(){this.__data__=$?$(null):{}},B.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},B.prototype.get=function(e){var t=this.__data__;if($){var n=t[e];return n===r?void 0:n}return C.call(t,e)?t[e]:void 0},B.prototype.has=function(e){var t=this.__data__;return $?void 0!==t[e]:C.call(t,e)},B.prototype.set=function(e,t){return this.__data__[e]=$&&void 0===t?r:t,this},z.prototype.clear=function(){this.__data__=[]},z.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0||(n==t.length-1?t.pop():D.call(t,n,1),0))},z.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},z.prototype.has=function(e){return F(this.__data__,e)>-1},z.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new B,map:new(P||z),string:new B}},U.prototype.delete=function(e){return H(this,e).delete(e)},U.prototype.get=function(e){return H(this,e).get(e)},U.prototype.has=function(e){return H(this,e).has(e)},U.prototype.set=function(e,t){return H(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,r),this},j.prototype.has=function(e){return this.__data__.has(e)};var W=N?y(N,Object):se,q=N?function(e){for(var t=[];e;)m(t,W(e)),e=k(e);return t}:se;function Z(e){return Q(e)||X(e)||!!(R&&e&&e[R])}function Y(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==T.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function X(e){return function(e){return ne(e)&&J(e)}(e)&&C.call(e,"callee")&&(!L.call(e,"callee")||T.call(e)==a)}var Q=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!ee(e)}function ee(e){var t=te(e)?T.call(e):"";return t==o||t==s}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return J(e)?function(e,t){var n=Q(e)||X(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!C.call(e,a)||i&&("length"==a||Y(a,r))||n.push(a);return n}(e,!0):function(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r=(n=(t=e)&&t.constructor,t===("function"==typeof n&&n.prototype||E)),i=[];for(var a in e)("constructor"!=a||!r&&C.call(e,a))&&i.push(a);return i}(e)}var ie,ae,oe=(ie=function(e,t){return null==e?{}:(t=p(V(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=e[o];n(0,o)&&(a[o]=s)}return a}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i=-1,a=f,o=!0,s=e.length,l=[],c=t.length;if(!s)return l;t.length>=200&&(a=v,o=!1,t=new j(t));e:for(;++i<s;){var u=e[i],d=u;if(u=0!==u?u:0,o&&d==d){for(var h=c;h--;)if(t[h]===d)continue e;l.push(u)}else a(t,d,r)||l.push(u)}return l}(function(e){return function(e,t,n){var r=t(e);return Q(e)?r:m(r,n(e))}(e,re,q)}(e),t)))},ae=I(void 0===ae?ie.length-1:ae,0),function(){for(var e=arguments,t=-1,n=I(e.length-ae,0),r=Array(n);++t<n;)r[t]=e[ae+t];t=-1;for(var i=Array(ae+1);++t<ae;)i[t]=e[t];return i[ae]=r,function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(ie,this,i)});function se(){return[]}e.exports=oe},8262:(e,t,n)=>{"use strict";var r=n(3586);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},3980:(e,t,n)=>{e.exports=n(8262)()},3586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2967:(e,t,n)=>{"use strict";var r=n(7900),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),D=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var N=Symbol.iterator;function I(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=N&&e[N]||e["@@iterator"])?e:null}var P,$=Object.assign;function B(e){if(void 0===P)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return"\n"+P+e}var z=!1;function U(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function j(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case E:return"Portal";case O:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case k:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return F(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){X(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ae(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,xe=null,Se=null;function Oe(e){if(e=bi(e)){if("function"!=typeof Ee)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),Ee(e.stateNode,e.type,t))}}function Ce(e){xe?Se?Se.push(e):Se=[e]:xe=e}function Te(){if(xe){var e=xe,t=Se;if(Se=xe=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Ae(e,t){return e(t)}function Me(){}var ke=!1;function Le(e,t,n){if(ke)return e(t,n);ke=!0;try{return Ae(e,t,n)}finally{ke=!1,(null!==xe||null!==Se)&&(Me(),Te())}}function De(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Re=!1;if(u)try{var Ne={};Object.defineProperty(Ne,"passive",{get:function(){Re=!0}}),window.addEventListener("test",Ne,Ne),window.removeEventListener("test",Ne,Ne)}catch(ue){Re=!1}function Ie(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Pe=!1,$e=null,Be=!1,ze=null,Ue={onError:function(e){Pe=!0,$e=e}};function je(e,t,n,r,i,a,o,s,l){Pe=!1,$e=null,Ie.apply(Ue,arguments)}function Fe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function He(e){if(Fe(e)!==e)throw Error(a(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Fe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return He(i),e;if(o===r)return He(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Ze=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Xe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null,ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!=(a&=o)&&(r=dt(a))}else 0!=(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function _t(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var wt,Et,xt,St,Ot,Ct=!1,Tt=[],At=null,Mt=null,kt=null,Lt=new Map,Dt=new Map,Rt=[],Nt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":kt=null;break;case"pointerover":case"pointerout":Lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function Pt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=bi(t))&&Et(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function $t(e){var t=yi(e.target);if(null!==t){var n=Fe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void Ot(e.priority,(function(){xt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_e=r,n.target.dispatchEvent(r),_e=null,t.shift()}return!0}function zt(e,t,n){Bt(e)&&n.delete(t)}function Ut(){Ct=!1,null!==At&&Bt(At)&&(At=null),null!==Mt&&Bt(Mt)&&(Mt=null),null!==kt&&Bt(kt)&&(kt=null),Lt.forEach(zt),Dt.forEach(zt)}function jt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function Ft(e){function t(t){return jt(t,e)}if(0<Tt.length){jt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&jt(At,e),null!==Mt&&jt(Mt,e),null!==kt&&jt(kt,e),Lt.forEach(t),Dt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)$t(n),null===n.blockedOn&&Rt.shift()}var Vt=_.ReactCurrentBatchConfig,Ht=!0;function Gt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=1,qt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function Wt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=4,qt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function qt(e,t,n,r){if(Ht){var i=Yt(e,t,n,r);if(null===i)Hr(e,t,r,Zt,n),It(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return At=Pt(At,e,t,n,r,i),!0;case"dragenter":return Mt=Pt(Mt,e,t,n,r,i),!0;case"mouseover":return kt=Pt(kt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Lt.set(a,Pt(Lt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Dt.set(a,Pt(Dt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<Nt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&wt(a),null===(a=Yt(e,t,n,r))&&Hr(e,t,r,Zt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Zt=null;function Yt(e,t,n,r){if(Zt=null,null!==(e=yi(e=we(r))))if(null===(t=Fe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return $(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=an(cn),dn=$({},cn,{view:0,detail:0}),hn=an(dn),fn=$({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(fn),mn=an($({},fn,{dataTransfer:0})),gn=an($({},dn,{relatedTarget:0})),vn=an($({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=$({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(yn),_n=an($({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},En={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function On(){return Sn}var Cn=$({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?En[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(Cn),An=an($({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=an($({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),kn=an($({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=$({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=an(Ln),Rn=[9,13,27,32],Nn=u&&"CompositionEvent"in window,In=null;u&&"documentMode"in document&&(In=document.documentMode);var Pn=u&&"TextEvent"in window&&!In,$n=u&&(!Nn||In&&8<In&&11>=In),Bn=String.fromCharCode(32),zn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ce(r),0<(t=Wr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,qn=null;function Zn(e){Br(e,0)}function Yn(e){if(q(_i(e)))return e}function Kn(e,t){if("change"===e)return t}var Xn=!1;if(u){var Qn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"==typeof er.oninput}Qn=Jn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),qn=Wn=null)}function nr(e){if("value"===e.propertyName&&Yn(qn)){var t=[];Gn(t,qn,e,we(e)),Le(Zn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(qn)}function ar(e,t){if("click"===e)return Yn(t)}function or(e,t){if("input"===e||"change"===e)return Yn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=ur(n,a);var o=ur(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,br=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==Z(r)||(r="selectionStart"in(r=gr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Wr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},xr={},Sr={};function Or(e){if(xr[e])return xr[e];if(!Er[e])return e;var t,n=Er[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);var Cr=Or("animationend"),Tr=Or("animationiteration"),Ar=Or("animationstart"),Mr=Or("transitionend"),kr=new Map,Lr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){kr.set(e,t),l(t,[e])}for(var Rr=0;Rr<Lr.length;Rr++){var Nr=Lr[Rr];Dr(Nr.toLowerCase(),"on"+(Nr[0].toUpperCase()+Nr.slice(1)))}Dr(Cr,"onAnimationEnd"),Dr(Tr,"onAnimationIteration"),Dr(Ar,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(Mr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function $r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(je.apply(this,arguments),Pe){if(!Pe)throw Error(a(198));var u=$e;Pe=!1,$e=null,Be||(Be=!0,ze=u)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;$r(i,s,c),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,c=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;$r(i,s,c),a=l}}}if(Be)throw e=ze,Be=!1,ze=null,e}function zr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var jr="_reactListening"+Math.random().toString(36).slice(2);function Fr(e){if(!e[jr]){e[jr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Pr.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[jr]||(t[jr]=!0,Ur("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(Kt(t)){case 1:var i=Gt;break;case 4:i=Wt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Re||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=yi(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}Le((function(){var r=a,i=we(n),o=[];e:{var s=kr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Mn;break;case Cr:case Tr:case Ar:l=vn;break;case Mr:l=kn;break;case"scroll":l=hn;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=De(p,h))&&u.push(Gr(p,m,f))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),o.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[pi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Fe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=An,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:_i(l),f=null==c?s:_i(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,yi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=qr(f))p++;for(f=0,m=h;m;m=qr(m))f++;for(;0<p-f;)u=qr(u),p--;for(;0<f-p;)h=qr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=qr(u),h=qr(h)}u=null}else u=null;null!==l&&Zr(o,s,l,u,!1),null!==c&&null!==d&&Zr(o,d,c,u,!0)}if("select"===(l=(s=r?_i(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Kn;else if(Hn(s))if(Xn)g=or;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?Gn(o,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?_i(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,_r(o,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":_r(o,n,i)}var y;if(Nn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Fn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Fn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Fn&&(y=en()):(Qt="value"in(Xt=i)?Xt.value:Xt.textContent,Fn=!0)),0<(v=Wr(r,b)).length&&(b=new _n(b,e,null,n,i),o.push({event:b,listeners:v}),(y||null!==(y=jn(n)))&&(b.data=y))),(y=Pn?function(e,t){switch(e){case"compositionend":return jn(t);case"keypress":return 32!==t.which?null:(zn=!0,Bn);case"textInput":return(e=t.data)===Bn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Fn)return"compositionend"===e||!Nn&&Un(e,t)?(e=en(),Jt=Qt=Xt=null,Fn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=y)}Br(o,t)}))}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=De(e,n))&&r.unshift(Gr(e,a,i)),null!=(a=De(e,t))&&r.push(Gr(e,a,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,a))&&o.unshift(Gr(n,l,s)):i||null!=(l=De(n,a))&&o.push(Gr(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Yr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Yr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(a(425))}function Jr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,oi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ft(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ft(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _i(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[fi]||null}var Ei=[],xi=-1;function Si(e){return{current:e}}function Oi(e){0>xi||(e.current=Ei[xi],Ei[xi]=null,xi--)}function Ci(e,t){xi++,Ei[xi]=e.current,e.current=t}var Ti={},Ai=Si(Ti),Mi=Si(!1),ki=Ti;function Li(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Di(e){return null!=e.childContextTypes}function Ri(){Oi(Mi),Oi(Ai)}function Ni(e,t,n){if(Ai.current!==Ti)throw Error(a(168));Ci(Ai,t),Ci(Mi,n)}function Ii(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,V(e)||"Unknown",i));return $({},n,r)}function Pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,ki=Ai.current,Ci(Ai,e),Ci(Mi,Mi.current),!0}function $i(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ii(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,Oi(Mi),Oi(Ai),Ci(Ai,e)):Oi(Mi),Ci(Mi,n)}var Bi=null,zi=!1,Ui=!1;function ji(e){null===Bi?Bi=[e]:Bi.push(e)}function Fi(){if(!Ui&&null!==Bi){Ui=!0;var e=0,t=bt;try{var n=Bi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,zi=!1}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),qe(Je,Fi),t}finally{bt=t,Ui=!1}}return null}var Vi=[],Hi=0,Gi=null,Wi=0,qi=[],Zi=0,Yi=null,Ki=1,Xi="";function Qi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Gi=e,Wi=t}function Ji(e,t,n){qi[Zi++]=Ki,qi[Zi++]=Xi,qi[Zi++]=Yi,Yi=e;var r=Ki;e=Xi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ki=1<<32-ot(t)+i|n<<i|r,Xi=a+e}else Ki=1<<a|n<<i|r,Xi=e}function ea(e){null!==e.return&&(Qi(e,1),Ji(e,1,0))}function ta(e){for(;e===Gi;)Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===Yi;)Yi=qi[--Zi],qi[Zi]=null,Xi=qi[--Zi],qi[Zi]=null,Ki=qi[--Zi],qi[Zi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Dc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yi?{id:Ki,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Dc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function la(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ca(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(la(e))throw Error(a(418));t=ci(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function da(e){if(e!==na)return!1;if(!ia)return ua(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(la(e))throw ha(),Error(a(418));for(;t;)oa(e,t),t=ci(t.nextSibling)}if(ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ci(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=ra;e;)e=ci(e.nextSibling)}function fa(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var ma=_.ReactCurrentBatchConfig;function ga(e,t){if(e&&e.defaultProps){for(var n in t=$({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var va=Si(null),ya=null,ba=null,_a=null;function wa(){_a=ba=ya=null}function Ea(e){var t=va.current;Oi(va),e._currentValue=t}function xa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){ya=e,_a=ba=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(_s=!0),e.firstContext=null)}function Oa(e){var t=e._currentValue;if(_a!==e)if(e={context:e,memoizedValue:t,next:null},null===ba){if(null===ya)throw Error(a(308));ba=e,ya.dependencies={lanes:0,firstContext:e}}else ba=ba.next=e;return t}var Ca=null;function Ta(e){null===Ca?Ca=[e]:Ca.push(e)}function Aa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ma(e,r)}function Ma(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var ka=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Da(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ra(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Ml)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ma(e,n)}return null===(i=r.interleaved)?(t.next=t,Ta(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ma(e,n)}function Ia(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var i=e.updateQueue;ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===o?a=c:o.next=c,o=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(o=0,u=c=l=null,s=a;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=$({},d,h);break e;case 2:ka=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);$l|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var za=(new r.Component).refs;function Ua(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ja={isMounted:function(e){return!!(e=e._reactInternals)&&Fe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Ra(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=Na(e,a,i))&&(rc(t,e,i,r),Ia(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tc(),i=nc(e),a=Ra(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Na(e,a,i))&&(rc(t,e,i,r),Ia(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),r=nc(e),i=Ra(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Na(e,i,r))&&(rc(t,e,r,n),Ia(t,e,r))}};function Fa(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,a))}function Va(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"==typeof a&&null!==a?a=Oa(a):(i=Di(t)?ki:Ai.current,a=(r=null!=(r=t.contextTypes))?Li(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ja,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ja.enqueueReplaceState(t,t.state,null)}function Ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=za,La(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Oa(a):(a=Di(t)?ki:Ai.current,i.context=Li(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Ua(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ja.enqueueReplaceState(i,i.state,null),$a(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===za&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Za(e){return(0,e._init)(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Bc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===D&&Za(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=Ic(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Pc(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Bc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ic(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case E:return(t=zc(t,e.mode,n)).return=e,t;case D:return h(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Pc(t,e.mode,n,null)).return=e,t;qa(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?c(e,t,n,r):null;case E:return n.key===i?u(e,t,n,r):null;case D:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||I(n))return null!==i?null:d(e,t,n,r,null);qa(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case D:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||I(r))return d(t,e=e.get(n)||null,r,i,null);qa(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),ia&&Qi(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return ia&&Qi(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),ia&&Qi(i,m),c}function g(i,s,l,c){var u=I(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),ia&&Qi(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,c))&&(s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return ia&&Qi(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Qi(i,g),u}return function e(r,a,o,l){if("object"==typeof o&&null!==o&&o.type===x&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var c=o.key,u=a;null!==u;){if(u.key===c){if((c=o.type)===x){if(7===u.tag){n(r,u.sibling),(a=i(u,o.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===D&&Za(c)===u.type){n(r,u.sibling),(a=i(u,o.props)).ref=Wa(r,u,o),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}o.type===x?((a=Pc(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Ic(o.type,o.key,o.props,null,r.mode,l)).ref=Wa(r,a,o),l.return=r,r=l)}return s(r);case E:e:{for(u=o.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=zc(o,r.mode,l)).return=r,r=a}return s(r);case D:return e(r,a,(u=o._init)(o._payload),l)}if(te(o))return m(r,a,o,l);if(I(o))return g(r,a,o,l);qa(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Bc(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Ka=Ya(!0),Xa=Ya(!1),Qa={},Ja=Si(Qa),eo=Si(Qa),to=Si(Qa);function no(e){if(e===Qa)throw Error(a(174));return e}function ro(e,t){switch(Ci(to,t),Ci(eo,e),Ci(Ja,Qa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Oi(Ja),Ci(Ja,t)}function io(){Oi(Ja),Oi(eo),Oi(to)}function ao(e){no(to.current);var t=no(Ja.current),n=le(t,e.type);t!==n&&(Ci(eo,e),Ci(Ja,n))}function oo(e){eo.current===e&&(Oi(Ja),Oi(eo))}var so=Si(0);function lo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=[];function uo(){for(var e=0;e<co.length;e++)co[e]._workInProgressVersionPrimary=null;co.length=0}var ho=_.ReactCurrentDispatcher,fo=_.ReactCurrentBatchConfig,po=0,mo=null,go=null,vo=null,yo=!1,bo=!1,_o=0,wo=0;function Eo(){throw Error(a(321))}function xo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,o){if(po=o,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ho.current=null===e||null===e.memoizedState?ss:ls,e=n(r,i),bo){o=0;do{if(bo=!1,_o=0,25<=o)throw Error(a(301));o+=1,vo=go=null,t.updateQueue=null,ho.current=cs,e=n(r,i)}while(bo)}if(ho.current=os,t=null!==go&&null!==go.next,po=0,vo=go=mo=null,yo=!1,t)throw Error(a(300));return e}function Oo(){var e=0!==_o;return _o=0,e}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vo?mo.memoizedState=vo=e:vo=vo.next=e,vo}function To(){if(null===go){var e=mo.alternate;e=null!==e?e.memoizedState:null}else e=go.next;var t=null===vo?mo.memoizedState:vo.next;if(null!==t)vo=t,go=e;else{if(null===e)throw Error(a(310));e={memoizedState:(go=e).memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},null===vo?mo.memoizedState=vo=e:vo=vo.next=e}return vo}function Ao(e,t){return"function"==typeof t?t(e):t}function Mo(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=go,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,c=null,u=o;do{var d=u.lane;if((po&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,mo.lanes|=d,$l|=d}u=u.next}while(null!==u&&u!==o);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(_s=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,mo.lanes|=o,$l|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ko(e){var t=To(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(_s=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(){}function Do(e,t){var n=mo,r=To(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,_s=!0),r=r.queue,Ho(Io.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==vo&&1&vo.memoizedState.tag){if(n.flags|=2048,zo(9,No.bind(null,n,r,i,t),void 0,null),null===kl)throw Error(a(349));0!=(30&po)||Ro(n,t,i)}return i}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function No(e,t,n,r){t.value=n,t.getSnapshot=r,Po(t)&&$o(e)}function Io(e,t,n){return n((function(){Po(t)&&$o(e)}))}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function $o(e){var t=Ma(e,1);null!==t&&rc(t,e,1,-1)}function Bo(e){var t=Co();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,mo,e),[t.memoizedState,e]}function zo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=mo.updateQueue)?(t={lastEffect:null,stores:null},mo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Uo(){return To().memoizedState}function jo(e,t,n,r){var i=Co();mo.flags|=e,i.memoizedState=zo(1|t,n,void 0,void 0===r?null:r)}function Fo(e,t,n,r){var i=To();r=void 0===r?null:r;var a=void 0;if(null!==go){var o=go.memoizedState;if(a=o.destroy,null!==r&&xo(r,o.deps))return void(i.memoizedState=zo(t,n,a,r))}mo.flags|=e,i.memoizedState=zo(1|t,n,a,r)}function Vo(e,t){return jo(8390656,8,e,t)}function Ho(e,t){return Fo(2048,8,e,t)}function Go(e,t){return Fo(4,2,e,t)}function Wo(e,t){return Fo(4,4,e,t)}function qo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Zo(e,t,n){return n=null!=n?n.concat([e]):null,Fo(4,4,qo.bind(null,t,e),n)}function Yo(){}function Ko(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=To();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&xo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qo(e,t,n){return 0==(21&po)?(e.baseState&&(e.baseState=!1,_s=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),mo.lanes|=n,$l|=n,e.baseState=!0),t)}function Jo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=fo.transition;fo.transition={};try{e(!1),t()}finally{bt=n,fo.transition=r}}function es(){return To().memoizedState}function ts(e,t,n){var r=nc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e)?is(t,n):null!==(n=Aa(e,t,n,r))&&(rc(n,e,r,tc()),as(n,t,r))}function ns(e,t,n){var r=nc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var l=t.interleaved;return null===l?(i.next=i,Ta(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Aa(e,t,i,r))&&(rc(n,e,r,i=tc()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===mo||null!==t&&t===mo}function is(e,t){bo=yo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var os={readContext:Oa,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useInsertionEffect:Eo,useLayoutEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useMutableSource:Eo,useSyncExternalStore:Eo,useId:Eo,unstable_isNewReconciler:!1},ss={readContext:Oa,useCallback:function(e,t){return Co().memoizedState=[e,void 0===t?null:t],e},useContext:Oa,useEffect:Vo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,jo(4194308,4,qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jo(4194308,4,e,t)},useInsertionEffect:function(e,t){return jo(4,2,e,t)},useMemo:function(e,t){var n=Co();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Co();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Co().memoizedState=e},useState:Bo,useDebugValue:Yo,useDeferredValue:function(e){return Co().memoizedState=e},useTransition:function(){var e=Bo(!1),t=e[0];return e=Jo.bind(null,e[1]),Co().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mo,i=Co();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===kl)throw Error(a(349));0!=(30&po)||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Vo(Io.bind(null,r,o,e),[e]),r.flags|=2048,zo(9,No.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Co(),t=kl.identifierPrefix;if(ia){var n=Xi;t=":"+t+"R"+(n=(Ki&~(1<<32-ot(Ki)-1)).toString(32)+n),0<(n=_o++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ls={readContext:Oa,useCallback:Ko,useContext:Oa,useEffect:Ho,useImperativeHandle:Zo,useInsertionEffect:Go,useLayoutEffect:Wo,useMemo:Xo,useReducer:Mo,useRef:Uo,useState:function(){return Mo(Ao)},useDebugValue:Yo,useDeferredValue:function(e){return Qo(To(),go.memoizedState,e)},useTransition:function(){return[Mo(Ao)[0],To().memoizedState]},useMutableSource:Lo,useSyncExternalStore:Do,useId:es,unstable_isNewReconciler:!1},cs={readContext:Oa,useCallback:Ko,useContext:Oa,useEffect:Ho,useImperativeHandle:Zo,useInsertionEffect:Go,useLayoutEffect:Wo,useMemo:Xo,useReducer:ko,useRef:Uo,useState:function(){return ko(Ao)},useDebugValue:Yo,useDeferredValue:function(e){var t=To();return null===go?t.memoizedState=e:Qo(t,go.memoizedState,e)},useTransition:function(){return[ko(Ao)[0],To().memoizedState]},useMutableSource:Lo,useSyncExternalStore:Do,useId:es,unstable_isNewReconciler:!1};function us(e,t){try{var n="",r=t;do{n+=j(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Ra(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gl||(Gl=!0,Wl=r),hs(0,t)},n}function ms(e,t,n){(n=Ra(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Cc.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ra(-1,1)).tag=2,Na(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bs=_.ReactCurrentOwner,_s=!1;function ws(e,t,n,r){t.child=null===e?Xa(t,null,n,r):Ka(t,e.child,n,r)}function Es(e,t,n,r,i){n=n.render;var a=t.ref;return Sa(t,i),r=So(e,t,n,r,a,i),n=Oo(),null===e||_s?(ia&&n&&ea(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function xs(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Rc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ic(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ss(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(o,r)&&e.ref===t.ref)return Gs(e,t,i)}return t.flags|=1,(e=Nc(a,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Gs(e,t,i);0!=(131072&e.flags)&&(_s=!0)}}return Ts(e,t,n,r,i)}function Os(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Nl,Rl),Rl|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Nl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ci(Nl,Rl),Rl|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ci(Nl,Rl),Rl|=r;return ws(e,t,i,n),t.child}function Cs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ts(e,t,n,r,i){var a=Di(n)?ki:Ai.current;return a=Li(t,a),Sa(t,i),n=So(e,t,n,r,a,i),r=Oo(),null===e||_s?(ia&&r&&ea(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gs(e,t,i))}function As(e,t,n,r,i){if(Di(n)){var a=!0;Pi(t)}else a=!1;if(Sa(t,i),null===t.stateNode)Hs(e,t),Va(t,n,r),Ga(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?Oa(c):Li(t,c=Di(n)?ki:Ai.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&Ha(t,o,r,c),ka=!1;var h=t.memoizedState;o.state=h,$a(t,r,o,i),l=t.memoizedState,s!==r||h!==l||Mi.current||ka?("function"==typeof u&&(Ua(t,n,u,r),l=t.memoizedState),(s=ka||Fa(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Da(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ga(t.type,s),o.props=c,d=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?Oa(l):Li(t,l=Di(n)?ki:Ai.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&Ha(t,o,r,l),ka=!1,h=t.memoizedState,o.state=h,$a(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||Mi.current||ka?("function"==typeof f&&(Ua(t,n,f,r),p=t.memoizedState),(c=ka||Fa(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ms(e,t,n,r,a,i)}function Ms(e,t,n,r,i,a){Cs(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&$i(t,n,!1),Gs(e,t,a);r=t.stateNode,bs.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,s,a)):ws(e,t,s,a),t.memoizedState=r.state,i&&$i(t,n,!0),t.child}function ks(e){var t=e.stateNode;t.pendingContext?Ni(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ni(0,t.context,!1),ro(e,t.containerInfo)}function Ls(e,t,n,r,i){return fa(),pa(i),t.flags|=256,ws(e,t,n,r),t.child}var Ds,Rs,Ns,Is,Ps={dehydrated:null,treeContext:null,retryLane:0};function $s(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ci(so,1&o),null===e)return ca(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=$c(l,i,0,null),e=Pc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=$s(n),t.memoizedState=Ps,e):zs(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Us(e,t,s,r=ds(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$c({mode:"visible",children:r.children},i,0,null),(o=Pc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&Ka(t,e.child,null,s),t.child.memoizedState=$s(s),t.memoizedState=Ps,o);if(0==(1&t.mode))return Us(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Us(e,t,s,r=ds(o=Error(a(419)),r,void 0))}if(l=0!=(s&e.childLanes),_s||l){if(null!==(r=kl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ma(e,i),rc(r,e,i,-1))}return gc(),Us(e,t,s,r=ds(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Ac.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(qi[Zi++]=Ki,qi[Zi++]=Xi,qi[Zi++]=Yi,Ki=e.id,Xi=e.overflow,Yi=t),(t=zs(t,r.children)).flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Nc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Nc(r,s):(s=Pc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?$s(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ps,i}return e=(s=e.child).sibling,i=Nc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function zs(e,t){return(t=$c({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Us(e,t,n,r){return null!==r&&pa(r),Ka(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),xa(e.return,t,n)}function Fs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Vs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ws(e,t,r.children,n),0!=(2&(r=so.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,n,t);else if(19===e.tag)js(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(so,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===lo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===lo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fs(t,!0,n,null,a);break;case"together":Fs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),$l|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ws(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zs(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(t),null;case 1:case 17:return Di(t.type)&&Ri(),qs(t),null;case 3:return r=t.stateNode,io(),Oi(Mi),Oi(Ai),uo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==aa&&(sc(aa),aa=null))),Rs(e,t),qs(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return qs(t),null}if(e=no(Ja.current),da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[hi]=t,r[fi]=o,e=0!=(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<Ir.length;i++)zr(Ir[i],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":K(r,o),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zr("invalid",r);break;case"textarea":ie(r,o),zr("invalid",r)}for(var l in ye(n,o),i=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&zr("scroll",r)}switch(n){case"input":W(r),J(r,o,!0);break;case"textarea":W(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Jr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ds(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ir.length;i++)zr(Ir[i],e);i=r;break;case"source":zr("error",e),i=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),i=r;break;case"details":zr("toggle",e),i=r;break;case"input":K(e,r),i=Y(e,r),zr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$({},r,{value:void 0}),zr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),zr("invalid",e)}for(o in ye(n,i),c=i)if(c.hasOwnProperty(o)){var u=c[o];"style"===o?ge(e,u):"dangerouslySetInnerHTML"===o?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===o?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=u&&"onScroll"===o&&zr("scroll",e):null!=u&&b(e,o,u,l))}switch(n){case"input":W(e),J(e,r,!1);break;case"textarea":W(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qs(t),null;case 6:if(e&&null!=t.stateNode)Is(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Ja.current),da(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Qr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return qs(t),null;case 13:if(Oi(so),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!=(1&t.mode)&&0==(128&t.flags))ha(),fa(),t.flags|=98560,o=!1;else if(o=da(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[hi]=t}else fa(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qs(t),o=!1}else null!==aa&&(sc(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&so.current)?0===Il&&(Il=3):gc())),null!==t.updateQueue&&(t.flags|=4),qs(t),null);case 4:return io(),Rs(e,t),null===e&&Fr(t.stateNode.containerInfo),qs(t),null;case 10:return Ea(t.type._context),qs(t),null;case 19:if(Oi(so),null===(o=t.memoizedState))return qs(t),null;if(r=0!=(128&t.flags),null===(l=o.rendering))if(r)Ws(o,!1);else{if(0!==Il||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=lo(e))){for(t.flags|=128,Ws(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(so,1&so.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>Vl&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=lo(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ws(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ia)return qs(t),null}else 2*Xe()-o.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=so.current,Ci(so,r?1&n|2:1&n),t):(qs(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Rl)&&(qs(t),6&t.subtreeFlags&&(t.flags|=8192)):qs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ys(e,t){switch(ta(t),t.tag){case 1:return Di(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Oi(Mi),Oi(Ai),uo(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Oi(so),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Oi(so),null;case 4:return io(),null;case 10:return Ea(t.type._context),null;case 22:case 23:return hc(),null;default:return null}}Ds=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Rs=function(){},Ns=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Ja.current);var a,o=null;switch(n){case"input":i=Y(e,i),r=Y(e,r),o=[];break;case"select":i=$({},i,{value:void 0}),r=$({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&zr("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},Is=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ks=!1,Xs=!1,Qs="function"==typeof WeakSet?WeakSet:Set,Js=null;function el(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Oc(e,t,n)}else n.current=null}function tl(e,t,n){try{n()}catch(n){Oc(e,t,n)}}var nl=!1;function rl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&tl(t,n,a)}i=i.next}while(i!==r)}}function il(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var dl=null,hl=!1;function fl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xs||el(n,t);case 6:var r=dl,i=hl;dl=null,fl(e,t,n),hl=i,null!==(dl=r)&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):dl.removeChild(n.stateNode));break;case 18:null!==dl&&(hl?(e=dl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ft(e)):li(dl,n.stateNode));break;case 4:r=dl,i=hl,dl=n.stateNode.containerInfo,hl=!0,fl(e,t,n),dl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Xs&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&tl(n,t,o),i=i.next}while(i!==r)}fl(e,t,n);break;case 1:if(!Xs&&(el(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Oc(n,t,e)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,fl(e,t,n),Xs=r):fl(e,t,n);break;default:fl(e,t,n)}}function ml(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var r=Mc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,hl=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===dl)throw Error(a(160));pl(o,s,i),dl=null,hl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Oc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),yl(e),4&r){try{rl(3,e,e.return),il(3,e)}catch(t){Oc(e,e.return,t)}try{rl(5,e,e.return)}catch(t){Oc(e,e.return,t)}}break;case 1:gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return);break;case 5:if(gl(t,e),yl(e),512&r&&null!==n&&el(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Oc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&X(i,o),be(l,s);var u=be(l,o);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,o);break;case"textarea":ae(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[fi]=o}catch(t){Oc(e,e.return,t)}}break;case 6:if(gl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Oc(e,e.return,t)}}break;case 3:if(gl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ft(t.containerInfo)}catch(t){Oc(e,e.return,t)}break;case 4:default:gl(t,e),yl(e);break;case 13:gl(t,e),yl(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Fl=Xe())),4&r&&ml(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(u=Xs)||d,gl(t,e),Xs=u):gl(t,e),yl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(p=(f=Js).child,f.tag){case 0:case 11:case 14:case 15:rl(4,f,f.return);break;case 1:el(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Oc(r,n,e)}}break;case 5:el(f,f.return);break;case 22:if(null!==f.memoizedState){El(h);continue}}null!==p?(p.return=f,Js=p):El(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(t){Oc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Oc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),yl(e),4&r&&ml(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ul(e,ll(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;cl(e,ll(e),o);break;default:throw Error(a(161))}}catch(t){Oc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,_l(e,t,n)}function _l(e,t,n){for(var r=0!=(1&e.mode);null!==Js;){var i=Js,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Ks;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Xs;s=Ks;var c=Xs;if(Ks=o,(Xs=l)&&!c)for(Js=i;null!==Js;)l=(o=Js).child,22===o.tag&&null!==o.memoizedState?xl(i):null!==l?(l.return=o,Js=l):xl(i);for(;null!==a;)Js=a,_l(a,t,n),a=a.sibling;Js=i,Ks=s,Xs=c}wl(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,Js=a):wl(e)}}function wl(e){for(;null!==Js;){var t=Js;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xs||il(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ga(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ba(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ba(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ft(h)}}}break;default:throw Error(a(163))}Xs||512&t.flags&&al(t)}catch(e){Oc(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function El(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{il(4,t)}catch(e){Oc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Oc(t,i,e)}}var a=t.return;try{al(t)}catch(e){Oc(t,a,e)}break;case 5:var o=t.return;try{al(t)}catch(e){Oc(t,o,e)}}}catch(e){Oc(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Sl,Ol=Math.ceil,Cl=_.ReactCurrentDispatcher,Tl=_.ReactCurrentOwner,Al=_.ReactCurrentBatchConfig,Ml=0,kl=null,Ll=null,Dl=0,Rl=0,Nl=Si(0),Il=0,Pl=null,$l=0,Bl=0,zl=0,Ul=null,jl=null,Fl=0,Vl=1/0,Hl=null,Gl=!1,Wl=null,ql=null,Zl=!1,Yl=null,Kl=0,Xl=0,Ql=null,Jl=-1,ec=0;function tc(){return 0!=(6&Ml)?Xe():-1!==Jl?Jl:Jl=Xe()}function nc(e){return 0==(1&e.mode)?1:0!=(2&Ml)&&0!==Dl?Dl&-Dl:null!==ma.transition?(0===ec&&(ec=mt()),ec):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function rc(e,t,n,r){if(50<Xl)throw Xl=0,Ql=null,Error(a(185));vt(e,n,r),0!=(2&Ml)&&e===kl||(e===kl&&(0==(2&Ml)&&(Bl|=n),4===Il&&lc(e,Dl)),ic(e,r),1===n&&0===Ml&&0==(1&t.mode)&&(Vl=Xe()+500,zi&&Fi()))}function ic(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=i[o];-1===l?0!=(s&n)&&0==(s&r)||(i[o]=ft(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===kl?Dl:0);if(0===r)null!==n&&Ze(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ze(n),1===t)0===e.tag?function(e){zi=!0,ji(e)}(cc.bind(null,e)):ji(cc.bind(null,e)),oi((function(){0==(6&Ml)&&Fi()})),n=null;else{switch(_t(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=kc(n,ac.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ac(e,t){if(Jl=-1,ec=0,0!=(6&Ml))throw Error(a(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=ht(e,e===kl?Dl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=vc(e,r);else{t=r;var i=Ml;Ml|=2;var o=mc();for(kl===e&&Dl===t||(Hl=null,Vl=Xe()+500,fc(e,t));;)try{bc();break}catch(t){pc(e,t)}wa(),Cl.current=o,Ml=i,null!==Ll?t=0:(kl=null,Dl=0,t=Il)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=oc(e,i)),1===t)throw n=Pl,fc(e,0),lc(e,r),ic(e,Xe()),n;if(6===t)lc(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!sr(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=vc(e,r))&&0!==(o=pt(e))&&(r=o,t=oc(e,o)),1===t))throw n=Pl,fc(e,0),lc(e,r),ic(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Ec(e,jl,Hl);break;case 3:if(lc(e,r),(130023424&r)===r&&10<(t=Fl+500-Xe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Ec.bind(null,e,jl,Hl),t);break}Ec(e,jl,Hl);break;case 4:if(lc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ol(r/1960))-r)){e.timeoutHandle=ri(Ec.bind(null,e,jl,Hl),r);break}Ec(e,jl,Hl);break;default:throw Error(a(329))}}}return ic(e,Xe()),e.callbackNode===n?ac.bind(null,e):null}function oc(e,t){var n=Ul;return e.current.memoizedState.isDehydrated&&(fc(e,t).flags|=256),2!==(e=vc(e,t))&&(t=jl,jl=n,null!==t&&sc(t)),e}function sc(e){null===jl?jl=e:jl.push.apply(jl,e)}function lc(e,t){for(t&=~zl,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function cc(e){if(0!=(6&Ml))throw Error(a(327));xc();var t=ht(e,0);if(0==(1&t))return ic(e,Xe()),null;var n=vc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Pl,fc(e,0),lc(e,t),ic(e,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ec(e,jl,Hl),ic(e,Xe()),null}function uc(e,t){var n=Ml;Ml|=1;try{return e(t)}finally{0===(Ml=n)&&(Vl=Xe()+500,zi&&Fi())}}function dc(e){null!==Yl&&0===Yl.tag&&0==(6&Ml)&&xc();var t=Ml;Ml|=1;var n=Al.transition,r=bt;try{if(Al.transition=null,bt=1,e)return e()}finally{bt=r,Al.transition=n,0==(6&(Ml=t))&&Fi()}}function hc(){Rl=Nl.current,Oi(Nl)}function fc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ll)for(n=Ll.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:io(),Oi(Mi),Oi(Ai),uo();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Oi(so);break;case 10:Ea(r.type._context);break;case 22:case 23:hc()}n=n.return}if(kl=e,Ll=e=Nc(e.current,null),Dl=Rl=t,Il=0,Pl=null,zl=Bl=$l=0,jl=Ul=null,null!==Ca){for(t=0;t<Ca.length;t++)if(null!==(r=(n=Ca[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Ca=null}return e}function pc(e,t){for(;;){var n=Ll;try{if(wa(),ho.current=os,yo){for(var r=mo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}yo=!1}if(po=0,vo=go=mo=null,bo=!1,_o=0,Tl.current=null,null===n||null===n.return){Il=1,Pl=t,Ll=null;break}e:{var o=e,s=n.return,l=n,c=t;if(t=Dl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vs(s);if(null!==p){p.flags&=-257,ys(p,s,l,0,t),1&p.mode&&gs(o,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){gs(o,u,t),gc();break e}c=Error(a(426))}else if(ia&&1&l.mode){var v=vs(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ys(v,s,l,0,t),pa(us(c,l));break e}}o=c=us(c,l),4!==Il&&(Il=2),null===Ul?Ul=[o]:Ul.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Pa(o,ps(0,c,t));break e;case 1:l=c;var y=o.type,b=o.stateNode;if(0==(128&o.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===ql||!ql.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Pa(o,ms(o,l,t));break e}}o=o.return}while(null!==o)}wc(n)}catch(e){t=e,Ll===n&&null!==n&&(Ll=n=n.return);continue}break}}function mc(){var e=Cl.current;return Cl.current=os,null===e?os:e}function gc(){0!==Il&&3!==Il&&2!==Il||(Il=4),null===kl||0==(268435455&$l)&&0==(268435455&Bl)||lc(kl,Dl)}function vc(e,t){var n=Ml;Ml|=2;var r=mc();for(kl===e&&Dl===t||(Hl=null,fc(e,t));;)try{yc();break}catch(t){pc(e,t)}if(wa(),Ml=n,Cl.current=r,null!==Ll)throw Error(a(261));return kl=null,Dl=0,Il}function yc(){for(;null!==Ll;)_c(Ll)}function bc(){for(;null!==Ll&&!Ye();)_c(Ll)}function _c(e){var t=Sl(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?wc(e):Ll=t,Tl.current=null}function wc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Zs(n,t,Rl)))return void(Ll=n)}else{if(null!==(n=Ys(n,t)))return n.flags&=32767,void(Ll=n);if(null===e)return Il=6,void(Ll=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ll=t);Ll=t=e}while(null!==t);0===Il&&(Il=5)}function Ec(e,t,n){var r=bt,i=Al.transition;try{Al.transition=null,bt=1,function(e,t,n,r){do{xc()}while(null!==Yl);if(0!=(6&Ml))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===kl&&(Ll=kl=null,Dl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Zl||(Zl=!0,kc(tt,(function(){return xc(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Al.transition,Al.transition=null;var s=bt;bt=1;var l=Ml;Ml|=4,Tl.current=null,function(e,t){if(ei=Ht,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ga(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(a(163))}}catch(e){Oc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=nl,nl=!1}(e,n),vl(n,e),pr(ti),Ht=!!ei,ti=ei=null,e.current=n,bl(n,e,i),Ke(),Ml=l,bt=s,Al.transition=o}else e.current=n;if(Zl&&(Zl=!1,Yl=e,Kl=i),0===(o=e.pendingLanes)&&(ql=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),ic(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Gl)throw Gl=!1,e=Wl,Wl=null,e;0!=(1&Kl)&&0!==e.tag&&xc(),0!=(1&(o=e.pendingLanes))?e===Ql?Xl++:(Xl=0,Ql=e):Xl=0,Fi()}(e,t,n,r)}finally{Al.transition=i,bt=r}return null}function xc(){if(null!==Yl){var e=_t(Kl),t=Al.transition,n=bt;try{if(Al.transition=null,bt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Kl=0,0!=(6&Ml))throw Error(a(331));var i=Ml;for(Ml|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(0!=(16&Js.flags)){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:rl(8,d,o)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var f=(d=Js).sibling,p=d.return;if(ol(d),d===u){Js=null;break}if(null!==f){f.return=p,Js=f;break}Js=p}}}var m=o.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Js=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,Js=s;else e:for(;null!==Js;){if(0!=(2048&(o=Js).flags))switch(o.tag){case 0:case 11:case 15:rl(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Js=y;break e}Js=o.return}}var b=e.current;for(Js=b;null!==Js;){var _=(s=Js).child;if(0!=(2064&s.subtreeFlags)&&null!==_)_.return=s,Js=_;else e:for(s=b;null!==Js;){if(0!=(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(e){Oc(l,l.return,e)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Ml=i,Fi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Al.transition=t}}return!1}function Sc(e,t,n){e=Na(e,t=ps(0,t=us(n,t),1),1),t=tc(),null!==e&&(vt(e,1,t),ic(e,t))}function Oc(e,t,n){if(3===e.tag)Sc(e,e,n);else for(;null!==t;){if(3===t.tag){Sc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r))){t=Na(t,e=ms(t,e=us(n,e),1),1),e=tc(),null!==t&&(vt(t,1,e),ic(t,e));break}}t=t.return}}function Cc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,kl===e&&(Dl&n)===n&&(4===Il||3===Il&&(130023424&Dl)===Dl&&500>Xe()-Fl?fc(e,0):zl|=n),ic(e,t)}function Tc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=tc();null!==(e=Ma(e,t))&&(vt(e,t,n),ic(e,n))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tc(e,n)}function Mc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Tc(e,n)}function kc(e,t){return qe(e,t)}function Lc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dc(e,t,n,r){return new Lc(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Dc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ic(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Rc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Pc(n.children,i,o,t);case S:s=8,i|=8;break;case O:return(e=Dc(12,n,t,2|i)).elementType=O,e.lanes=o,e;case M:return(e=Dc(13,n,t,i)).elementType=M,e.lanes=o,e;case k:return(e=Dc(19,n,t,i)).elementType=k,e.lanes=o,e;case R:return $c(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case T:s=9;break e;case A:s=11;break e;case L:s=14;break e;case D:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Dc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Pc(e,t,n,r){return(e=Dc(7,e,r,t)).lanes=n,e}function $c(e,t,n,r){return(e=Dc(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Bc(e,t,n){return(e=Dc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=Dc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jc(e,t,n,r,i,a,o,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Dc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},La(a),e}function Fc(e){if(!e)return Ti;e:{if(Fe(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Di(n))return Ii(e,n,t)}return t}function Vc(e,t,n,r,i,a,o,s,l){return(e=jc(n,r,!0,e,0,a,0,s,l)).context=Fc(null),n=e.current,(a=Ra(r=tc(),i=nc(n))).callback=null!=t?t:null,Na(n,a,i),e.current.lanes=i,vt(e,i,r),ic(e,r),e}function Hc(e,t,n,r){var i=t.current,a=tc(),o=nc(i);return n=Fc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ra(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Na(i,t,o))&&(rc(e,i,o,a),Ia(e,i,o)),o}function Gc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qc(e,t){Wc(e,t),(e=e.alternate)&&Wc(e,t)}Sl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Mi.current)_s=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return _s=!1,function(e,t,n){switch(t.tag){case 3:ks(t),fa();break;case 5:ao(t);break;case 1:Di(t.type)&&Pi(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(va,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(so,1&so.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Bs(e,t,n):(Ci(so,1&so.current),null!==(e=Gs(e,t,n))?e.sibling:null);Ci(so,1&so.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Vs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(so,so.current),r)break;return null;case 22:case 23:return t.lanes=0,Os(e,t,n)}return Gs(e,t,n)}(e,t,n);_s=0!=(131072&e.flags)}else _s=!1,ia&&0!=(1048576&t.flags)&&Ji(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Li(t,Ai.current);Sa(t,n),i=So(null,t,r,e,i,n);var o=Oo();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(r)?(o=!0,Pi(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,La(t),i.updater=ja,t.stateNode=i,i._reactInternals=t,Ga(t,r,e,n),t=Ms(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Rc(e)?1:0;if(null!=e){if((e=e.$$typeof)===A)return 11;if(e===L)return 14}return 2}(r),e=ga(r,e),i){case 0:t=Ts(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=Es(null,t,r,e,n);break e;case 14:t=xs(null,t,r,ga(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 1:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 3:e:{if(ks(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Da(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ls(e,t,r,n,i=us(Error(a(423)),t));break e}if(r!==i){t=Ls(e,t,r,n,i=us(Error(a(424)),t));break e}for(ra=ci(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fa(),r===i){t=Gs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&ca(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Cs(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&ca(t),null;case 13:return Bs(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ka(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Es(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ci(va,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Mi.current){t=Gs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Ra(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),xa(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),xa(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sa(t,n),r=r(i=Oa(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ga(r=t.type,t.pendingProps),xs(e,t,r,i=ga(r.type,i),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ga(r,i),Hs(e,t),t.tag=1,Di(r)?(e=!0,Pi(t)):e=!1,Sa(t,n),Va(t,r,i),Ga(t,r,i,n),Ms(null,t,r,!0,e,n);case 19:return Vs(e,t,n);case 22:return Os(e,t,n)}throw Error(a(156,t.tag))};var Zc="function"==typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function eu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=Gc(o);s.call(e)}}Hc(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=Gc(o);a.call(e)}}var o=Vc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=o,e[pi]=o.current,Fr(8===e.nodeType?e.parentNode:e),dc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Gc(l);s.call(e)}}var l=jc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[pi]=l.current,Fr(8===e.nodeType?e.parentNode:e),dc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return Gc(o)}Kc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hc(e,t,null,null)},Kc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc((function(){Hc(null,e,null,null)})),t[pi]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rt.length&&0!==t&&t<Rt[n].priority;n++);Rt.splice(n,0,e),0===n&&$t(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ic(t,Xe()),0==(6&Ml)&&(Vl=Xe()+500,Fi()))}break;case 13:dc((function(){var t=Ma(e,1);if(null!==t){var n=tc();rc(t,e,1,n)}})),qc(e,1)}},Et=function(e){if(13===e.tag){var t=Ma(e,134217728);null!==t&&rc(t,e,134217728,tc()),qc(e,134217728)}},xt=function(e){if(13===e.tag){var t=nc(e),n=Ma(e,t);null!==n&&rc(n,e,t,tc()),qc(e,t)}},St=function(){return bt},Ot=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ee=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));q(r),Q(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=uc,Me=dc;var tu={usingClientEntryPoint:!1,Events:[bi,_i,wi,Ce,Te,uc]},nu={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(ru),at=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xc(e))throw Error(a(299));var n=!1,r="",i=Zc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Fr(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Zc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Vc(t,null,e,1,null!=n?n:null,i,0,o,s),e[pi]=t.current,Fr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Kc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(a(40));return!!e._reactRootContainer&&(dc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=uc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},8316:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},6475:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,R(E);else{var t=r(u);null!==t&&N(w,t.startTime-e)}}function E(e,n){m=!1,g&&(g=!1,y(C),C=-1),p=!0;var a=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!M());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&N(w,d.startTime-n),l=!1}return l}finally{h=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,O=null,C=-1,T=5,A=-1;function M(){return!(t.unstable_now()-A<T)}function k(){if(null!==O){var e=t.unstable_now();A=e;var n=!0;try{n=O(!0,e)}finally{n?x():(S=!1,O=null)}}else S=!1}if("function"==typeof b)x=function(){b(k)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,D=L.port2;L.port1.onmessage=k,x=function(){D.postMessage(null)}}else x=function(){v(k,0)};function R(e){O=e,S||(S=!0,x())}function N(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,R(E))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(C),C=-1):g=!0,N(w,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,R(E))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},7210:(e,t,n)=>{"use strict";var r=n(2870),i=(r.Type.String,r.Type.String,r.Type.Boolean,r.Type.String,r.Type.Array,r.Type.ConceptUuid,r.Type.String,r.Type.String,r.Type.Number,r.validators.inRange(0,10),r.Type.Number,r.Type.Boolean,r.Type.Array,r.Type.String,r.Type.String,r.Type.Boolean,n(7900)),a=n.n(i),o=n(4924),s=n(9449),l=n(5508),c=n(2074),u=n(4556),d=n(3255);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=(0,r.useConfig)(),o=a.encounterTypes,s=a.data,l=o.length?"&encounter.type=".concat(o.toString()):"",c="".concat(r.fhirBaseUrl,"/Observation?subject:Patient=").concat(e,"&code=").concat(s.map((function(e){return e.concept})).join(","),"&_summary=data&_sort=-date&_count=").concat(100).concat(l);i&&(c+="&_include=Observation:encounter");var u,f=(0,d.ZP)(c,r.openmrsFetch),p=f.data,m=f.error,g=f.isLoading,v=f.isValidating,y=i?null==(u=null==p||null===(t=p.data)||void 0===t?void 0:t.entry)?void 0:u.filter((function(e){var t;return"Encounter"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})).map((function(e){var t,n,r,i;return{reference:"Encounter/".concat(e.resource.id),display:(null===(i=e.resource.type)||void 0===i||null===(r=i[0])||void 0===r||null===(n=r.coding)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.display)||"--"}})):[],b=function(e,t){var n;return(null==e||null===(n=e.filter((function(e){var t;return"Observation"===(null==e||null===(t=e.resource)||void 0===t?void 0:t.resourceType)})))||void 0===n?void 0:n.map((function(e){var n,r,i,a,o=e.resource,s=(i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}({},o),a=null!=(a={conceptUuid:null===(n=o.code.coding.find((function(e){return 36===e.code.length})))||void 0===n?void 0:n.code})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(a)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))})),i);return o.hasOwnProperty("valueDateTime")&&(s.dataType="DateTime"),e.resource.hasOwnProperty("valueString")&&(s.dataType="Text"),e.resource.hasOwnProperty("valueQuantity")&&(s.dataType="Number"),e.resource.hasOwnProperty("valueCodeableConcept")&&(s.dataType="Coded"),s.encounter.name=null===(r=t.find((function(e){return e.reference===o.encounter.reference})))||void 0===r?void 0:r.display,s})))||[]}(null==p||null===(n=p.data)||void 0===n?void 0:n.entry,y);return{data:b,error:m,isLoading:g,isValidating:v}}var p=n(2779),m=n.n(p),g=n(419),v=n(321),y=n.n(v),b=n(1195),_=n.n(b),w=n(3275),E=n.n(w),x=n(7162),S=n.n(x),O=n(2094),C=n.n(O),T=n(757),A=n.n(T),M=n(4512),k={};k.styleTagTransform=A(),k.setAttributes=S(),k.insert=E().bind(null,"head"),k.domAPI=_(),k.insertStyleElement=C(),y()(M.Z,k);const L=M.Z&&M.Z.locals?M.Z.locals:void 0;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R;!function(e){e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio"}(R||(R={}));const N=function(e){var t,n,l,c,u=e.patientUuid,d=(0,o.useTranslation)().t,h=(0,r.useConfig)(),p=f(u).data,v=(l=a().useState({label:null===(t=h.data[0])||void 0===t?void 0:t.label,uuid:null===(n=h.data[0])||void 0===n?void 0:n.concept}),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(l,c)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=v[0],b=v[1],_=(0,i.useMemo)((function(){var e=p.filter((function(e){return e.conceptUuid===y.uuid&&"Number"===e.dataType})).map((function(e){return{group:y.label,key:(0,r.formatDate)(new Date(e.effectiveDateTime),{year:!0,time:!1}),value:e.valueQuantity.value}}));return h.graphOldestFirst&&e.reverse(),e}),[p,h.graphOldestFirst,y.uuid,y.label]),w=Object.fromEntries(h.data.map((function(e){return[e.label,e.color]}))),E={axes:{bottom:{title:"Date",mapsTo:"key",scaleType:"labels"},left:{mapsTo:"value",title:y.label,scaleType:"linear",includeZero:!1}},legend:{enabled:!1},color:{scale:w},height:"400px"};return a().createElement(a().Fragment,null,a().createElement("div",{className:L.graphContainer},a().createElement("div",{className:L.conceptPickerTabs},a().createElement("label",{className:L.conceptLabel,htmlFor:"concept-tab-group"},d("displaying","Displaying")),a().createElement(s.mQc,{id:"concept-tab-group",className:L.verticalTabs,type:"default"},a().createElement(s.tdY,{className:L.tablist,"aria-label":"Obs tabs"},h.data.map((function(e,t){var n,r,i,o=e.concept,l=e.label,c=m()(L.tab,L.bodyLong01,(n={},r=L.selectedTab,i=y.label===l,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));return a().createElement(s.OK9,{key:o,className:c,onClick:function(){return b({label:l,uuid:o})}},l)}))))),a().createElement("div",{className:L.lineChartContainer},a().createElement(g.LineChart,{data:_.flat(),options:E}))),h.interpretationSlot?a().createElement("div",null,a().createElement(r.ExtensionSlot,{name:h.interpretationSlot,style:{gridTemplateColumns:"1fr"}})):null)};var I=n(5136),P={};P.styleTagTransform=A(),P.setAttributes=S(),P.insert=E().bind(null,"head"),P.domAPI=_(),P.insertStyleElement=C(),y()(I.Z,P);const $=I.Z&&I.Z.locals?I.Z.locals:void 0;function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){z(e,t,n[t])}))}return e}function j(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const F=function(e){var t=e.patientUuid,n=(0,o.useTranslation)().t,i=(0,r.useConfig)(),l=f(t,i.showEncounterType),c=l.data,d=(l.error,l.isLoading,l.isValidating,j(new Set(c.map((function(e){return e.issued})))).sort().map((function(e){return c.filter((function(t){return t.issued===e}))}))),h=[{key:"date",header:n("dateAndTime","Date and time"),isSortable:!0}].concat(j(i.data.map((function(e){return{key:e.concept,header:e.label}}))));i.showEncounterType&&h.splice(1,0,{key:"encounter",header:n("encounterType","Encounter type"),isSortable:!0});var p=a().useMemo((function(){return null==d?void 0:d.map((function(e,t){var n={id:"".concat(t),date:(0,r.formatDatetime)(new Date(e[0].effectiveDateTime),{mode:"wide"}),encounter:e[0].encounter.name},a=!0,o=!1,s=void 0;try{for(var l,c=function(){var e=l.value;switch(e.dataType){case"Text":n[e.conceptUuid]=e.valueString;break;case"Number":var t,a,o,s,c,u=null===(t=i.data.find((function(t){return t.concept===e.conceptUuid})))||void 0===t?void 0:t.decimalPlaces;(null===(a=e.valueQuantity)||void 0===a?void 0:a.value)%1!=0?n[e.conceptUuid]=u>0?null===(o=e.valueQuantity)||void 0===o?void 0:o.value.toFixed(u):null===(s=e.valueQuantity)||void 0===s?void 0:s.value.toFixed(2):n[e.conceptUuid]=null===(c=e.valueQuantity)||void 0===c?void 0:c.value;break;case"Coded":var d,h;n[e.conceptUuid]=null===(h=e.valueCodeableConcept)||void 0===h||null===(d=h.coding[0])||void 0===d?void 0:d.display;break;case"DateTime":"dateTime"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"}):"time"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatTime)(new Date(e.valueDateTime)):"date"===(null==i?void 0:i.dateFormat)?n[e.conceptUuid]=(0,r.formatDate)(new Date(e.valueDateTime),{mode:"standard"}):n[e.conceptUuid]=(0,r.formatDatetime)(new Date(e.valueDateTime),{mode:"standard"})}},u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0)c()}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return n}))}),[i,d]),m=(0,r.usePagination)(p,i.table.pageSize),g=m.results,v=m.goTo,y=m.currentPage;return a().createElement("div",null,a().createElement(s.wQF,{rows:g,headers:h,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var t,n,r=e.rows,i=e.headers,o=e.getHeaderProps,l=e.getTableProps;return a().createElement(s.xJi,null,a().createElement(s.iA_,(t=U({},l()),n=null!=(n={className:$.customRow})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})),t),a().createElement(s.ssF,null,a().createElement(s.SCH,null,i.map((function(e){var t,n;return a().createElement(s.xDH,U({className:$.tableHeader},o({header:e,isSortable:e.isSortable})),null!==(n=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==n?n:e.header)})))),a().createElement(s.RMI,null,r.map((function(e){return a().createElement(s.SCH,{key:e.id},e.cells.map((function(e){var t,n,r;return a().createElement(s.pj1,{key:e.id},null!==(r=null!==(n=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==n?n:e.value)&&void 0!==r?r:"--")})))})))))})),a().createElement(u.PatientChartPagination,{pageNumber:y,totalItems:p.length,currentItems:g.length,pageSize:i.table.pageSize,onPageNumberChange:function(e){var t=e.page;return v(t)}}))};var V=n(1897),H={};H.styleTagTransform=A(),H.setAttributes=S(),H.insert=E().bind(null,"head"),H.domAPI=_(),H.insertStyleElement=C(),y()(V.Z,H);const G=V.Z&&V.Z.locals?V.Z.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){q(e,t,n[t])}))}return e}n(3979);var Y={featureName:"Generic widgets",moduleName:"@openmrs/esm-generic-patient-widgets-app"};(0,r.getSyncLifecycle)((function(e){var t,n,i=e.patientUuid,d=(0,o.useTranslation)().t,h=(0,r.useConfig)(),p=(t=a().useState(h.showGraphByDefault),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],g=p[1],v=f(i),y=v.data,b=v.error,_=v.isLoading,w=v.isValidating,E=y.find((function(e){return"Number"===e.dataType}));return a().createElement(a().Fragment,null,_?a().createElement(s.gqd,{role:"progressbar"}):b?a().createElement(u.ErrorState,{error:b,headerTitle:h.title}):(null==y?void 0:y.length)?a().createElement("div",{className:G.widgetContainer},a().createElement(u.CardHeader,{title:h.title},a().createElement("div",{className:G.backgroundDataFetchingIndicator},a().createElement("span",null,w?a().createElement(s.lSo,null):null)),E?a().createElement("div",{className:G.headerActionItems},a().createElement("div",{className:G.toggleButtons},a().createElement(s.zxk,{className:G.toggle,size:"md",kind:m?"ghost":"tertiary",hasIconOnly:!0,renderIcon:function(e){return a().createElement(l.iA,Z({size:16},e))},iconDescription:d("tableView","Table View"),onClick:function(){return g(!1)}}),a().createElement(s.zxk,{className:G.toggle,size:"md",kind:m?"tertiary":"ghost",hasIconOnly:!0,renderIcon:function(e){return a().createElement(c.eA,Z({size:16},e))},iconDescription:d("chartView","Chart View"),onClick:function(){return g(!0)}}))):null),m&&E?a().createElement(N,{patientUuid:i}):a().createElement(F,{patientUuid:i})):a().createElement(u.EmptyState,{displayText:h.resultsName,headerTitle:h.title}))}),Y)},452:(e,t,n)=>{"use strict";var r=n(7900),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),o((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},3100:(e,t,n)=>{"use strict";e.exports=n(452)},3883:function(e,t,n){"use strict";e.exports="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||this},3979:(e,t,n)=>{var r={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i},3255:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(7900),i=n(3100),a=n(3325);const o=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),s={dedupe:!0},l=(a.OBJECT.defineProperty(a.SWRConfig,"defaultValue",{value:a.defaultConfig}),(0,a.withArgs)(((e,t,n)=>{const{cache:l,compare:c,suspense:u,fallbackData:d,revalidateOnMount:h,revalidateIfStale:f,refreshInterval:p,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:v}=n,[y,b,_,w]=a.SWRGlobalState.get(l),[E,x]=(0,a.serialize)(e),S=(0,r.useRef)(!1),O=(0,r.useRef)(!1),C=(0,r.useRef)(E),T=(0,r.useRef)(t),A=(0,r.useRef)(n),M=()=>A.current,k=()=>M().isVisible()&&M().isOnline(),[L,D,R,N]=(0,a.createCacheHelper)(l,E),I=(0,r.useRef)({}).current,P=(0,a.isUndefined)(d)?n.fallback[E]:d,$=(e,t)=>{for(const n in I){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,a.isUndefined)(e[r]))return!1;if(!c(W,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},B=(0,r.useMemo)((()=>{const e=!!E&&!!t&&((0,a.isUndefined)(h)?!M().isPaused()&&!u&&(!!(0,a.isUndefined)(f)||f):h),n=t=>{const n=(0,a.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=L(),i=N(),o=n(r),s=r===i?o:n(i);let l=o;return[()=>{const e=n(L());return $(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>s]}),[l,E]),z=(0,i.useSyncExternalStore)((0,r.useCallback)((e=>R(E,((t,n)=>{$(n,t)||e()}))),[l,E]),B[0],B[1]),U=!S.current,j=y[E]&&y[E].length>0,F=z.data,V=(0,a.isUndefined)(F)?P:F,H=z.error,G=(0,r.useRef)(V),W=v?(0,a.isUndefined)(F)?G.current:F:V,q=!(j&&!(0,a.isUndefined)(H))&&(U&&!(0,a.isUndefined)(h)?h:!M().isPaused()&&(u?!(0,a.isUndefined)(V)&&f:(0,a.isUndefined)(V)||f)),Z=!!(E&&t&&U&&q),Y=(0,a.isUndefined)(z.isValidating)?Z:z.isValidating,K=(0,a.isUndefined)(z.isLoading)?Z:z.isLoading,X=(0,r.useCallback)((async e=>{const t=T.current;if(!E||!t||O.current||M().isPaused())return!1;let r,i,o=!0;const s=e||{},l=!_[E]||!s.dedupe,u=()=>a.IS_REACT_LEGACY?!O.current&&E===C.current&&S.current:E===C.current,d={isValidating:!1,isLoading:!1},h=()=>{D(d)},f=()=>{const e=_[E];e&&e[1]===i&&delete _[E]},p={isValidating:!0};(0,a.isUndefined)(L().data)&&(p.isLoading=!0);try{if(l&&(D(p),n.loadingTimeout&&(0,a.isUndefined)(L().data)&&setTimeout((()=>{o&&u()&&M().onLoadingSlow(E,n)}),n.loadingTimeout),_[E]=[t(x),(0,a.getTimestamp)()]),[r,i]=_[E],r=await r,l&&setTimeout(f,n.dedupingInterval),!_[E]||_[E][1]!==i)return l&&u()&&M().onDiscarded(E),!1;d.error=a.UNDEFINED;const e=b[E];if(!(0,a.isUndefined)(e)&&(i<=e[0]||i<=e[1]||0===e[1]))return h(),l&&u()&&M().onDiscarded(E),!1;const s=L().data;d.data=c(s,r)?s:r,l&&u()&&M().onSuccess(r,E,n)}catch(e){f();const t=M(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,l&&u()&&(t.onError(e,E,t),(!0===n||(0,a.isFunction)(n)&&n(e))&&k()&&t.onErrorRetry(e,E,t,(e=>{const t=y[E];t&&t[0]&&t[0](a.revalidateEvents.ERROR_REVALIDATE_EVENT,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,h(),!0}),[E,l]),Q=(0,r.useCallback)(((...e)=>(0,a.internalMutate)(l,C.current,...e)),[]);if((0,a.useIsomorphicLayoutEffect)((()=>{T.current=t,A.current=n,(0,a.isUndefined)(F)||(G.current=F)})),(0,a.useIsomorphicLayoutEffect)((()=>{if(!E)return;const e=X.bind(a.UNDEFINED,s);let t=0;const n=(0,a.subscribeCallback)(E,y,((n,r={})=>{if(n==a.revalidateEvents.FOCUS_EVENT){const n=Date.now();M().revalidateOnFocus&&n>t&&k()&&(t=n+M().focusThrottleInterval,e())}else if(n==a.revalidateEvents.RECONNECT_EVENT)M().revalidateOnReconnect&&k()&&e();else{if(n==a.revalidateEvents.MUTATE_EVENT)return X();if(n==a.revalidateEvents.ERROR_REVALIDATE_EVENT)return X(r)}}));return O.current=!1,C.current=E,S.current=!0,D({_k:x}),q&&((0,a.isUndefined)(V)||a.IS_SERVER?e():(0,a.rAF)(e)),()=>{O.current=!0,n()}}),[E]),(0,a.useIsomorphicLayoutEffect)((()=>{let e;function t(){const t=(0,a.isFunction)(p)?p(L().data):p;t&&-1!==e&&(e=setTimeout(n,t))}function n(){L().error||!m&&!M().isVisible()||!g&&!M().isOnline()?t():X(s).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[p,m,g,E]),(0,r.useDebugValue)(W),u&&(0,a.isUndefined)(V)&&E){if(!a.IS_REACT_LEGACY&&a.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");T.current=t,A.current=n,O.current=!1;const e=w[E];if(!(0,a.isUndefined)(e)){const t=Q(e);o(t)}if(!(0,a.isUndefined)(H))throw H;{const e=X(s);(0,a.isUndefined)(W)||(e.status="fulfilled",e.value=!0),o(e)}}return{mutate:Q,get data(){return I.data=!0,W},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,Y},get isLoading(){return I.isLoading=!0,K}}})))}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.m=n,i.c=r,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@openmrs/esm-generic-patient-widgets-app:",i.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var s,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+a),s.src=n),e[n]=[r];var h=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{i.S={};var e={},t={};i.I=(n,r)=>{r||(r=[]);var a=t[n];if(a||(a=t[n]={}),!(r.indexOf(a)>=0)){if(r.push(a),e[n])return e[n];i.o(i.S,n)||(i.S[n]={});var o=i.S[n],s="@openmrs/esm-generic-patient-widgets-app",l=(e,t,n,r)=>{var i=o[e]=o[e]||{},a=i[t];(!a||!a.loaded&&(!r!=!a.eager?r:s>a.from))&&(i[t]={get:n,from:s,eager:!!r})},c=[];return"default"===n&&(l("@openmrs/esm-framework","5.2.1-pre.1156",(()=>Promise.all([i.e(130),i.e(900)]).then((()=>()=>i(130))))),l("@openmrs/esm-patient-common-lib","6.0.0",(()=>Promise.all([i.e(255),i.e(750),i.e(779),i.e(900),i.e(325),i.e(545),i.e(496)]).then((()=>()=>i(9545))))),l("react-i18next","11.18.6",(()=>Promise.all([i.e(553),i.e(900)]).then((()=>()=>i(9553))))),l("react-router-dom","6.16.0",(()=>Promise.all([i.e(591),i.e(900)]).then((()=>()=>i(6591))))),l("react","18.2.0",(()=>i.e(784).then((()=>()=>i(2784))))),l("swr/_internal","2.2.4",(()=>Promise.all([i.e(729),i.e(900)]).then((()=>()=>i(4729))))),l("swr/immutable","2.2.4",(()=>Promise.all([i.e(255),i.e(900),i.e(325),i.e(303)]).then((()=>()=>i(2303)))))),e[n]=c.length?Promise.all(c).then((()=>e[n]=1)):1}}})(),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map((e=>+e==e?+e:e)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var i=1,a=1;a<e.length;a++)i--,r+="u"==(typeof(s=e[a]))[0]?"-":(i>0?".":"")+(i=2,s);return r}var o=[];for(a=1;a<e.length;a++){var s=e[a];o.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?o.pop()+" "+o.pop():t(s))}return l();function l(){return o.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var i=t[0],a=i<0;a&&(i=-i-1);for(var o=0,s=1,l=!0;;s++,o++){var c,u,d=s<t.length?(typeof t[s])[0]:"";if(o>=r.length||"o"==(u=(typeof(c=r[o]))[0]))return!l||("u"==d?s>i&&!a:""==d!=a);if("u"==u){if(!l||"u"!=d)return!1}else if(l)if(d==u)if(s<=i){if(c!=t[s])return!1}else{if(a?c>t[s]:c<t[s])return!1;c!=t[s]&&(l=!1)}else if("s"!=d&&"n"!=d){if(a||s<=i)return!1;l=!1,s--}else{if(s<=i||u<d!=a)return!1;l=!1}else"s"!=d&&"n"!=d&&(l=!1,s--)}}var h=[],f=h.pop.bind(h);for(o=1;o<t.length;o++){var p=t[o];h.push(1==p?f()|f():2==p?f()&f():p?n(p,r):!f())}return!!f()},r=(t,n)=>{var r=t[n];return Object.keys(r).reduce(((t,n)=>!t||!r[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var i=t[r],a=(typeof i)[0];if(r>=n.length)return"u"==a;var o=n[r],s=(typeof o)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&i!=o)return i<o;r++}})(t,n)?n:t),0)},a=(e,i,a,l)=>{var c=r(e,a);return n(l,c)||o(((e,n,r,i)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(i)+")")(e,a,c,l)),s(e[a][c])},o=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},s=e=>(e.loaded=1,e.get()),l=e=>function(t,n,r,a){var o=i.I(t);return o&&o.then?o.then(e.bind(e,t,i.S[t],n,r,a)):e(t,i.S[t],n,r,a)},c=l(((e,t,n,a)=>t&&i.o(t,n)?((e,t,n,i)=>{var a=r(e,n);return s(e[n][a])})(t,0,n):a())),u=l(((e,t,n,r,o)=>t&&i.o(t,n)?a(t,0,n,r):o())),d={},h={6081:()=>c("default","@openmrs/esm-framework/src/internal",(()=>i.e(130).then((()=>()=>i(130))))),8744:()=>u("default","react-router-dom",[1,6],(()=>i.e(591).then((()=>()=>i(6591))))),9198:()=>u("default","swr/immutable",[1,2],(()=>i.e(152).then((()=>()=>i(2303))))),7900:()=>u("default","react",[1,18,2,0],(()=>i.e(784).then((()=>()=>i(2784))))),3325:()=>u("default","swr/_internal",[1,2],(()=>i.e(729).then((()=>()=>i(4729))))),2870:()=>u("default","@openmrs/esm-framework",[1,5],(()=>i.e(130).then((()=>()=>i(130))))),4556:()=>u("default","@openmrs/esm-patient-common-lib",[1,5],(()=>Promise.all([i.e(779),i.e(545)]).then((()=>()=>i(9545))))),4924:()=>u("default","react-i18next",[1,11],(()=>i.e(553).then((()=>()=>i(9553)))))};[2870,7900,4924,4556,3325].forEach((e=>{i.m[e]=t=>{d[e]=0,delete i.c[e];var n=h[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}}));var f={325:[3325],496:[2870,4556,4924],545:[6081,8744,9198],900:[7900]};i.f.consumes=(e,t)=>{i.o(f,e)&&f[e].forEach((e=>{if(i.o(d,e))return t.push(d[e]);var n=t=>{d[e]=0,i.m[e]=n=>{delete i.c[e],n.exports=t()}},r=t=>{delete d[e],i.m[e]=n=>{throw delete i.c[e],t}};try{var a=h[e]();a.then?t.push(d[e]=a.then(n).catch(r)):n(a)}catch(e){r(e)}}))}})(),(()=>{var e={179:0,496:0,900:0,210:0,255:0,750:0,904:0,325:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(325|496|900)$/.test(t))e[t]=0;else{var a=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=a);var o=i.p+i.u(t),s=new Error;i.l(o,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,s,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);l&&l(i)}for(t&&t(n);c<o.length;c++)a=o[c],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app=globalThis.webpackChunk_openmrs_esm_generic_patient_widgets_app||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0,i(7210)})();
|