@openmrs/esm-patient-vitals-app 9.2.3-pre.7164 → 9.2.3-pre.7171
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 +4 -4
- package/dist/3368.js +1 -1
- package/dist/3368.js.map +1 -1
- package/dist/4716.js +1 -1
- package/dist/4716.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-vitals-app.js.buildmanifest.json +9 -9
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/biometrics/biometrics-base.component.tsx +9 -3
- package/src/biometrics/biometrics-chart.component.tsx +52 -46
- package/src/biometrics/biometrics-chart.scss +3 -45
- package/src/biometrics/biometrics-overview.test.tsx +16 -0
- package/src/biometrics/paginated-biometrics.component.tsx +10 -11
- package/src/vitals/vitals-chart.component.tsx +67 -65
- package/src/vitals/vitals-chart.scss +3 -45
- package/src/vitals/vitals-overview.test.tsx +16 -0
package/dist/3368.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3368.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[3368],{9247:(e,t,n)=>{"use strict";function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{A:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(9067),d=n.n(u),h=n(1343),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:i,xmlns:u="http://www.w3.org/2000/svg",preserveAspectRatio:d="xMidYMid meet",...h}=e;const{tabindex:p,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,i=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=a(e,s),d=u.tabindex,h=a(u,l),f=o(o(o({},c),h),{},{width:t,height:n,viewBox:i});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}({...h,tabindex:i}),g=m;return n&&(g.className=n),null!=p&&(g.tabIndex="number"==typeof p?p:Number(i)),t&&(g.ref=t),u&&(g.xmlns=u),d&&(g.preserveAspectRatio=d),f().createElement("svg",g,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().oneOfType([d().bool,d().oneOf(["true","false"])]),"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().oneOfType([d().number,d().string]),viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string}},5848:(e,t,n)=>{"use strict";n.d(t,{Do:()=>E,OM:()=>v,Qp:()=>w,j0:()=>b,on:()=>y});var r,i,o,a,s,l,c,u,d,h,f,p=n(1343),m=n.n(p),g=n(9247);const v=m().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return m().createElement(g.A,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=m().createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),n)})),y=m().forwardRef((function(e,t){let{children:n,size:r=16,...a}=e;return m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},i||(i=m().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"})),o||(o=m().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)})),b=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},a||(a=m().createElement("path",{d:"M4,2H2V28a2,2,0,0,0,2,2H30V28H4Z"})),s||(s=m().createElement("path",{d:"M30,9H23v2h3.59L19,18.59l-4.29-4.3a1,1,0,0,0-1.42,0L6,21.59,7.41,23,14,16.41l4.29,4.3a1,1,0,0,0,1.42,0L28,12.41V16h2Z"})),n)})),w=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},l||(l=m().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?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=m().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?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},u||(u=m().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):m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},d||(d=m().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)})),E=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},h||(h=m().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):m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=m().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)}))},4389:(e,t,n)=>{"use strict";n.d(t,{NA:()=>l,XI:()=>c});var r,i,o=n(1343),a=n.n(o),s=n(9247);const l=a().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a().createElement(s.A,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=a().createElement("path",{d:"M8 15H24V17H8z"})),n)})),c=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(s.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},i||(i=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)}))},5951:(e,t,n)=>{"use strict";n.d(t,{BF:()=>x,N5:()=>E,OR:()=>_});var r,i,o,a,s,l,c,u,d,h,f,p,m,g,v,y=n(1343),b=n.n(y),w=n(9247);const E=b().forwardRef((function(e,t){let{children:n,size:s=16,...l}=e;return 16===s||"16"===s||"16px"===s?b().createElement(w.A,{width:s,height:s,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...l},r||(r=b().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S11.3,14,8,14z"})),i||(i=b().createElement("path",{d:"M7.5 4H8.5V9H7.5zM8 10.2c-.4 0-.8.3-.8.8s.3.8.8.8c.4 0 .8-.3.8-.8S8.4 10.2 8 10.2z"})),n):b().createElement(w.A,{width:s,height:s,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...l},o||(o=b().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),a||(a=b().createElement("path",{d:"M15 8H17V19H15zM16 22a1.5 1.5 0 101.5 1.5A1.5 1.5 0 0016 22z"})),n)})),_=b().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},s||(s=b().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"})),l||(l=b().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"})),c||(c=b().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)})),x=b().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},u||(u=b().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"})),d||(d=b().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?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},h||(h=b().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"})),f||(f=b().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?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},p||(p=b().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"})),m||(m=b().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):b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},g||(g=b().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"})),v||(v=b().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)}))},4698:(e,t,n)=>{"use strict";n.d(t,{$nd:()=>ze,Te$:()=>Fe,k_N:()=>He,VPZ:()=>ut,Tps:()=>Ke,bQt:()=>ao,OOb:()=>et,lVW:()=>tt,lRv:()=>ot,aMY:()=>Vn,OuH:()=>Gt,jeF:()=>wn,Q7x:()=>Nn,Rzj:()=>En,fI1:()=>at,BJc:()=>Fn,ozo:()=>lr,wbY:()=>ar,XIK:()=>kr,BFY:()=>Br,nA6:()=>zr,K3K:()=>jr,ndF:()=>Zr,A0N:()=>ni,Hjg:()=>ri,tUM:()=>or,vwO:()=>pr,fs1:()=>mr});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_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_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?r.enableV12TileRadioIcons=!0:r.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?r.enableTreeviewControllable=!0:r.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?r.enableV12StructuredListVisibleIcons=!0:r.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?r.enableExperimentalFocusWrapWithoutSentinels=!0:r.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?r.enableDialogElement=!0:r.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?r.enableV12DynamicFloatingStyles=!0:r.enableV12DynamicFloatingStyles=!1}catch(e){r.enableCssCustomProperties=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12TileRadioIcons=!1,r.enableV12Overflowmenu=!1,r.enableTreeviewControllable=!1,r.enableV12StructuredListVisibleIcons=!1,r.enableExperimentalFocusWrapWithoutSentinels=!1,r.enableDialogElement=!1,r.enableV12DynamicFloatingStyles=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{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-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:r.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:r.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:r.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:r.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:r.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:r.enableV12DynamicFloatingStyles}];function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,l(r.key),r)}}function s(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,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||c(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 l(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function c(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(e,t):void 0}}for(var u=function(){return e=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])}))},t=[{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){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=c(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=s(t.value,2),i=r[0],o=r[1];this.flags.has(i)||this.flags.set(i,o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),d=new u(void 0),h=0;h<i.length;h++){var f=i[h];d.add(f.name,f.enabled)}function p(){return d.enabled.apply(d,arguments)}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(null,arguments)}!function(){d.merge.apply(d,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var v=n(9067),y=n.n(v),b=n(1343),w=n.t(b,2),E=n.n(b),_=n(3373),x=n.n(_);const T={};function S(e,t,n){return function(r,i,o){if(void 0!==r[i]){if(!T[o]||!T[o][i]){T[o]={...T[o],[i]:!0};const e=r[i];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];return e(r,i,o,...s)}}}const O="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,A=e=>(0,b.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e),M=E().createContext("cds");function C(){return E().useContext(M)}function N(e,t,n){const r=(0,b.useRef)(null);(0,b.useEffect)((()=>{r.current=n}),[n]),(0,b.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 k(e,t){const n=(0,b.useRef)(null);(0,b.useEffect)((()=>{n.current=t}),[t]),(0,b.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}function R(e){return!("undefined"==typeof window)&&(e instanceof Element||e instanceof(t=e,(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window).Element);var t,n}n(1085);var D=n(3144),I=n(793),L="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function $(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!$(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(!("_owner"===n&&e.$$typeof||$(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function P(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B(e,t){const n=P(e);return Math.round(t*n)/n}function z(e){const t=b.useRef(e);return L((()=>{t.current=e})),t}const H=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,I.UE)({element:n.current,padding:r}).fn(t):{}:n?(0,I.UE)({element:n,padding:r}).fn(t):{};var i}}),F=(e,t)=>({...(0,I.UU)(e),options:[e,t]}),U=(e,t)=>({...(0,I.jD)(e),options:[e,t]}),j=(e,t)=>({...H(e),options:[e,t]});const V={...w},G=V.useInsertionEffect||(e=>e());var W="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;let q=!1,Y=0;const Z=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Y++,X=V.useId||function(){const[e,t]=b.useState((()=>q?Z():void 0));return W((()=>{null==e&&t(Z())}),[]),b.useEffect((()=>{q=!0}),[]),e};const K=b.createContext(null),Q=b.createContext(null);function J(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=X(),o=b.useRef({}),[a]=b.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),s=null!=((null==(f=b.useContext(K))?void 0:f.id)||null),[l,c]=b.useState(r.reference),u=function(e){const t=b.useRef((()=>{}));return G((()=>{t.current=e})),b.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),d=b.useMemo((()=>({setPositionReference:c})),[]),h=b.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);var f;return b.useMemo((()=>({dataRef:o,open:t,onOpenChange:u,elements:h,events:a,floatingId:i,refs:d})),[t,u,h,a,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=b.useState(null),[s,l]=b.useState(null),c=(null==i?void 0:i.domReference)||o,u=b.useRef(null),d=b.useContext(Q);W((()=>{c&&(u.current=c)}),[c]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);$(h,r)||f(r);const[p,m]=b.useState(null),[g,v]=b.useState(null),y=b.useCallback((e=>{e!==x.current&&(x.current=e,m(e))}),[]),w=b.useCallback((e=>{e!==T.current&&(T.current=e,v(e))}),[]),E=o||p,_=a||g,x=b.useRef(null),T=b.useRef(null),S=b.useRef(u),O=null!=l,A=z(l),M=z(i),C=z(c),N=b.useCallback((()=>{if(!x.current||!T.current)return;const e={placement:t,strategy:n,middleware:h};M.current&&(e.platform=M.current),(0,I.rD)(x.current,T.current,e).then((e=>{const t={...e,isPositioned:!1!==C.current};k.current&&!$(S.current,t)&&(S.current=t,D.flushSync((()=>{d(t)})))}))}),[h,t,n,M,C]);L((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const k=b.useRef(!1);L((()=>(k.current=!0,()=>{k.current=!1})),[]),L((()=>{if(E&&(x.current=E),_&&(T.current=_),E&&_){if(A.current)return A.current(E,_,N);N()}}),[E,_,N,A,O]);const R=b.useMemo((()=>({reference:x,floating:T,setReference:y,setFloating:w})),[y,w]),H=b.useMemo((()=>({reference:E,floating:_})),[E,_]),F=b.useMemo((()=>{const e={position:n,left:0,top:0};if(!H.floating)return e;const t=B(H.floating,u.x),r=B(H.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...P(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,H.floating,u.x,u.y]);return b.useMemo((()=>({...u,update:N,refs:R,elements:H,floatingStyles:F})),[u,N,R,H,F])}({...e,elements:{...i,...s&&{reference:s}}}),f=b.useCallback((e=>{const t=R(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),p=b.useCallback((e=>{(R(e)||null===e)&&(u.current=e,a(e)),(R(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!R(e))&&h.refs.setReference(e)}),[h.refs]),m=b.useMemo((()=>({...h.refs,setReference:p,setPositionReference:f,domReference:u})),[h.refs,p,f]),g=b.useMemo((()=>({...h.elements,domReference:c})),[h.elements,c]),v=b.useMemo((()=>({...h,...r,refs:m,elements:g,nodeId:t})),[h,m,g,t,r]);return W((()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),b.useMemo((()=>({...h,context:v,refs:m,elements:g})),[h,m,g,v])}const ee={};function te(e,t){return function(t,n,r){if(void 0!==t[n]){ee[r]&&ee[r][n]||(ee[r]={...ee[r],[n]:!0});for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e(t,n,r,...o)}}}const ne=(0,b.createContext)(d);function re(e){return(0,b.useContext)(ne).enabled(e)}y().node,te(y().objectOf(y().bool)),y().bool,y().bool,y().bool,y().bool,y().bool,y().bool,y().bool;const ie=E().createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),oe=E().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-start":"bottom"),as:i="span",autoAlign:o=!1,autoAlignBoundary:a,caret:s=!n,className:l,children:c,dropShadow:u=!0,highContrast:d=!1,onRequestClose:h,open:f,alignmentAxisOffset:p,...m}=e;const v=C(),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(null),T=re("enable-v12-dynamic-floating-styles")||o;let S=function(e){switch(e){case"top-left":return"top-start";case"top-right":return"top-end";case"bottom-left":return"bottom-start";case"bottom-right":return"bottom-end";case"left-bottom":return"left-end";case"left-top":return"left-start";case"right-bottom":return"right-end";case"right-top":return"right-start";default:return e}}(r);k("blur",(()=>{f&&h?.()})),k("click",(e=>{f&&!_?.current?.contains(e.target)&&h?.()}));const M=E().Children.toArray(c).some((e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label")))?7:6,N=(0,b.useRef)({offset:10,caretHeight:M});O((()=>{if(s&&_.current){const e=window.getComputedStyle(_.current,null),t=e.getPropertyValue("--cds-popover-offset"),n=e.getPropertyValue("--cds-popover-caret-height");t&&(N.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(N.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}}));const{refs:R,floatingStyles:D,placement:L,middlewareData:$}=J(T?{placement:S,strategy:"fixed",middleware:[(P=n?0:{alignmentAxis:p,mainAxis:N?.current?.offset},{...(0,I.cY)(P),options:[P,undefined]}),o&&F({fallbackPlacements:S.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:a}),j({element:w}),o&&U()],whileElementsMounted:I.ll}:{});var P;const B=(0,b.useMemo)((()=>({floating:y,setFloating:R.setFloating,caretRef:w,autoAlign:o})),[R.setFloating,o]);n&&(["bottom-start","bottom-end"].includes(S)||(S="bottom-start")),(0,b.useEffect)((()=>{if(T){const e={...D,visibility:$.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach((t=>{R.floating.current&&(R.floating.current.style[t]=e[t])})),s&&$&&$.arrow&&w?.current){const{x:e,y:t}=$.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[L.split("-")[0]];w.current.style.left=null!=e?`${e}px`:"",w.current.style.top=null!=t?`${t}px`:"",w.current.style.right="",w.current.style.bottom="",n&&(w.current.style[n]=-N?.current?.caretHeight+"px")}}}),[D,R.floating,T,$,L,s]);const z=A([t,_]),H=o&&L!==S?L:S,V=x()({[`${v}--popover-container`]:!0,[`${v}--popover--caret`]:s,[`${v}--popover--drop-shadow`]:u,[`${v}--popover--high-contrast`]:d,[`${v}--popover--open`]:f,[`${v}--popover--auto-align ${v}--autoalign`]:T,[`${v}--popover--${H}`]:!0,[`${v}--popover--tab-tip`]:n},l),G=E().Children.map(c,(e=>{const t=e,r=t?.type?.displayName,i="button"===t?.type,o=T&&r&&["ToggletipButton"].includes(r),a=T&&!["ToggletipContent","PopoverContent"].includes(r);if(E().isValidElement(t)&&(i||o||a)){const e=t?.props?.className,r=(t?.props).ref,i=x()(`${v}--popover--tab-tip__button`,e);return E().cloneElement(t,{className:n&&"button"===t?.type?i:e||"",ref:e=>{(T&&"PopoverContent"!==t?.type?.displayName||T&&"ToggletipButton"===t?.type?.displayName)&&R.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return t})),W=i;return E().createElement(ie.Provider,{value:B},E().createElement(W,g({},m,{className:V,ref:z}),T||n?G:c))}));function ae(e,t){let{className:n,children:r,...i}=e;const o=C(),{setFloating:a,caretRef:s,autoAlign:l}=E().useContext(ie),c=A([a,t]),u=re("enable-v12-dynamic-floating-styles")||l;return E().createElement("span",g({},i,{className:`${o}--popover`}),E().createElement("span",{className:x()(`${o}--popover-content`,n),ref:c},r,u&&E().createElement("span",{className:x()({[`${o}--popover-caret`]:!0,[`${o}--popover--auto-align`]:!0}),ref:s})),!u&&E().createElement("span",{className:x()({[`${o}--popover-caret`]:!0}),ref:s}))}oe.propTypes={align:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),as:y().oneOfType([y().string,y().elementType]),autoAlign:y().bool,autoAlignBoundary:y().oneOfType([y().oneOf(["clippingAncestors"]),y().elementType,y().arrayOf(y().elementType),y().exact({x:y().number.isRequired,y:y().number.isRequired,width:y().number.isRequired,height:y().number.isRequired})]),caret:y().bool,children:y().node,className:y().string,dropShadow:y().bool,highContrast:y().bool,isTabTip:y().bool,onRequestClose:y().func,open:y().bool.isRequired};const se=E().forwardRef(ae);se.displayName="PopoverContent",se.propTypes={children:y().node,className:y().string};const le={key:"Tab",which:9,keyCode:9,code:"Tab"},ce={key:"Enter",which:13,keyCode:13,code:"Enter"},ue={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},de={key:" ",which:32,keyCode:32,code:"Space"},he={key:"End",which:35,keyCode:35,code:"Numpad1"},fe={key:"Home",which:36,keyCode:36,code:"Numpad7"},pe={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},me={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},ge={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},ve={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},ye={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},be=(e,t)=>{for(let n=0;n<t.length;n++)if(we(e,t[n]))return!0;return!1},we=(e,t)=>{let{key:n,which:r,keyCode:i,code:o}=t;return"string"==typeof e?e===n:"number"==typeof e?e===r||e===i:e.key&&Array.isArray(n)?n.includes(e.key):e.key===n||e.which===r||e.keyCode===i||e.code===o};function Ee(){let e=0;return function(){return++e}}const _e=!("undefined"==typeof window||!window.document||!window.document.createElement),xe=E().createContext(null);function Te(){return E().useContext(xe)}const Se={...E()},Oe=Ee(),Ae=_e?b.useLayoutEffect:b.useEffect;let Me=!1;const Ce=Se.useId?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=Te();return`${t?`${t}-`:""}${e}-${Se.useId()}`}:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=Te(),[n,r]=(0,b.useState)((()=>Me?`${t?`${t}-`:""}${e}-${Oe()}`:null));return Ae((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${Oe()}`)}),[Oe]),(0,b.useEffect)((()=>{!1===Me&&(Me=!0)}),[]),n};function Ne(e){if(!e||!e.childNodes)return null;if(function(e){if(void 0===e.tabIndex||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;default:return!0}}(e))return e;for(const t of e.childNodes){const e=Ne(t);if(e)return e}return null}const ke=new Set(["mouseup","touchend","touchcancel"]),Re=E().forwardRef(((e,t)=>{let{as:n,align:r="top",className:i,children:o,label:a,description:s,enterDelayMs:l=100,leaveDelayMs:c=300,defaultOpen:u=!1,closeOnActivation:d=!1,dropShadow:h=!1,highContrast:f=!0,...p}=e;(0,b.useRef)(null);const[m,v]=function(e){const[t,n]=(0,b.useState)(e),r=(0,b.useRef)(null),i=(0,b.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,b.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(u),[y,w]=(0,b.useState)(!1),[_,T]=(0,b.useState)(!1),[S,A]=(0,b.useState)(!1),M=Ce("tooltip"),N=C(),k=E().Children.only(o),R={onFocus:()=>!_&&v(!0),onBlur:()=>{v(!1),T(!1)},onClick:()=>d&&v(!1),onMouseEnter:I,onMouseLeave:L,onMouseDown:function(){T(!0),$()},onMouseMove:function(e){1===e.buttons?w(!0):w(!1)},onTouchStart:$};a?R["aria-labelledby"]=M:R["aria-describedby"]=M;const D=(0,b.useCallback)((e=>{m&&we(e,ue)&&(e.stopPropagation(),v(!1)),m&&d&&(we(e,ce)||we(e,de))&&v(!1)}),[d,m,v]);function I(){p?.onMouseEnter||(A(!0),v(!0,l))}function L(){A(!1),y||v(!1,c)}function $(){w(!0)}O((()=>{if(m)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){we(e,ue)&&D(e)}}),[m,D]);const P=(0,b.useCallback)((()=>{w(!1),S||v(!1,c)}),[S,c,v]);return(0,b.useEffect)((()=>(y&&ke.forEach((e=>{document.addEventListener(e,P)})),()=>{ke.forEach((e=>{document.removeEventListener(e,P)}))})),[y,P]),E().createElement(oe,g({as:n,ref:t},p,{align:r,className:x()(`${N}--tooltip`,i),dropShadow:h,highContrast:f,onKeyDown:D,onMouseLeave:L,open:m}),E().createElement("div",{className:`${N}--tooltip-trigger__wrapper`},void 0!==k?E().cloneElement(k,{...R,...function(e){const t=Object.keys(R).filter((e=>e.startsWith("on"))),n={};return t.forEach((t=>{n[t]=n=>{R[t](n),e?.[t]&&e?.[t](n)}})),n}(k.props)}):null),E().createElement(se,{"aria-hidden":m?"false":"true",className:`${N}--tooltip-content`,id:M,onMouseEnter:I,role:"tooltip"},a||s))}));Re.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:y().node,className:y().string,closeOnActivation:y().bool,defaultOpen:y().bool,description:y().node,dropShadow:y().bool,enterDelayMs:y().number,highContrast:y().bool,label:y().node,leaveDelayMs:y().number};const De=E().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:o="danger",disabled:a=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:p,onFocus:m,onMouseEnter:g,onMouseLeave:v,renderIcon:y,size:b,tabIndex:w,type:_="button",...T}=e;const S=C(),O={tabIndex:w,className:x()(i,{[`${S}--btn`]:!0,[`${S}--btn--sm`]:"sm"===b&&!u,[`${S}--btn--md`]:"md"===b&&!u,[`${S}--btn--lg`]:"lg"===b&&!u,[`${S}--btn--xl`]:"xl"===b,[`${S}--btn--2xl`]:"2xl"===b,[`${S}--layout--size-${b}`]:b,[`${S}--btn--${h}`]:h,[`${S}--btn--disabled`]:a,[`${S}--btn--expressive`]:u,[`${S}--btn--icon-only`]:s,[`${S}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},A=y?E().createElement(y,{"aria-label":c,className:`${S}--btn__icon`,"aria-hidden":"true"}):null,M=["danger","danger--tertiary","danger--ghost"];let N="button";const k=Ce("danger-description"),{"aria-pressed":R,"aria-describedby":D}=T;let I={disabled:a,type:_,"aria-describedby":M.includes(h)?k:D||void 0,"aria-pressed":R??(s&&"ghost"===h?d:void 0)};const L={href:l};let $=null;return M.includes(h)&&($=E().createElement("span",{id:k,className:`${S}--visually-hidden`},o)),n?(N=n,I={...I,...L}):l&&!a&&(N="a",I=L),E().createElement(N,{onMouseEnter:g,onMouseLeave:v,onFocus:m,onBlur:f,onClick:p,...T,...O,...I},$,r,A)})),Ie=E().forwardRef((function(e,t){let{className:n,count:r,...i}=e;const o=C(),a=x()(`${o}--badge-indicator`,n,{[`${o}--badge-indicator--count`]:r}),s=r&&r>999?"999+":r;return E().createElement("div",g({className:a,ref:t},i),s)}));Ie.propTypes={className:y().string,count:y().number,id:y().string};const Le=["primary","secondary","ghost","tertiary"],$e=E().forwardRef((function(e,t){let{align:n,autoAlign:r=!1,badgeCount:i,children:o,className:a,closeOnActivation:s=!0,defaultOpen:l=!1,disabled:c,dropShadow:u=!1,enterDelayMs:d=100,highContrast:h=!0,kind:f,label:p,leaveDelayMs:m=100,wrapperClasses:v,size:y,isSelected:b,...w}=e;const _=C(),T=x()(v,`${_}--icon-tooltip`,{[`${_}--icon-tooltip--disabled`]:c});!i||"ghost"===f&&"lg"===y||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const S=Ce("badge-indicator");return E().createElement(Re,{align:n,autoAlign:r,closeOnActivation:s,className:T,defaultOpen:l,dropShadow:u,enterDelayMs:d,highContrast:h,label:p,leaveDelayMs:m},E().createElement(De,g({},w,{disabled:c,kind:f,ref:t,size:y,isSelected:b,hasIconOnly:!0,className:a,"aria-describedby":i&&S}),o,!c&&void 0!==i&&E().createElement(Ie,{id:S,count:i>0?i:void 0})))}));$e.propTypes={align:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),autoAlign:y().bool,badgeCount:y().number,href:y().string,children:y().node,className:y().string,closeOnActivation:y().bool,defaultOpen:y().bool,dropShadow:y().bool,disabled:y().bool,enterDelayMs:y().number,isSelected:y().bool,highContrast:y().bool,kind:y().oneOf(Le),label:y().node.isRequired,leaveDelayMs:y().number,rel:y().string,size:y().oneOf(["sm","md","lg"]),target:y().string,wrapperClasses:y().string};const Pe=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)}},Be=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],ze=E().forwardRef(((e,t)=>{const n=(0,b.useRef)(null),{as:r,autoAlign:i=!1,children:o,hasIconOnly:a=!1,tooltipHighContrast:s=!0,tooltipDropShadow:l=!1,iconDescription:c,kind:u="primary",onBlur:d,onClick:h,onFocus:f,onMouseEnter:p,onMouseLeave:m,renderIcon:v,size:y,tooltipAlignment:w="center",tooltipPosition:_="top",...x}=e,T=e=>{e.target===n.current&&e.preventDefault()},S=v?E().createElement(v,null):null;if(function(e){return!0===e}(a)){let e;return"top"!==_&&"bottom"!==_||("center"===w&&(e=_),"end"===w&&(e=`${_}-end`),"start"===w&&(e=`${_}-start`)),"right"!==_&&"left"!==_||(e=_),E().createElement($e,g({},x,{ref:t,as:r,align:e,label:c,kind:u,size:y,highContrast:s,dropShadow:l,onMouseEnter:p,onMouseLeave:m,onFocus:f,onBlur:d,autoAlign:i,onClick:Pe([h,T]),renderIcon:S?null:v}),S??o)}{const{tooltipAlignment:n,...r}=e;return E().createElement(De,g({ref:t},r))}}));ze.displayName="Button",ze.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),autoAlign:y().bool,children:y().node,className:y().string,dangerDescription:y().string,disabled:y().bool,hasIconOnly:y().bool,href:y().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:y().bool,isSelected:y().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,i=r?Le:Be;return void 0===e[t]||i.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${i.join(", ")}.`)},onBlur:y().func,onClick:y().func,onFocus:y().func,onMouseEnter:y().func,onMouseLeave:y().func,rel:y().string,renderIcon:y().oneOfType([y().func,y().object]),role:y().string,size:y().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:y().number,target:y().string,tooltipAlignment:y().oneOf(["start","center","end"]),tooltipDropShadow:y().bool,tooltipHighContrast:y().bool,tooltipPosition:y().oneOf(["top","right","bottom","left"]),type:y().oneOf(["button","reset","submit"])};const He=e=>{let{className:t,small:n=!1,href:r,size:i="lg",...o}=e;const a=C(),s={className:x()(t,{[`${a}--skeleton`]:!0,[`${a}--btn`]:!0,[`${a}--btn--sm`]:n||"sm"===i,[`${a}--btn--md`]:"md"===i,[`${a}--btn--lg`]:"lg"===i,[`${a}--btn--xl`]:"xl"===i,[`${a}--btn--2xl`]:"2xl"===i}),...o},l=E().createElement("div",s),c=E().createElement("a",g({},s,{href:r,role:"button"}));return r?c:l};He.propTypes={className:y().string,href:y().string,size:y().oneOf(["sm","md","lg","xl","2xl"]),small:y().bool};const Fe=E().forwardRef((function(e,t){let{children:n,className:r,stacked:i,...o}=e;const a=C(),s=x()(r,`${a}--btn-set`,{[`${a}--btn-set--stacked`]:i});return E().createElement("div",g({},o,{className:s,ref:t}),n)}));Fe.displayName="ButtonSet",Fe.propTypes={children:y().node,className:y().string,stacked:y().bool};const Ue=e=>{const t=t=>E().createElement(e,t),n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t},je=["xs","sm","md","lg","xl","2xl"],Ve=["condensed","normal"];E().forwardRef((function(e,t){let{as:n="div",children:r,className:i,density:o,size:a,...s}=e;const l=C(),c=x()(i,`${l}--layout`,{[`${l}--layout--size-${a}`]:a&&je.includes(a),[`${l}--layout--density-${o}`]:o&&Ve.includes(o)});return E().createElement(n,g({},s,{ref:t,className:c}),r)})).propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node,className:y().string,density:y().oneOf(Ve),size:y().oneOf(je)};const Ge=E().forwardRef((function(e,t){let{as:n="div",children:r,className:i,density:o,size:a,...s}=e;const l=C(),c=x()(i,Object.entries({size:a,density:o}).map((e=>{let[t,n]=e;return{[`${l}--layout-constraint--${t}__default-${n?.default}`]:n?.default,[`${l}--layout-constraint--${t}__min-${n?.min}`]:n?.min,[`${l}--layout-constraint--${t}__max-${n?.max}`]:n?.max}})));return E().createElement(n,g({},s,{ref:t,className:c}),r)}));Ge.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node,className:y().string,density:y().shape({min:y().oneOf(Ve),default:y().oneOf(Ve),max:y().oneOf(Ve)}),size:y().shape({min:y().oneOf(je),default:y().oneOf(je),max:y().oneOf(je)})};const We="undefined"!=typeof Node?Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS:0,qe="undefined"!=typeof Node?Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY:0,Ye="\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",Ze=()=>{};class Xe extends E().Component{constructor(){super(...arguments),m(this,"_switchRefs",[]),m(this,"state",{selectedIndex:void 0}),m(this,"handleItemRef",(e=>t=>{this._switchRefs[e]=t})),m(this,"handleChildChange",(e=>{const{selectionMode:t="automatic"}=this.props,{selectedIndex:n}=this.state,{index:r}=e,{key:i}=e;if(be(e,[ge,pe])){const n=((e,t,n)=>we(e,ge)?(t+1)%n:we(e,pe)?(t+n-1)%n:void 0)(i,r,this.props.children?.length),o=E().Children.toArray(this.props.children);if("manual"===t){const e=this._switchRefs[n];e&&e.focus()}else this.setState({selectedIndex:n},(()=>{if("number"!=typeof this.state.selectedIndex)return;const t=o[this.state.selectedIndex],n=this._switchRefs[this.state.selectedIndex];n&&n.focus(),this.props.onChange({...e,index:this.state.selectedIndex,name:t.props.name,text:t.props.text})}))}else n!==r&&this.setState({selectedIndex:r},(()=>{const t=this._switchRefs[r];t&&t.focus(),this.props.onChange(e)}))}))}static getDerivedStateFromProps(e,t){let{selectedIndex:n=0}=e;const{prevSelectedIndex:r}=t;return r===n?null:{selectedIndex:n,prevSelectedIndex:n}}render(){const e=this.context,{children:t,className:n,light:r,selectedIndex:i=0,selectionMode:o="automatic",size:a,onChange:s=Ze,...l}=this.props,c=E().Children?.map(t,(e=>"IconSwitch"===e.type.displayName))?.every((e=>!0===e)),u=x()(`${e}--content-switcher`,n,{[`${e}--content-switcher--light`]:r,[`${e}--content-switcher--${a}`]:a,[`${e}--layout--size-${a}`]:a,[`${e}--content-switcher--icon-only`]:c});return E().createElement(Ge,g({size:{default:"md",min:"sm",max:"lg"}},l,{className:u,role:"tablist",onChange:void 0}),t&&E().Children.toArray(t).map(((e,t)=>E().cloneElement(e,{index:t,onClick:Pe([this.handleChildChange,e.props.onClick]),onKeyDown:this.handleChildChange,selected:t===this.state.selectedIndex,ref:this.handleItemRef(t),size:a}))))}}m(Xe,"propTypes",{children:y().node,className:y().string,light:te(y().bool),onChange:y().func.isRequired,selectedIndex:y().number,selectionMode:y().oneOf(["automatic","manual"]),size:y().oneOf(["sm","md","lg"])}),m(Xe,"contextType",M);const Ke=Ue(Xe);var Qe,Je;const et=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:o=!1,className:a,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=C(),d=x()(a,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:o}),h=n,f=Array(h),p=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=E().createElement("tr",{key:e},p.map((e=>E().createElement("td",{key:e},Qe||(Qe=E().createElement("span",null))))));return E().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?E().createElement("div",{className:`${u}--data-table-header`},E().createElement("div",{className:`${u}--data-table-header__title`}),E().createElement("div",{className:`${u}--data-table-header__description`})):null,l?E().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},E().createElement("div",{className:`${u}--toolbar-content`},E().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,E().createElement("table",g({className:d},c),E().createElement("thead",null,E().createElement("tr",null,p.map((e=>E().createElement("th",{key:e},t?E().createElement("div",{className:"cds--table-header-label"},t[e]?.header):Je||(Je=E().createElement("span",null))))))),E().createElement("tbody",null,f)))};function tt(e){let{className:t,children:n,...r}=e;const i=C(),o=x()(`${i}--form`,t);return E().createElement("form",g({className:o},r),n)}et.propTypes={className:y().string,columnCount:y().number,compact:y().bool,headers:y().arrayOf(y().shape({header:y().node.isRequired}).isRequired),rowCount:y().number,showHeader:y().bool,showToolbar:y().bool,zebra:y().bool},tt.propTypes={children:y().node,className:y().string};const nt=(0,b.createContext)({direction:"auto",getTextDirection:{current:void 0}}),rt=(0,b.forwardRef)(((e,t)=>{let{as:n,children:r,dir:i="auto",...o}=e;const a=(0,b.useContext)(nt),s={},l=n??"span",c={...a};if(a){const{direction:e,getTextDirection:t}=a;if(t&&t.current){const n=it(r),i=t.current(n);e!==i?(s.dir=i,c.direction=i):"auto"===e&&(s.dir=i)}else e!==i?(s.dir=i,c.direction=i):"auto"===e&&(s.dir=i)}else s.dir=i,c.direction=i;return E().createElement(nt.Provider,{value:c},E().createElement(l,g({ref:t},o,s),r))}));rt.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node.isRequired,dir:y().oneOf(["ltr","rtl","auto"])};const it=e=>{if("string"==typeof e)return e;const t=b.Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t};function ot(e){let{className:t,children:n,id:r,...i}=e;const o=C(),a=x()(`${o}--label`,`${o}--label--no-margin`,t);return E().createElement(rt,g({as:"label",htmlFor:r,className:a},i),n)}function at(e){let{as:t="div",condensed:n=!1,narrow:r=!1,className:i,children:o,...a}=e;const s=C(),l=x()(i,{[`${s}--row`]:!0,[`${s}--row--condensed`]:n,[`${s}--row--narrow`]:r}),c=t;return E().createElement(c,g({className:l},a),o)}ot.propTypes={children:y().node,className:y().string,id:y().string},at.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,condensed:y().bool,narrow:y().bool};const st=b.createContext({mode:"flexbox",subgrid:!1}),lt=e=>{let{children:t,mode:n,subgrid:r=!1}=e;const i=b.useMemo((()=>({mode:n,subgrid:r})),[n,r]);return b.createElement(st.Provider,{value:i},t)};lt.propTypes={children:y().node,mode:y().oneOf(["flexbox","css-grid"]).isRequired,subgrid:y().bool};const ct=()=>b.useContext(st),ut=E().forwardRef((function(e,t){let{as:n,children:r,className:i,sm:o,md:a,lg:s,xlg:l,max:c,...u}=e;const{mode:d}=ct(),h=C(),f=n||"div";if("css-grid"===d)return E().createElement(ft,g({as:f,className:i,sm:o,md:a,lg:s,xlg:l,max:c},u),r);const p=function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(null==i)continue;const o=pt[r];if(!0!==i)if("number"!=typeof i){if("object"==typeof i){const{span:e,offset:r}=i;"number"==typeof e&&n.push(`${t}--col-${o}-${e}`),!0===e&&n.push(`${t}--col-${o}`),"number"==typeof r&&n.push(`${t}--offset-${o}-${r}`)}}else n.push(`${t}--col-${o}-${i}`);else n.push(`${t}--col-${o}`)}return n.join(" ")}([o,a,s,l,c],h),m=x()(i,p,{[`${h}--col`]:0===p.length});return E().createElement(f,g({className:m,ref:t},u),r)})),dt=y().oneOf(["25%","50%","75%","100%"]),ht=p("enable-css-grid")?y().oneOfType([y().bool,y().number,y().shape({span:y().oneOfType([y().number,dt]),offset:y().number,start:y().number,end:y().number}),dt]):y().oneOfType([y().bool,y().number,y().shape({span:y().number,offset:y().number})]);function ft(e){let{as:t="div",children:n,className:r,sm:i,md:o,lg:a,xlg:s,max:l,span:c,...u}=e;const d=C(),h=function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(null==i)continue;const o=pt[r];if(!0!==i)if("string"!=typeof i)if("number"!=typeof i){if("object"==typeof i){const{span:e,offset:r,start:a,end:s}=i;if("number"==typeof r&&n.push(`${t}--${o}:col-start-${r>0?r+1:"auto"}`),"number"==typeof a&&n.push(`${t}--${o}:col-start-${a||"auto"}`),"number"==typeof s&&n.push(`${t}--${o}:col-end-${s}`),"number"==typeof e)n.push(`${t}--${o}:col-span-${e}`);else if("string"==typeof e){n.push(`${t}--${o}:col-span-${e.slice(0,-1)}`);continue}}}else n.push(`${t}--${o}:col-span-${i}`);else n.push(`${t}--${o}:col-span-${i.replace("%","")}`);else n.push(`${t}--${o}:col-span-auto`)}return n.join(" ")}([i,o,a,s,l],d),f=function(e,t){const n=[];if("number"==typeof e)n.push(`${t}--col-span-${e}`);else if("string"==typeof e)n.push(`${t}--col-span-${e.slice(0,-1)}`);else if("object"==typeof e){const{span:r,start:i,end:o}=e;null!=r&&n.push(`${t}--col-span-${r}`),null!=i&&n.push(`${t}--col-start-${i}`),null!=o&&n.push(`${t}--col-end-${o}`)}return n.join("")}(c,d),p=x()(r,h,f,{[`${d}--css-grid-column`]:!0});return E().createElement(t,g({className:p},u),n)}ut.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,lg:ht,max:ht,md:ht,sm:ht,span:y().oneOfType([y().number,dt]),xlg:ht},ft.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,lg:ht,max:ht,md:ht,sm:ht,span:y().oneOfType([y().number,dt,y().shape({span:y().oneOfType([y().number,dt]),start:y().number,end:y().number})]),xlg:ht};const pt=["sm","md","lg","xlg","max"];var mt,gt,vt,yt,bt,wt,Et,_t,xt=n(9247);const Tt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},mt||(mt=E().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"})),gt||(gt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},vt||(vt=E().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"})),yt||(yt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},bt||(bt=E().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"})),wt||(wt=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Et||(Et=E().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),_t||(_t=E().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)}));var St,Ot,At,Mt,Ct,Nt,kt,Rt,Dt,It,Lt,$t,Pt,Bt,zt;const Ht=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},St||(St=E().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"})),Ot||(Ot=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},At||(At=E().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"})),Mt||(Mt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Ct||(Ct=E().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"})),Nt||(Nt=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},kt||(kt=E().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"})),Rt||(Rt=E().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)})),Ft=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},Dt||(Dt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},It||(It=E().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Lt||(Lt=E().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),Ut=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},$t||($t=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Pt||(Pt=E().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Bt||(Bt=E().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)})),jt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},zt||(zt=E().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)}));function Vt(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:o="loading",...a}=e;const s=C(),l=x()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=x()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=E().createElement("div",g({},a,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),E().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},E().createElement("title",null,o),i?E().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,E().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:i?"42":"44"})));return r?E().createElement("div",{className:c},u):u}Vt.propTypes={active:y().bool,className:y().string,description:y().string,id:te(y().string),small:y().bool,withOverlay:y().bool};const Gt=e=>{let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:o,successDelay:a=1500,...s}=e;const l=C(),c=x()(`${l}--inline-loading`,t),u=(0,b.useRef)(null);(0,b.useEffect)((()=>("finished"===n&&(u.current=setTimeout((()=>{o&&o()}),a)),()=>{u.current&&(clearTimeout(u.current),u.current=null)})),[n,o,a]);const d=i&&E().createElement("div",{className:`${l}--inline-loading__text`},i),h=(()=>{let e=r||n;return"error"===n?E().createElement(Tt,{className:`${l}--inline-loading--error`},E().createElement("title",null,e)):"finished"===n?E().createElement(Ht,{className:`${l}--inline-loading__checkmark-container`},E().createElement("title",null,e)):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),E().createElement(Vt,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),f=h&&E().createElement("div",{className:`${l}--inline-loading__animation`},h);return E().createElement("div",g({className:c},s,{"aria-live":s["aria-live"]??"assertive"}),f,d)};Gt.propTypes={className:y().string,description:y().node,iconDescription:y().string,onSuccess:y().func,status:y().oneOf(["inactive","active","finished","error"]),successDelay:y().number};var Wt,qt,Yt,Zt,Xt=n(5951);const Kt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Wt||(Wt=E().createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),qt||(qt=E().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),n)})),Qt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Yt||(Yt=E().createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Zt||(Zt=E().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,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),n)}));var Jt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),en="undefined"==typeof Element,tn=en?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nn=!en&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},rn=function e(t,n){var r;void 0===n&&(n=!0);var i=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},on=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!rn(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{tn.call(a,Jt)&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!rn(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},an=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},sn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!an(e)?0:e.tabIndex},ln=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},cn=function(e){return"INPUT"===e.tagName},un=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},dn=function(e,t){return!(t.disabled||rn(t)||function(e){return cn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=tn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(tn.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return un(e)}else{if("function"==typeof r){for(var o=e;e;){var a=e.parentElement,s=nn(e);if(a&&!a.shadowRoot&&!0===r(a))return un(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,r,i,o=e&&nn(e),a=null===(t=o)||void 0===t?void 0:t.host,s=!1;if(o&&o!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=o=nn(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!tn.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},hn=function(e,t){return!(function(e){return function(e){return cn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||nn(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)}(t)||sn(t)<0||!dn(e,t))},fn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pn=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scopeParent,a=o?t.scopeParent:t,s=function(e,t){var n=sn(e);return n<0&&t&&!an(e)?0:n}(a,o),l=o?e(t.candidates):a;0===s?o?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:s,item:t,isScope:o,content:l})})),r.sort(ln).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},mn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?on([e],t.includeContainer,{filter:hn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:fn}):function(e,t,n){if(rn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Jt));return t&&tn.call(e,Jt)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,hn.bind(null,t)),pn(n)};function gn(e){let{children:t,className:n,onClick:r,inline:i,...o}=e;const a=C(),s=x()(n,{[`${a}--actionable-notification__action-button`]:!0});return E().createElement(ze,g({className:s,kind:i?"ghost":"tertiary",onClick:r,size:"sm"},o),t)}function vn(e){let{"aria-label":t="close notification",ariaLabel:n,className:r,type:i="button",renderIcon:o=jt,name:a,notificationType:s="toast",...l}=e;const c=C(),u=x()(r,{[`${c}--${s}-notification__close-button`]:s}),d=x()({[`${c}--${s}-notification__close-icon`]:s});return E().createElement("button",g({},l,{type:i,"aria-label":n||t,title:n||t,className:u}),o&&E().createElement(o,{className:d,name:a}))}gn.propTypes={children:y().node,className:y().string,inline:y().bool,onClick:y().func},vn.propTypes={"aria-label":y().string,ariaLabel:te(y().string),className:y().string,name:y().string,notificationType:y().oneOf(["toast","inline","actionable"]),renderIcon:y().oneOfType([y().func,y().object]),type:y().string};const yn={error:Tt,success:Ht,warning:Xt.BF,"warning-alt":Xt.OR,info:Kt,"info-square":Qt};function bn(e){let{iconDescription:t,kind:n,notificationType:r}=e;const i=C(),o=yn[n];return o?E().createElement(o,{className:`${i}--${r}-notification__icon`,size:20},E().createElement("title",null,t)):null}function wn(e){let{"aria-label":t,children:n,title:r,subtitle:i,role:o="status",onClose:a,onCloseButtonClick:s=Ze,statusIconDescription:l,className:c,kind:u="error",lowContrast:d,hideCloseButton:h=!1,...f}=e;const[p,m]=(0,b.useState)(!0),v=C(),y=x()(c,{[`${v}--inline-notification`]:!0,[`${v}--inline-notification--low-contrast`]:d,[`${v}--inline-notification--${u}`]:u,[`${v}--inline-notification--hide-close-button`]:h}),w=(0,b.useRef)(null),_=(0,b.useRef)(null);return p?E().createElement("div",g({ref:_},f,{role:o,className:y}),E().createElement("div",{className:`${v}--inline-notification__details`},E().createElement(bn,{notificationType:"inline",kind:u,iconDescription:l||`${u} icon`}),E().createElement("div",{ref:w,className:`${v}--inline-notification__text-wrapper`},r&&E().createElement(rt,{as:"div",className:`${v}--inline-notification__title`},r),i&&E().createElement(rt,{as:"div",className:`${v}--inline-notification__subtitle`},i),n)),!h&&E().createElement(vn,{notificationType:"inline",onClick:function(e){s(e),a&&!1===a(e)||m(!1)},"aria-label":t})):null}function En(e){let{hideLabel:t,className:n,size:r="md",...i}=e;const o=C();return E().createElement("div",g({className:x()(`${o}--form-item`,n)},i),!t&&E().createElement("span",{className:`${o}--label ${o}--skeleton`}),E().createElement("div",{className:`${o}--number ${o}--skeleton ${o}--number--${r}`}))}bn.propTypes={iconDescription:y().string.isRequired,kind:y().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:y().oneOf(["inline","toast"]).isRequired},y().string,te(y().string),y().string,y().node,y().string,y().bool,y().oneOf(["error","info","info-square","success","warning","warning-alt"]),y().bool,y().func,y().func,y().oneOf(["alert","log","status"]),y().string,y().string,y().number,y().string,wn.propTypes={"aria-label":y().string,children:y().node,className:y().string,hideCloseButton:y().bool,kind:y().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:y().bool,onClose:y().func,onCloseButtonClick:y().func,role:y().oneOf(["alert","log","status"]),statusIconDescription:y().string,subtitle:y().string,title:y().string},y().string,y().string,te(y().string),y().node,y().string,y().bool,te(y().bool),y().bool,y().bool,y().oneOf(["error","info","info-square","success","warning","warning-alt"]),y().bool,y().func,y().func,y().func,y().string,y().string,y().node,y().string,y().string,y().node,y().string,S(y().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],(e=>({error:"warning",success:"info"}[e]))),y().bool,y().func,y().string,y().node,y().string,y().string,En.propTypes={className:y().string,hideLabel:y().bool,size:y().oneOf(["sm","md","lg"])};var _n=n(4389),xn=n(5848);const Tn=(0,b.createContext)({isFluid:!1});var Sn,On;const An="increment.number",Mn="decrement.number",Cn={[An]:"Increment number",[Mn]:"Decrement number"},Nn=E().forwardRef((function(e,t){const{allowEmpty:n=!1,className:r,decorator:i,disabled:o=!1,disableWheel:a=!1,defaultValue:s=0,helperText:l="",hideLabel:c=!1,hideSteppers:u,iconDescription:d,id:h,label:f,invalid:p=!1,invalidText:m,light:v,max:y,min:w,onChange:_,onClick:T,onKeyUp:S,readOnly:O,size:M="md",slug:N,step:k=1,translateWithId:R=e=>Cn[e],warn:D=!1,warnText:I="",value:L,...$}=e,P=C(),{isFluid:B}=(0,b.useContext)(Tn),[z,H]=(0,b.useState)(!1),[F,U]=(0,b.useState)((()=>void 0!==L?L:void 0!==s?s:n?"":0)),[j,V]=(0,b.useState)(L),G=(0,b.useRef)(null),W=A([t,G]),q=x()({[`${P}--number`]:!0,[`${P}--number--helpertext`]:!0,[`${P}--number--readonly`]:O,[`${P}--number--light`]:v,[`${P}--number--nolabel`]:c,[`${P}--number--nosteppers`]:u,[`${P}--number--${M}`]:M}),Y=function(e){let{allowEmpty:t,invalid:n,value:r,max:i,min:o}=e;return!n&&(""===r?t:!(r>i||r<o))}({allowEmpty:n,invalid:p,value:F,max:y,min:w}),Z=(e=>{let{id:t,readOnly:n,disabled:r,invalid:i,invalidText:o,warn:a,warnText:s}=e;const l=C(),c={disabled:!n&&r,invalid:!n&&i,invalidId:`${t}-error-msg`,warn:!n&&!i&&a,warnId:`${t}-warn-msg`,validation:null,icon:null,helperId:`${t}-helper-text`};return c.invalid?(c.icon=Xt.BF,c.validation=E().createElement(rt,{as:"div",className:`${l}--form-requirement`,id:c.invalidId},o)):c.warn&&(c.icon=Xt.OR,c.validation=E().createElement(rt,{as:"div",className:`${l}--form-requirement`,id:c.warnId},s)),c})({id:h,readOnly:O,disabled:o,invalid:!Y,invalidText:m,warn:D,warnText:I}),[X,K]=[R("increment.number"),R("decrement.number")],Q=x()(`${P}--number__input-wrapper`,{[`${P}--number__input-wrapper--warning`]:Z.warn,[`${P}--number__input-wrapper--slug`]:N,[`${P}--number__input-wrapper--decorator`]:i}),J=x()({[`${P}--number__invalid`]:Z.invalid||Z.warn,[`${P}--number__invalid--warning`]:Z.warn});let ee;L!==j&&(U(L),V(L)),Z.invalid&&(ee=Z.invalidId),Z.warn&&(ee=Z.warnId),Z.validation||(ee=l?Z.helperId:void 0);const te=e=>{"type"in e.target&&"button"===e.target.type?H(!1):H("focus"===e.type)},ne=x()(`${P}--form-item`,{[r]:!!r,[`${P}--number-input--fluid--invalid`]:B&&Z.invalid,[`${P}--number-input--fluid--focus`]:B&&z,[`${P}--number-input--fluid--disabled`]:B&&o}),re=Z.icon,ie=e=>{const t=e.toString().split(".");return t[1]?t[1].length:0},oe=(e,t)=>{if(G.current){const r=Number(G.current.value),i="up"===t?r+k:r-k,o=Math.max(ie(r),ie(k)),a=parseFloat(i.toFixed(o)),s=void 0!==w&&void 0!==y?Math.min(Math.max(a,w),y):a,l={value:n&&""===G.current.value&&0===k?"":s,direction:t};U(l.value),_&&_(e,l),T&&T(e,l)}};let ae,se=E().isValidElement(N??i)?N??i:null;return se&&"AILabel"===se.type?.displayName&&(se=E().cloneElement(se,{size:"mini"})),se&&"AILabel"===se.type?.displayName&&(ae=se.props.revertActive),(0,b.useEffect)((()=>{!ae&&N&&s&&U(s)}),[s,ae,N]),E().createElement("div",{className:ne,onFocus:B?te:void 0,onBlur:B?te:void 0},E().createElement("div",{className:q,"data-invalid":!!Z.invalid||void 0},E().createElement(kn,{disabled:Z.disabled,hideLabel:c,id:h,label:f}),E().createElement("div",{className:Q},E().createElement("input",g({},$,{"data-invalid":!!Z.invalid||void 0,"aria-invalid":Z.invalid,"aria-describedby":ee,"aria-readonly":O,disabled:Z.disabled,ref:W,id:h,max:y,min:w,onClick:T,onChange:function(e){if(o)return;const t={value:n&&""===e.target.value?"":Number(e.target.value),direction:F<e.target.value?"up":"down"};U(t.value),_&&_(e,t)},onKeyUp:S,onFocus:e=>{a&&e.target.addEventListener("wheel",Dn),$.onFocus&&$.onFocus(e)},onBlur:e=>{a&&e.target.removeEventListener("wheel",Dn),$.onBlur&&$.onBlur(e)},pattern:"[0-9]*",readOnly:O,step:k,type:"number",value:F})),N?se:i?E().createElement("div",{className:`${P}--number__input-inner-wrapper--decorator`},se):"",re?E().createElement(re,{className:J}):null,!u&&E().createElement("div",{className:`${P}--number__controls`},E().createElement("button",{"aria-label":K||d,className:`${P}--number__control-btn down-icon`,disabled:o||O,onClick:e=>oe(e,"down"),tabIndex:-1,title:K||d,type:"button"},Sn||(Sn=E().createElement(_n.NA,{className:"down-icon"}))),E().createElement("div",{className:`${P}--number__rule-divider`}),E().createElement("button",{"aria-label":X||d,className:`${P}--number__control-btn up-icon`,disabled:o||O,onClick:e=>oe(e,"up"),tabIndex:-1,title:X||d,type:"button"},On||(On=E().createElement(xn.OM,{className:"up-icon"}))),E().createElement("div",{className:`${P}--number__rule-divider`}))),B&&E().createElement("hr",{className:`${P}--number-input__divider`}),Z.validation?Z.validation:E().createElement(Rn,{id:Z.helperId,disabled:o,description:l})))}));Nn.propTypes={allowEmpty:y().bool,className:y().string,decorator:y().node,defaultValue:y().oneOfType([y().number,y().string]),disableWheel:y().bool,disabled:y().bool,helperText:y().node,hideLabel:y().bool,hideSteppers:y().bool,iconDescription:y().string,id:y().string.isRequired,invalid:y().bool,invalidText:y().node,label:y().node,light:te(y().bool),max:y().number,min:y().number,onChange:y().func,onClick:y().func,onKeyUp:y().func,readOnly:y().bool,size:y().oneOf(["sm","md","lg"]),slug:te(y().node),step:y().number,translateWithId:y().func,value:y().oneOfType([y().number,y().string]),warn:y().bool,warnText:y().node};const kn=e=>{let{disabled:t,id:n,hideLabel:r,label:i}=e;const o=C(),a=x()({[`${o}--label`]:!0,[`${o}--label--disabled`]:t,[`${o}--visually-hidden`]:r});return i?E().createElement(rt,{as:"label",htmlFor:n,className:a},i):null};function Rn(e){let{disabled:t,description:n,id:r}=e;const i=C(),o=x()(`${i}--form__helper-text`,{[`${i}--form__helper-text--disabled`]:t});return n?E().createElement(rt,{as:"div",id:r,className:o},n):null}function Dn(e){e.preventDefault()}kn.propTypes={disabled:y().bool,hideLabel:y().bool,id:y().string,label:y().node},Rn.propTypes={description:y().node,disabled:y().bool,id:y().string};var In=16;function Ln(e){return"".concat(e/In,"rem")}Ln(320);var $n={width:Ln(672),columns:8,margin:Ln(16)},Pn={width:Ln(1056),columns:16,margin:Ln(16)};Ln(1312),Ln(16),Ln(1584),Ln(24);function Bn(e){return Ln(8*e)}var zn=[Bn(.25),Bn(.5),Bn(1),Bn(1.5),Bn(2),Bn(3),Bn(4),Bn(5),Bn(6),Bn(8),Bn(10),Bn(12),Bn(20)];Bn(2),Bn(3),Bn(4),Bn(6),Bn(8),Bn(12),Bn(20),Bn(3),Bn(4),Bn(5),Bn(6),Bn(8),Ln(24),Ln(32),Ln(40),Ln(48),Ln(64),Ln(80);const Hn=Array.from({length:zn.length-1}).map(((e,t)=>t+1)),Fn=E().forwardRef((function(e,t){const{as:n="div",children:r,className:i,gap:o,orientation:a="vertical",...s}=e,l=C(),c=x()(i,{[`${l}--stack-${a}`]:!0,[`${l}--stack-scale-${o}`]:"number"==typeof o}),u={...s.style};return"string"==typeof o&&(u[`--${l}-stack-gap`]=o),E().createElement(n,g({},s,{ref:t,className:c,style:u}),r)}));Fn.propTypes={as:y().elementType,children:y().node,className:y().string,gap:y().oneOfType([y().string,y().oneOf(Hn)]),orientation:y().oneOf(["horizontal","vertical"])};const Un=()=>{},jn=E().forwardRef((function(e,t){const{align:n,children:r,className:i,disabled:o,enterDelayMs:a,index:s,leaveDelayMs:l=0,name:c,onClick:u=Un,onKeyDown:d=Un,selected:h=!1,size:f,text:p,...m}=e,v=C(),[y,w]=(0,b.useState)(!1),_=()=>{w(!0)},T=()=>{w(!1)},S=x()(i,`${v}--content-switcher-btn`,{[`${v}--content-switcher--selected`]:h}),O=x()(`${v}--content-switcher-popover__wrapper`,{[`${v}--content-switcher-popover--selected`]:h,[`${v}--content-switcher-popover--disabled`]:o}),A={onClick:e=>{e.preventDefault(),u({index:s,name:c,text:p})},onKeyDown:e=>{const t=e.key||e.which;d({index:s,name:c,text:p,key:t})},className:S,disabled:o,align:n,enterDelayMs:a,leaveDelayMs:l,size:f};return E().createElement($e,g({label:p,type:"button",ref:t,role:"tab",tabIndex:h||y?0:-1,onMouseEnter:_,onMouseLeave:T,onFocus:_,onBlur:T,"aria-selected":h,"aria-label":p,wrapperClasses:O},m,A),r)}));jn.displayName="IconSwitch",jn.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:y().node,className:y().string,disabled:y().bool,enterDelayMs:y().number,index:y().number,leaveDelayMs:y().number,name:y().oneOfType([y().string,y().number]),onClick:y().func,onKeyDown:y().func,selected:y().bool,size:y().oneOf(["sm","md","lg"]),text:y().string};var Vn=jn;const Gn=E().forwardRef(((e,t)=>{let{align:n,as:r,children:i,className:o,condensed:a=!1,fullWidth:s=!1,narrow:l=!1,...c}=e;const u=C(),{subgrid:d}=ct();let h="wide";if(l?h="narrow":a&&(h="condensed"),d)return E().createElement(lt,{mode:"css-grid",subgrid:!0},E().createElement(Wn,g({ref:t,as:r,className:o,mode:h},c),i));const f=x()(o,{[`${u}--css-grid`]:!0,[`${u}--css-grid--condensed`]:"condensed"===h,[`${u}--css-grid--narrow`]:"narrow"===h,[`${u}--css-grid--full-width`]:s,[`${u}--css-grid--start`]:"start"===n,[`${u}--css-grid--end`]:"end"===n}),p=r||"div";return E().createElement(lt,{mode:"css-grid",subgrid:!0},E().createElement(p,g({className:f,ref:t},c),i))}));Gn.propTypes={as:y().oneOfType([y().string,y().elementType]),align:y().oneOf(["start","center","end"]),children:y().node,className:y().string,condensed:y().bool,fullWidth:y().bool,narrow:y().bool};const Wn=E().forwardRef(((e,t)=>{let{as:n,className:r,children:i,mode:o,...a}=e;const s=C(),l=x()(r,{[`${s}--subgrid`]:!0,[`${s}--subgrid--condensed`]:"condensed"===o,[`${s}--subgrid--narrow`]:"narrow"===o,[`${s}--subgrid--wide`]:"wide"===o}),c=n||"div";return E().createElement(c,g({},a,{ref:t,className:l}),i)}));Wn.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,mode:y().oneOf(["wide","narrow","condensed"])};const qn=E().forwardRef(((e,t)=>{let{as:n,condensed:r=!1,narrow:i=!1,fullWidth:o=!1,className:a,children:s,...l}=e;const c=C(),u=x()(a,{[`${c}--grid`]:!0,[`${c}--grid--condensed`]:r,[`${c}--grid--narrow`]:i,[`${c}--grid--full-width`]:o}),d=n||"div";return E().createElement(lt,{mode:"flexbox",subgrid:!1},E().createElement(d,g({className:u,ref:t},l),s))}));qn.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,condensed:y().bool,fullWidth:y().bool,narrow:y().bool};y().oneOf(["start","center","end"]),y().oneOfType([y().string,y().elementType]),y().node,y().string,y().bool,y().bool,y().bool;var Yn=n(524);function Zn(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:o=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=(0,b.useRef)(t),s=(0,b.useRef)(n),l=(0,b.useRef)(r),c=(0,b.useRef)(i),[u,d]=(0,b.useState)(!1),[h,f]=(0,b.useState)(!1),p=(0,b.useRef)({longPress:!1});(0,b.useEffect)((()=>{a.current=t}),[t]),(0,b.useEffect)((()=>{s.current=n}),[n]),(0,b.useEffect)((()=>{l.current=r}),[r]),(0,b.useEffect)((()=>{c.current=i}),[i]),(0,b.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 o(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),a.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",o),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",o),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,b.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),o);return()=>{clearTimeout(e)}}}),[u,o]),(0,b.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const Xn=e=>{const[t,n]=(0,b.useState)((()=>!!_e&&window.matchMedia(e).matches));return(0,b.useEffect)((()=>{const t=e=>{n(e.matches)},r=window.matchMedia(e);return r.addEventListener("change",t),n(r.matches),()=>{r.removeEventListener("change",t)}}),[e]),t};function Kn(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:i=!1,trailing:o=!0,maxWait:a}=n,s=Array(2);let l;i&&(s[0]="leading"),o&&(s[1]="trailing");let c=null;const u=function(e,t,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout((()=>{c=null,s&&l(),h()}),t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},h=()=>{d(),i=void 0,o=null},f=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==c;u(),a&&t&&l()};return f.schedule=u,f.cancel=h,f.flush=()=>{d(),l()},n?.addEventListener("abort",h,{once:!0}),f}((function(...t){l=e.apply(this,t),c=null}),t,{signal:r,edges:s}),d=function(...t){if(null!=a)if(null===c)c=Date.now();else if(Date.now()-c>=a)return l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l;return u.apply(this,t),l};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}var Qn,Jn,er;const tr=E().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),nr=E().createContext({index:0,hasSecondaryLabel:!1}),rr=`(min-width: ${Pn.width})`,ir=($n.width,E().createContext(0));function or(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:o,onTabCloseRequest:a}=e;const s=Ce("ccs"),[l,c]=(0,b.useState)(n),[u,d]=function(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[o,a]=(0,b.useState)(i??t),s=(0,b.useRef)(null);function l(e){const t="function"==typeof e?e(o):e;!1===s.current&&a(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,b.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[o,l]}({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:o,onTabCloseRequest:a,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return E().createElement(tr.Provider,{value:h},t)}function ar(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:o=!1,fullWidth:a=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:p,selectedIndex:m,setSelectedIndex:v,setActiveIndex:y,dismissable:w}=E().useContext(tr),_=C(),T=(0,b.useRef)(null),S=(0,b.useRef)(null),A=(0,b.useRef)(null),[M,N]=(0,b.useState)(!1),[k,R]=(0,b.useState)(0);let D=!1;o&&(D=E().Children.toArray(r).some((e=>(0,Yn.isElement)(e)&&!!e.props.secondaryLabel)));const I=Xn(rr),L=a&&o&&I&&E().Children.toArray(r).length<9,$=x()(`${_}--tabs`,{[`${_}--tabs--contained`]:o,[`${_}--tabs--light`]:c,[`${_}--tabs__icon--default`]:"default"===s,[`${_}--tabs__icon--lg`]:"lg"===s,[`${_}--layout--size-lg`]:"lg"===s,[`${_}--tabs--tall`]:D,[`${_}--tabs--full-width`]:L,[`${_}--tabs--dismissable`]:w},i),P=44,[B,z]=(0,b.useState)(!!T.current&&k+P+T.current.clientWidth<T.current.scrollWidth),H=!!T.current&&M&&k>0,F=x()(`${_}--tab--overflow-nav-button`,`${_}--tab--overflow-nav-button--previous`,{[`${_}--tab--overflow-nav-button--hidden`]:!H}),U=x()(`${_}--tab--overflow-nav-button`,`${_}--tab--overflow-nav-button--next`,{[`${_}--tab--overflow-nav-button--hidden`]:!B}),j=(0,b.useRef)([]),V=(0,b.useCallback)((()=>Kn((e=>{R(e.target.scrollLeft)}),d)),[d]);function G(e){if(M&&T.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=T.current.scrollLeft+P,o=T.current.scrollLeft+T.current.clientWidth-P;n<i&&R(n-P),r>o&&R(r+P-T.current.clientWidth)}}return(0,b.useEffect)((()=>{const e=j.current[m];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}),[]),(0,b.useEffect)((()=>{z(!!T.current&&k+P+T.current.clientWidth+1<T.current.scrollWidth),w&&T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),[k,r,w,M]),(0,b.useEffect)((()=>{if(j.current[m]?.disabled){const e=j.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];v(j.current.indexOf(t))}}}),[]),O((()=>{T.current&&N(T.current.scrollWidth>T.current.clientWidth+1);const e=Kn((function(){T.current&&N(T.current.scrollWidth>T.current.clientWidth+1)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),O((()=>{null!==k&&T.current&&(T.current.scrollLeft=k)}),[k]),O((()=>{G("manual"===t?j.current[p]:j.current[m])}),[t,p]),O((()=>{G(j.current[m])}),[m,M,r]),Zn(S,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.max(k-T.current.scrollWidth/j.current.length*1.5,0))},onLongPress:()=>sr(T,"backward",R)}),Zn(A,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.min(k+T.current.scrollWidth/j.current.length*1.5,T.current.scrollWidth-T.current.clientWidth))},onLongPress:()=>sr(T,"forward",R)}),E().createElement("div",{className:$},E().createElement("button",g({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:S,className:F,type:"button"},l),Qn||(Qn=E().createElement(Ft,null))),E().createElement("div",g({},f,{"aria-label":n,ref:T,role:"tablist",className:`${_}--tab--list`,onScroll:V,onKeyDown:function(e){if(be(e,[ge,pe,fe,he])){e.preventDefault();const n=j.current.filter((e=>null!==e)).filter((e=>!e.disabled)),r=n.indexOf(j.current["automatic"===t?m:p]),i=j.current.indexOf(n[function(e,t,n){switch(!0){case we(e,ge):return(n+1)%t;case we(e,pe):return(t+n-1)%t;case we(e,fe):return 0;case we(e,he):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?v(i):"manual"===t&&y(i),j.current[i]?.focus()}},onBlur:function(e){let{relatedTarget:n}=e;T.current?.contains(n)||"manual"===t&&y(m)}}),E().Children.map(r,((e,t)=>(0,Yn.isElement)(e)?E().createElement(nr.Provider,{value:{index:t,hasSecondaryLabel:D,contained:o}},E().cloneElement(e,{ref:e=>{j.current[t]=e}})):null))),E().createElement("button",g({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:A,className:U,type:"button"},u),Jn||(Jn=E().createElement(Ut,null))))}function sr(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let a=null;return a=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+o,a=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),a&&cancelAnimationFrame(a)}}or.propTypes={children:y().node,defaultSelectedIndex:y().number,dismissable:y().bool,onChange:y().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:y().number},y().node,y().number,y().string,y().func,y().number,ar.propTypes={activation:y().oneOf(["automatic","manual"]),"aria-label":y().string,children:y().node,className:y().string,contained:y().bool,fullWidth:y().bool,iconSize:y().oneOf(["default","lg"]),leftOverflowButtonProps:y().object,light:te(y().bool),rightOverflowButtonProps:y().object,scrollDebounceWait:y().number,scrollIntoView:y().bool},y().oneOf(["automatic","manual"]),y().string,y().node,y().string;const lr=(0,b.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:o,onClick:a,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=C(),{selectedIndex:h,setSelectedIndex:f,baseId:p,dismissable:m,onTabCloseRequest:v}=E().useContext(tr),{index:y,hasSecondaryLabel:w,contained:_}=E().useContext(nr),{badgeIndicator:T}=E().useContext(cr)||{},S=(0,b.useRef)(null),M=(0,b.useRef)(null),k=A([t,M]),[R,D]=(0,b.useState)(!1),I=`${p}-tab-${y}`,L=`${p}-tabpanel-${y}`,[$,P]=(0,b.useState)(!1),B=x()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===y,[`${d}--tabs__nav-item--disabled`]:o,[`${d}--tabs__nav-item--hover-off`]:R},i),z=n;N(S,"mouseover",(e=>{_&&M.current&&(e.stopPropagation(),D(!0),M.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),N(S,"mouseleave",(()=>{_&&M.current&&(M.current.classList.remove(`${d}--tabs__nav-item--hover-off`),D(!1))})),O((()=>{function e(){const e=document.getElementById(`${I}`)||M.current;if(e?.closest(`.${d}--tabs--vertical`)){const n=e?.getElementsByClassName(`${d}--tabs__nav-item-label`)[0];P((t=n).offsetHeight<t.scrollHeight),t.offsetHeight,t.scrollHeight}var t}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[d,I]);const H=e=>{if(e.stopPropagation(),v?.(y),M.current&&M.current.parentElement){const e=Array.from(M.current.parentElement.childNodes).filter((e=>{const t=e;return t.classList.contains(`${d}--tabs__nav-link`)&&!t.classList.contains(`${d}--tabs__nav-item--disabled`)})).length;if(M.current&&y+1!==e)M.current.focus();else{const t=2*(e-2);M.current.parentElement.childNodes[t]?.focus()}}},F=e=>{m&&we(e,ye)&&H(e),s?.(e)},U=E().createElement("div",{className:x()({[`${d}--tabs__nav-item--close`]:m,[`${d}--tabs__nav-item--close--hidden`]:!m})},E().createElement("button",{type:"button",tabIndex:h===y&&m?0:-1,"aria-disabled":o,"aria-hidden":h===y&&m?"false":"true",disabled:o,className:x()({[`${d}--tabs__nav-item--close-icon`]:m,[`${d}--visually-hidden`]:!m,[`${d}--tabs__nav-item--close-icon--selected`]:h===y,[`${d}--tabs__nav-item--close-icon--disabled`]:o}),onClick:H,title:`Remove ${"string"==typeof r?r:""} tab`,ref:S},E().createElement(jt,{"aria-hidden":h===y&&m?"false":"true","aria-label":`Press delete to remove ${"string"==typeof r?r:""} tab`}))),j=c??m;return $?E().createElement(Re,{label:r,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},E().createElement(z,g({},u,{"aria-controls":L,"aria-disabled":o,"aria-selected":h===y,ref:k,id:I,role:"tab",className:B,disabled:o,title:r,onClick:e=>{o||(f(y),a?.(e))},onKeyDown:F,tabIndex:h===y?"0":"-1",type:"button"}),E().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},E().createElement(rt,{className:`${d}--tabs__nav-item-label`},r)),w&&l&&E().createElement(rt,{as:"div",className:`${d}--tabs__nav-item-secondary-label`,title:l},l))):E().createElement(E().Fragment,null,E().createElement(z,g({},u,{"aria-controls":L,"aria-disabled":o,"aria-selected":h===y,ref:k,id:I,role:"tab",className:B,disabled:o,onClick:e=>{o||(f(y),a?.(e))},onKeyDown:F,tabIndex:h===y?"0":"-1",type:"button"}),E().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},m&&c&&E().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},E().createElement(c,{size:16})),E().createElement(rt,{className:`${d}--tabs__nav-item-label`},r),!m&&c&&E().createElement("div",{className:x()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!j})},!m&&c&&E().createElement(c,{size:16}))),w&&l&&E().createElement(rt,{as:"div",className:`${d}--tabs__nav-item-secondary-label`,title:l},l),!o&&T&&(er||(er=E().createElement(Ie,null)))),U)}));lr.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,disabled:y().bool,onClick:y().func,onKeyDown:y().func,renderButton:y().func,renderIcon:y().oneOfType([y().func,y().object]),secondaryLabel:y().string};const cr=(0,b.createContext)(!1);E().forwardRef((function(e,t){let{badgeIndicator:n,children:r,className:i,defaultOpen:o=!1,enterDelayMs:a,leaveDelayMs:s,label:l,...c}=e;const u=C(),d=(0,b.useMemo)((()=>({badgeIndicator:n})),[n]),h=E().isValidElement(r)&&20===r.props?.size,f=x()(`${u}--tabs__nav-item--icon-only`,i,{[`${u}--tabs__nav-item--icon-only__20`]:h});return E().createElement(cr.Provider,{value:d},E().createElement(Re,{align:"bottom",defaultOpen:o,className:`${u}--icon-tooltip`,enterDelayMs:a,label:l,leaveDelayMs:s},E().createElement(lr,g({className:f,ref:t},c),r)))})).propTypes={badgeIndicator:y().bool,children:y().node,className:y().string,defaultOpen:y().bool,enterDelayMs:y().number,label:y().node.isRequired,leaveDelayMs:y().number};const ur=E().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const o=C(),a=(0,b.useRef)(null),s=A([t,a]),[l,c]=(0,b.useState)(0),[u,d]=(0,b.useState)(!1),{selectedIndex:h,baseId:f}=E().useContext(tr),p=E().useContext(ir),m=`${f}-tabpanel-${p}`,v=`${f}-tab-${p}`,y=x()(`${o}--tab-content`,r,{[`${o}--tab-content--interactive`]:u});return(0,b.useEffect)((()=>{a.current&&Ne(a.current)&&(d(!0),c(-1))}),[]),(0,b.useEffect)((()=>{const e=a.current;if(!e)return;const t=new MutationObserver((function(){Ne(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),E().createElement("div",g({},i,{"aria-labelledby":v,id:m,className:y,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==p}),n)}));ur.propTypes={children:y().node,className:y().string},y().node;const dr=e=>{let{align:t="bottom",autoAlign:n,className:r,children:i,definition:o,defaultOpen:a=!1,id:s,openOnHover:l,tooltipText:c,triggerClassName:u,...d}=e;const[h,f]=(0,b.useState)(a),p=C(),m=function(e){const t=Ce();return e??t}(s);return E().createElement(oe,{align:t,className:r,autoAlign:n,dropShadow:!1,highContrast:!0,onMouseLeave:()=>{f(!1)},onMouseEnter:()=>{l&&f(!0)},onFocus:()=>{f(!0)},open:h},E().createElement("button",g({},d,{className:x()(`${p}--definition-term`,u),"aria-controls":m,"aria-expanded":h,onBlur:()=>{f(!1)},onMouseDown:e=>{0===e.button&&f(!h)},onKeyDown:function(e){h&&we(e,ue)&&(e.stopPropagation(),f(!1))},type:"button"}),i),E().createElement(se,{className:`${p}--definition-tooltip`,id:m},c??o))};var hr;dr.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),autoAlign:y().bool,children:y().node.isRequired,className:y().string,defaultOpen:y().bool,definition:y().node.isRequired,id:y().string,openOnHover:y().bool,tooltipText:te(y().node),triggerClassName:y().string};const fr={red:"Red",magenta:"Magenta",purple:"Purple",blue:"Blue",cyan:"Cyan",teal:"Teal",green:"Green",gray:"Gray","cool-gray":"Cool-Gray","warm-gray":"Warm-Gray","high-contrast":"High-Contrast",outline:"Outline"},pr=E().forwardRef(((e,t)=>{let{children:n,className:r,decorator:i,id:o,type:a,filter:s,renderIcon:l,title:c="Clear filter",disabled:u,onClose:d,size:h,as:f,slug:p,...m}=e;const v=C(),y=(0,b.useRef)(),w=function(e){const t=b.useRef(void 0),n=b.useCallback((t=>{const n=e.map((e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}}));return()=>{n.forEach((e=>null==e?void 0:e()))}}),e);return b.useMemo((()=>e.every((e=>null==e))?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))}),e)}([t,y]),_=o||`tag-${Ce()}`,[T,S]=(0,b.useState)(!1);(0,b.useLayoutEffect)((()=>{const e=y.current?.getElementsByClassName(`${v}--tag__label`)[0];var t;S(!!(t=e)&&t?.offsetWidth<t?.scrollWidth)}),[v,y]);const O=[`${v}--tag--selectable`,`${v}--tag--filter`,`${v}--tag--operational`].some((e=>r?.includes(e))),A=x()(`${v}--tag`,r,{[`${v}--tag--disabled`]:u,[`${v}--tag--filter`]:s,[`${v}--tag--${h}`]:h,[`${v}--layout--size-${h}`]:h,[`${v}--tag--${a}`]:a,[`${v}--tag--interactive`]:m.onClick&&!O&&T}),M=void 0!==a&&a in Object.keys(fr)?fr[a]:"",N=e=>{d&&(e.stopPropagation(),d(e))};let k=E().isValidElement(p??i)?p??i:null;if(k&&"AILabel"===k.type?.displayName&&!O&&(k=E().cloneElement(k,{size:"sm",kind:"inline"})),s){const e=f??"div";return E().createElement(e,g({className:A,id:_},m),l&&"sm"!==h?E().createElement("div",{className:`${v}--tag__custom-icon`},E().createElement(l,null)):"",E().createElement(rt,{title:"string"==typeof n?n:void 0,className:`${v}--tag__label`},null!=n?n:M),k,E().createElement("button",{type:"button",className:`${v}--tag__close-icon`,onClick:N,disabled:u,"aria-label":c,title:c},hr||(hr=E().createElement(jt,null))))}const R=f??(m.onClick||r?.includes(`${v}--tag--operational`)?"button":"div"),D=x()({[`${v}--tag__label`]:!O});return E().createElement(R,g({ref:w,disabled:u,className:A,id:_,type:"button"===R?"button":void 0},m),l&&"sm"!==h?E().createElement("div",{className:`${v}--tag__custom-icon`},E().createElement(l,null)):"",T&&!O?E().createElement(dr,{openOnHover:!1,definition:null!=n?n:M,className:`${v}--definition--tooltip--tag`},E().createElement(rt,{title:null!=n&&"string"==typeof n?n:M,className:D},null!=n?n:M)):E().createElement(rt,{title:null!=n&&"string"==typeof n?n:M,className:D},null!=n?n:M),p?k:i?E().createElement("div",{className:`${v}--tag__decorator`},k):"")}));pr.propTypes={as:y().elementType,children:y().node,className:y().string,decorator:y().node,disabled:y().bool,filter:te(y().bool),id:y().string,onClose:te(y().func),renderIcon:y().oneOfType([y().func,y().object]),size:y().oneOf(Object.keys({sm:"sm",md:"md",lg:"lg"})),slug:te(y().node),title:te(y().string),type:y().oneOf(Object.keys(fr))};const mr=E().forwardRef(((e,t)=>{const{className:n,decorator:r,disabled:i=!1,id:o,labelText:a,hideLabel:s,onChange:l=Ze,onClick:c=Ze,onKeyDown:u=Ze,invalid:d=!1,invalidText:h="",helperText:f="",light:p,placeholder:m="",enableCounter:v=!1,maxCount:y,counterMode:w="character",warn:_=!1,warnText:T="",rows:S=4,slug:M,...N}=e,k=C(),{isFluid:R}=(0,b.useContext)(Tn),{defaultValue:D,value:I}=N,L=Ce(),$=(0,b.useRef)(null),P=A([t,$]);function B(){const e=(D||I||$.current?.value||"").toString();return"character"===w?e.length:e.match(/\w+/g)?.length||0}const[z,H]=(0,b.useState)(B());(0,b.useEffect)((()=>{H(B())}),[I,D,w]),O((()=>{N.cols&&$.current?($.current.style.width="",$.current.style.resize="none"):$.current&&($.current.style.width="100%")}),[N.cols]);const F={id:o,onKeyDown:e=>{if(!i&&v&&"word"===w){const t=e.which;(y&&z>=y&&32===t||y&&z>=y&&13===t)&&e.preventDefault()}!i&&u&&u(e)},onPaste:e=>{if(!i&&"word"===w&&v&&void 0!==y&&null!==$.current){const t=$.current.value.match(/\w+/g)||[],n=e.clipboardData.getData("Text").match(/\w+/g)||[];if(t.length+n.length>y){e.preventDefault();const r=t.concat(n).slice(0,y);setTimeout((()=>{H(y)}),0),$.current.value=r.join(" ")}}},onChange:e=>{if(!i){if("character"==w)e?.persist?.(),setTimeout((()=>{H(e.target?.value?.length)}),0);else if("word"==w){if(!e.target.value)return void setTimeout((()=>{H(0)}),0);if(v&&void 0!==y&&null!==$.current){const t=e.target?.value?.match(/\w+/g);t&&t.length<=y?($.current.removeAttribute("maxLength"),setTimeout((()=>{H(t.length)}),0)):t&&t.length>y&&setTimeout((()=>{H(t.length)}),0)}}l&&l(e)}},onClick:e=>{!i&&c&&c(e)}},U=x()(`${k}--form-item`,n),j=x()(`${k}--text-area__wrapper`,{[`${k}--text-area__wrapper--cols`]:N.cols,[`${k}--text-area__wrapper--readonly`]:N.readOnly,[`${k}--text-area__wrapper--warn`]:_,[`${k}--text-area__wrapper--slug`]:M,[`${k}--text-area__wrapper--decorator`]:r}),V=x()(`${k}--label`,{[`${k}--visually-hidden`]:s&&!R,[`${k}--label--disabled`]:i}),G=x()(`${k}--text-area`,{[`${k}--text-area--light`]:p,[`${k}--text-area--invalid`]:d,[`${k}--text-area--warn`]:_}),W=x()(`${k}--label`,{[`${k}--label--disabled`]:i,[`${k}--text-area__label-counter`]:!0}),q=x()(`${k}--form__helper-text`,{[`${k}--form__helper-text--disabled`]:i}),Y=a?E().createElement(rt,{as:"label",htmlFor:o,className:V},a):null,Z=v&&y&&("character"===w||"word"===w)?E().createElement(rt,{as:"div",className:W},`${z}/${y}`):null,X=f?`text-area-helper-text-${L}`:void 0,K=f?E().createElement(rt,{as:"div",id:X,className:q},f):null,Q=o+"-error-msg",J=d?E().createElement(rt,{as:"div",role:"alert",className:`${k}--form-requirement`,id:Q},h,R&&E().createElement(Xt.BF,{className:`${k}--text-area__invalid-icon`})):null,ee=_?E().createElement(rt,{as:"div",role:"alert",className:`${k}--form-requirement`},T,R&&E().createElement(Xt.OR,{className:`${k}--text-area__invalid-icon ${k}--text-area__invalid-icon--warning`})):null;let te;d?te=Q:d||_||R||!f||(te=X),v&&"character"==w&&(F.maxLength=y);const ne=(0,b.useRef)(null),[re,ie]=(0,b.useState)(""),oe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"characters";const r=t-e;return r<=10&&r>0?`${r} ${1===r?n.slice(0,-1):n} left.`:r<=0?`Maximum ${n} reached.`:null}(z,y,"word"===w?"words":void 0);(0,b.useEffect)((()=>{if(oe&&oe!==re){const e=ne.current;if(e){e.textContent="";const t=setTimeout((()=>{e&&(e.textContent=oe,ie(oe))}),"word"===w?2e3:1e3);return()=>{t&&clearTimeout(t)}}}}),[oe,re,w]);const ae=E().createElement("textarea",g({},N,F,{placeholder:m,"aria-readonly":!!N.readOnly,className:G,"aria-invalid":d,"aria-describedby":te,disabled:i,rows:S,readOnly:N.readOnly,ref:P}));let se=E().isValidElement(M??r)?M??r:null;return se&&"AILabel"===se.type?.displayName&&(se=E().cloneElement(se,{size:"mini"})),E().createElement("div",{className:U},E().createElement("div",{className:`${k}--text-area__label-wrapper`},Y,Z),E().createElement("div",{className:j,"data-invalid":d||null},d&&!R&&E().createElement(Xt.BF,{className:`${k}--text-area__invalid-icon`}),_&&!d&&!R&&E().createElement(Xt.OR,{className:`${k}--text-area__invalid-icon ${k}--text-area__invalid-icon--warning`}),ae,M?se:r?E().createElement("div",{className:`${k}--text-area__inner-wrapper--decorator`},se):"",E().createElement("span",{className:`${k}--text-area__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:ne},oe),R&&E().createElement("hr",{className:`${k}--text-area__divider`}),R&&d?J:null,R&&_&&!d?ee:null),d||_||R?null:K,d&&!R?J:null,!_||d||R?null:ee)}));mr.displayName="TextArea",mr.propTypes={className:y().string,cols:y().number,counterMode:y().oneOf(["character","word"]),decorator:y().node,defaultValue:y().oneOfType([y().string,y().number]),disabled:y().bool,enableCounter:y().bool,helperText:y().node,hideLabel:y().bool,id:y().string,invalid:y().bool,invalidText:y().node,labelText:y().node.isRequired,light:te(y().bool),maxCount:y().number,onChange:y().func,onClick:y().func,onKeyDown:y().func,placeholder:y().string,readOnly:y().bool,rows:y().number,slug:te(y().node),value:y().oneOfType([y().string,y().number]),warn:y().bool,warnText:y().node};var gr=n(9772),vr=n.n(gr);const yr={NONE:"NONE",DESC:"DESC",ASC:"ASC"},br=(e,t)=>`${e}:${t}`,wr=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?Er(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props?.children&&"string"==typeof t.props?.children?Er(e.props.children,t.props.children,n):Er(""+e,""+t,n)},Er=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})},_r=(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:o}=n;return r===i.ASC?wr(e,t,o):wr(t,e,o)},xr=yr.NONE,Tr=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:o}=t,a=(s=i,r===o?"NONE"===s?yr.ASC:"ASC"===s?yr.DESC:yr.NONE:yr.ASC);var s;return Sr(e,t,r,a)},Sr=(e,t,n,r)=>{const{rowIds:i,cellsById:o,initialRowOrder:a}=t,{locale:s,sortRow:l}=e,c=r!==yr.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:o="en",sortRow:a=_r}=e;return t.slice().sort(((e,t)=>{const s=n[br(e,i)],l=n[br(t,i)];return a(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:o,sortStates:yr,compare:wr,rowIds:[e,t]})}))})({rowIds:i,cellsById:o,sortDirection:r,key:n,locale:s,sortRow:l}):a;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var Or=(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),o={},a={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;o[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(o[e.id].isSelected=r[e.id].isSelected,o[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r,slug:i,decorator:s}=t;const l=br(e.id,r);a[l]={id:l,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,hasAILabelHeader:!(!i&&"AILabel"!==s?.type?.displayName),info:{header:r}},o[e.id].cells[n]=l}))})),{rowIds:i,rowsById:o,cellsById:a}}(e.rows,e.headers,t),o={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||xr,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Sr(e,o,t.sortHeaderKey,t.sortDirection);o.rowIds=n}return o.isExpandedAll=o.rowIds.every((e=>!0===o.rowsById[e].isExpanded)),o},Ar=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))})));const Mr=e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:o}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const a=o(e,n);return"boolean"!=typeof r[a].value&&(""+r[a].value).toLowerCase().includes(i.toLowerCase())}))))},Cr=(0,b.createContext)({titleId:void 0,descriptionId:void 0}),Nr=(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 o=n.letterSpacing?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0])*(e.textContent?.length??0));const a=n.paddingLeft?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},kr=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:o=!1,useStaticWidth:a,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,tabIndex:u,...d}=e;const{titleId:h,descriptionId:f}=(0,b.useContext)(Cr),p=C(),[m,v]=(0,b.useState)(!1),y=(0,b.useRef)(null),w=x()(`${p}--data-table`,t,{[`${p}--data-table--${i}`]:i,[`${p}--data-table--sort`]:o,[`${p}--data-table--zebra`]:r,[`${p}--data-table--static`]:a,[`${p}--data-table--sticky-header`]:s,[`${p}--data-table--visible-overflow-menu`]:!l}),_=(0,b.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?y.current?.classList.add(`${p}--data-table--top-aligned-body`):y.current?.classList.remove(`${p}--data-table--top-aligned-body`)}),[p]),T=(0,b.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?y.current?.classList.add(`${p}--data-table--top-aligned-header`):y.current?.classList.remove(`${p}--data-table--top-aligned-header`)}),[p]),S=(0,b.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(y.current&&e){const t=Array.from(y.current.querySelectorAll("td")).some((t=>Nr(t,e))),n=Array.from(y.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${p}--table-header-label`);return n&&Nr(n,e)}));_(t),T(n)}}else _(!1),T(!1)}),[c,_,T,p]);k("resize",Kn(S,100));const A=(0,b.useCallback)((()=>{const e=y?.current?.parentNode,t=y?.current?.firstChild;v(t?.scrollWidth>e?.clientWidth)}),[]);k("resize",Kn(A,100)),O((()=>{A()}),[A]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{S()})),O((()=>{S()}),[S,i]);const M=E().createElement("div",{className:`${p}--data-table-content`,tabIndex:u??(m?0:void 0)},E().createElement("table",g({"aria-labelledby":h,"aria-describedby":f},d,{className:w,ref:y}),n));return s?E().createElement("section",{className:`${p}--data-table_inner-container`},M):M};kr.propTypes={children:y().node,className:y().string,experimentalAutoAlign:y().bool,isSortable:y().bool,overflowMenuOnHover:y().bool,size:y().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:y().bool,useStaticWidth:y().bool,useZebraStyles:y().bool,tabIndex:y().number};const Rr=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const o=C(),a=x()("function"==typeof n?n(o):n,t);return E().createElement(r,{...i,className:a||void 0})}return i.displayName=t,i.propTypes={className:y().string},i},Dr=Rr({name:"TableActionList",type:"div",className:e=>`${e}--action-list`}),Ir=e=>{let{renderIcon:t=xn.on,iconDescription:n="Add",...r}=e;return E().createElement(ze,g({renderIcon:t,iconDescription:n},r))};Ir.propTypes={hasIconOnly:y().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:y().oneOfType([y().func,y().object])};const Lr={"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"},$r=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?Lr[e]:"carbon.table.batch.selectAll"===e?`${Lr[e]} (${n})`:`${t} ${Lr[e]}`},Pr=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:o,onCancel:a,onSelectAll:s,translateWithId:l=$r,...c}=e;const[u,d]=E().useState(!1),h=C(),f=x()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),p=x()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return E().createElement("div",g({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),E().createElement("div",{className:p},E().createElement("p",{className:`${h}--batch-summary__para`},E().createElement(rt,null,l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&E().createElement(E().Fragment,null,E().createElement("span",{className:`${h}--batch-summary__divider`},"|"),E().createElement(ze,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:o})))),E().createElement(Dr,null,n,E().createElement(ze,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:a},l("carbon.table.batch.cancel"))))};Pr.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],Pr.propTypes={children:y().node,className:y().string,onCancel:y().func.isRequired,onSelectAll:y().func,shouldShowBatchActions:y().bool,totalCount:y().number,totalSelected:y().number.isRequired,translateWithId:y().func};const Br=e=>{let{children:t,className:n,...r}=e;return E().createElement("tbody",g({"aria-live":r["aria-live"]??"polite",className:n},r),t)};Br.propTypes={"aria-live":y().oneOf(["polite","assertive","off"]),children:y().node,className:y().string};const zr=E().forwardRef(((e,t)=>{let{children:n,className:r,hasAILabelHeader:i,colSpan:o,...a}=e;const s=C(),l=x()(r,{[`${s}--table-cell--column-slug`]:i});return E().createElement("td",g({className:l||void 0,ref:t,colSpan:o},a),n)}));zr.displayName="TableCell";const Hr=E().createContext(1),Fr=E().forwardRef((function(e,t){let{as:n="section",level:r,...i}=e;const o=E().useContext(Hr),a=r??o+1,s=n;return E().createElement(Hr.Provider,{value:Math.min(a,6)},E().createElement(s,g({ref:t},i)))}));Fr.propTypes={as:y().elementType,children:y().node,className:y().string,level:y().number};const Ur=E().forwardRef((function(e,t){const n=`h${E().useContext(Hr)}`;return E().createElement(n,g({ref:t},e))}));Ur.propTypes={children:y().node,className:y().string};const jr=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:o,useStaticWidth:a,...s}=e;const l=Ce("tc"),c=`${l}-title`,u=`${l}-description`,d=C(),h=x()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:o,[`${d}--data-table-container--static`]:a}),f=(0,b.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return E().createElement(Cr.Provider,{value:f},E().createElement(Fr,g({},s,{className:h}),(r||i)&&E().createElement("div",{className:`${d}--data-table-header`},r&&E().createElement(Ur,{className:`${d}--data-table-header__title`,id:c},r),i&&E().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};jr.propTypes={children:y().node,className:y().string,description:y().node,stickyHeader:y().bool,title:y().node,useStaticWidth:y().bool};const Vr=e=>{let{className:t,decorator:n}=e;const r=C(),i=x()({...t&&{[t]:!0},[`${r}--table-column-decorator`]:!0,[`${r}--table-column-decorator--active`]:n});let o=E().isValidElement(n)?n:null;return o&&"AILabel"===o.type?.displayName&&(o=E().cloneElement(o,{size:"mini"})),E().createElement("td",{className:i},o)};function Gr(e,t){return function(e,n,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t(e,n,r,...o)}}Vr.displayName="TableDecoratorRow",Vr.propTypes={className:y().string,decorator:y().node};const Wr=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:o,enableToggle:a,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=C(),p=x()(`${f}--table-expand`,i),m=l?"collapsed":void 0;return E().createElement("th",g({scope:"col",className:p,"data-previous-value":m,id:s},h),o||a?E().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},E().createElement(Ut,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};Wr.propTypes={"aria-controls":y().string,"aria-label":y().string,ariaLabel:y().string,children:y().node,className:y().string,enableExpando:te(y().bool),enableToggle:y().bool,expandIconDescription:y().string,id:y().string,isExpanded:Gr(0,y().bool),onExpand:y().oneOfType([Gr(0,y().func),Gr(0,y().func)])};const qr=E().forwardRef(((e,t)=>{let{"aria-controls":n,"aria-label":r,ariaLabel:i,className:o,children:a,isExpanded:s,onExpand:l,expandIconDescription:c,isSelected:u,expandHeader:d="expand",...h}=e;const f=C();let p;const m=E().Children.toArray(a).map((e=>{if("TableSlugRow"===e.type?.displayName||"TableDecoratorRow"===e.type?.displayName)return(e.props.slug||"AILabel"===e.props.decorator?.type.displayName)&&(p=!0),e})),v=E().Children.toArray(a).map((e=>{if("TableSlugRow"!==e.type?.displayName&&"TableDecoratorRow"!==e.type?.displayName)return e})),y=x()({[`${f}--parent-row`]:!0,[`${f}--expandable-row`]:s,[`${f}--data-table--selected`]:u,[`${f}--data-table--slug-row ${f}--data-table--ai-label-row`]:p},o),b=s?"collapsed":void 0;return E().createElement("tr",g({},h,{ref:t,className:y,"data-parent-row":!0}),m,E().createElement(zr,{className:`${f}--table-expand`,"data-previous-value":b,headers:d},E().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:l,title:c,"aria-label":i||r,"aria-expanded":s,"aria-controls":n},E().createElement(Ut,{className:`${f}--table-expand__svg`,"aria-label":c}))),v)}));qr.propTypes={"aria-controls":y().string,"aria-label":y().string,ariaLabel:y().string,children:y().node,className:y().string,expandHeader:y().string,expandIconDescription:y().string,isExpanded:y().bool,isSelected:y().bool,onExpand:y().func.isRequired},qr.displayName="TableExpandRow";const Yr=e=>{let{className:t,children:n,colSpan:r,...i}=e;const o=(0,b.useRef)(null),a=C(),s=x()(`${a}--expandable-row`,t),l=e=>{if(o&&o.current&&o.current.previousElementSibling){const t=o.current.previousElementSibling;"enter"===e?t.classList.add(`${a}--expandable-row--hover`):t.classList.remove(`${a}--expandable-row--hover`)}};return E().createElement("tr",g({ref:o,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),E().createElement(zr,{colSpan:r},E().createElement("div",{className:`${a}--child-row-inner-container`},n)))};Yr.propTypes={children:y().node,className:y().string,colSpan:y().number.isRequired};const Zr=Rr({name:"TableHead",type:"thead"});var Xr;const Kr=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Xr||(Xr=E().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)})),Qr="col",Jr={buttonDescription:"carbon.table.header.icon.description"},ei=(e,t)=>t&&e===Jr.buttonDescription?t.isSortHeader&&yr?t.sortDirection===yr.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===yr.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`:"",ti={[yr.NONE]:"none",[yr.ASC]:"ascending",[yr.DESC]:"descending"},ni=E().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,decorator:o,isSortable:a=!1,isSortHeader:s,onClick:l,scope:c=Qr,sortDirection:u,translateWithId:d=ei,slug:h,id:f,...p}=e;const m=C(),v=Ce("table-sort"),y=(0,b.useRef)(null);let w,_=E().isValidElement(h??o)?h??o:null;_&&"AILabel"===_.type?.displayName&&(w=!0,_=E().cloneElement(_,{size:"mini",ref:y}));const T=x()({[`${m}--table-header-label`]:!0,[`${m}--table-header-label--slug ${m}--table-header-label--ai-label`]:w,[`${m}--table-header-label--decorator`]:o});if(!a)return E().createElement("th",g({},p,{id:f,className:n,scope:c,colSpan:i,ref:t}),r?E().createElement("div",{className:T},r,E().createElement("div",{className:`${m}--table-header-label--decorator-inner`},_)):null);const S=x()(n,{[`${m}--table-sort`]:!0,[`${m}--table-sort--active`]:s&&u!==yr.NONE,[`${m}--table-sort--descending`]:s&&u===yr.DESC}),O=s&&u?ti[u]:"none",A=d&&d("carbon.table.header.icon.description",{header:r,sortDirection:u,isSortHeader:s,sortStates:yr}),M=x()(n,`${m}--table-sort__header`,{[`${m}--table-sort__header--ai-label`]:w,[`${m}--table-sort__header--decorator`]:o});return E().createElement("th",{id:f,"aria-sort":O,className:M,colSpan:i,ref:t,scope:c},E().createElement("div",{className:`${m}--table-sort__description`,id:v},A),E().createElement("button",g({type:"button","aria-describedby":v,className:S,onClick:e=>{if(!(w&&y.current&&y.current.contains(e.target)))return l?l(e):void 0}},p),E().createElement("span",{className:`${m}--table-sort__flex`},E().createElement("div",{className:`${m}--table-header-label`},r),E().createElement(xn.Do,{size:20,className:`${m}--table-sort__icon`}),E().createElement(Kr,{size:20,className:`${m}--table-sort__icon-unsorted`}),E().createElement("div",{className:`${m}--table-header-label--decorator-inner`},_))))}));ni.propTypes={children:y().node,className:y().string,colSpan:y().number,id:y().string,isSortHeader:y().bool,isSortable:y().bool,onClick:y().func,scope:y().string,sortDirection:y().oneOf(Object.values(yr)),translateWithId:y().func},ni.translationKeys=Object.values(Jr),ni.displayName="TableHeader";const ri=E().forwardRef(((e,t)=>{const n=C();let r;e?.children&&E().Children.toArray(e.children).map((e=>{"TableSlugRow"!==e.type?.displayName&&"TableDecoratorRow"!==e.type?.displayName||(e.props.slug||"AILabel"===e.props.decorator?.type.displayName)&&(r=!0)}));const i=x()(e.className,{[`${n}--data-table--selected`]:e.isSelected,[`${n}--data-table--slug-row ${n}--data-table--ai-label-row`]:r}),{ariaLabel:o,"aria-label":a,"aria-controls":s,onExpand:l,isExpanded:c,isSelected:u,...d}=e;return i&&(d.className=i),E().createElement("tr",g({ref:t},d))}));ri.propTypes={className:y().string,isSelected:y().bool};const ii=E().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:o,id:a,indeterminate:s,name:l,onChange:c=()=>{},onClick:u,onKeyDown:d,title:h}=e,f=C(),p=(0,b.useRef)(null),m=A([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:o,id:a,name:l,onClick:u?function(e){s&&(e.target.checked=!1),u?.(e)}:u,onChange:e=>{c(e.target.checked,a,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,b.useEffect)((()=>{p?.current&&(p.current.indeterminate=s||!1)}),[s]),E().createElement("div",{className:`${f}--checkbox--inline`},E().createElement("input",g),E().createElement("label",{htmlFor:a,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},E().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));ii.propTypes={"aria-label":y().string.isRequired,ariaLabel:te(y().string.isRequired),checked:y().bool,disabled:y().bool,id:y().string.isRequired,indeterminate:y().bool,name:y().string.isRequired,onChange:y().func,onClick:y().func,onKeyDown:y().func,title:y().string};const oi=e=>{let{ariaLabel:t="Select all rows in the table","aria-label":n,checked:r,id:i,indeterminate:o,name:a,onSelect:s,disabled:l,className:c}=e;const u=C();return E().createElement("th",{"aria-live":"off",scope:"col",className:x()(`${u}--table-column-checkbox`,c)},E().createElement(ii,{"aria-label":n||t,checked:r,id:i,indeterminate:o,name:a,onClick:s,disabled:l}))};oi.propTypes={"aria-label":y().string,ariaLabel:te(y().string),checked:y().bool,className:y().string,disabled:y().bool,id:y().string.isRequired,indeterminate:y().bool,name:y().string.isRequired,onSelect:y().func.isRequired};var ai=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 si=E().forwardRef(((e,t)=>{const{className:n,decorator:r,disabled:i,hideLabel:o,id:a,labelPosition:s="right",labelText:l="",name:c,onChange:u=()=>{},value:d="",slug:h,required:f,...p}=e,m=C(),v=Ce("radio-button"),y=a||v,w=x()(`${m}--radio-button__label-text`,{[`${m}--visually-hidden`]:o}),_=x()(n,`${m}--radio-button-wrapper`,{[`${m}--radio-button-wrapper--label-${s}`]:"right"!==s,[`${m}--radio-button-wrapper--slug`]:h,[`${m}--radio-button-wrapper--decorator`]:r}),T=(0,b.useRef)(null);let S=E().isValidElement(h??r)?h??r:null;if(S&&"AILabel"===S.type?.displayName){const e="inline"===S.props?.kind?"md":"mini";S=E().cloneElement(S,{size:e})}return E().createElement("div",{className:_},E().createElement("input",g({},p,{type:"radio",className:`${m}--radio-button`,onChange:function(e){u(d,c,e)},id:y,ref:ai(T,t),disabled:i,value:d,name:c,required:f})),E().createElement("label",{htmlFor:y,className:`${m}--radio-button__label`},E().createElement("span",{className:`${m}--radio-button__appearance`}),l&&E().createElement(rt,{className:w},l,h?S:r?E().createElement("div",{className:`${m}--radio-button-wrapper-inner--decorator`},S):"")))}));si.displayName="RadioButton",si.propTypes={checked:y().bool,className:y().string,decorator:y().node,defaultChecked:y().bool,disabled:y().bool,hideLabel:y().bool,id:y().string,labelPosition:y().oneOf(["right","left"]),labelText:y().node.isRequired,name:y().string,onChange:y().func,onClick:y().func,required:y().bool,slug:te(y().node),value:y().oneOfType([y().string,y().number])};const li=e=>{let{ariaLabel:t,"aria-label":n,checked:r,id:i,name:o,onSelect:a,onChange:s,disabled:l,radio:c,className:u}=e;const d=C(),h=Ce(),f=s?(e,t,n)=>{s(!!e,t||"",n)}:void 0,p=s?(e,t,n)=>{s(e,t,n)}:void 0,m={id:i,name:o||h,onClick:a,checked:r,disabled:l},v=n||t||"",y=x()(`${d}--table-column-checkbox`,{...u&&{[u]:!0},[`${d}--table-column-radio`]:c});return E().createElement("td",{className:y,"aria-live":"off"},c?E().createElement(si,g({},m,{labelText:v,onChange:f,hideLabel:!0})):E().createElement(ii,g({},m,{"aria-label":v,onChange:p})))};li.propTypes={"aria-label":y().string,ariaLabel:te(y().string),checked:y().bool,className:y().string,disabled:y().bool,id:y().string.isRequired,name:y().string.isRequired,onChange:y().func,onSelect:y().func.isRequired,radio:y().bool};const ci={},ui=e=>{let{className:t,slug:n}=e;(0,b.useEffect)((()=>{var e;(e="TableSlugRow")&&(ci[e]||(ci[e]=!0))}),[]);const r=C(),i=x()({...t&&{[t]:!0},[`${r}--table-column-slug`]:!0,[`${r}--table-column-slug--active`]:n});let o;return n&&(o=E().cloneElement(n,{size:"mini"})),E().createElement("td",{className:i},o)};ui.displayName="TableSlugRow",ui.propTypes={className:y().string,slug:y().node};const di=e=>{let{"aria-label":t="data table toolbar",ariaLabel:n,children:r,size:i,...o}=e;const a=C(),s=x()({[`${a}--table-toolbar`]:!0,[`${a}--table-toolbar--${i}`]:i});return E().createElement("section",g({"aria-label":n||t},o,{className:s}),r)};di.propTypes={"aria-label":y().string,ariaLabel:te(y().string),children:y().node,size:y().oneOf(["sm","lg"])};const hi=E().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:o,hasDivider:a=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=()=>{},onKeyDown:h=()=>{},requireTitle:f,title:p,wrapperClassName:m,...v}=e;const y=C(),b=x()(`${y}--overflow-menu-options__btn`,n),w=x()(`${y}--overflow-menu-options__option`,{[`${y}--overflow-menu--divider`]:a,[`${y}--overflow-menu-options__option--danger`]:l,[`${y}--overflow-menu-options__option--disabled`]:i},m),_=s?"a":"button",T="string"!=typeof u?u:E().createElement("div",{className:`${y}--overflow-menu-options__option-content`},u);return E().createElement(rt,{as:"li",className:w,role:"none"},E().createElement(_,g({className:b,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){we(e,ve)&&o?.({currentIndex:c,direction:1}),we(e,me)&&o?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?p||u:void 0},v),T))}));hi.propTypes={className:y().string,closeMenu:y().func,disabled:y().bool,handleOverflowMenuItemFocus:y().func,hasDivider:y().bool,href:y().string,index:y().number,isDelete:y().bool,itemText:y().node.isRequired,onBlur:y().func,onClick:y().func,onFocus:y().func,onKeyDown:y().func,onKeyUp:y().func,onMouseDown:y().func,onMouseEnter:y().func,onMouseLeave:y().func,onMouseUp:y().func,requireTitle:y().bool,title:y().string,wrapperClassName:y().string};const fi=E().forwardRef(((e,t)=>{let{children:n,...r}=e;return E().createElement(hi,g({ref:t,itemText:n},r))}));fi.displayName="TableToolbarAction",fi.propTypes={children:y().node,className:y().string,onClick:y().func.isRequired};const pi=Rr({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var mi,gi,vi,yi,bi,wi;const Ei=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},mi||(mi=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},gi||(gi=E().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)})),_i=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},vi||(vi=E().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"})),yi||(yi=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},bi||(bi=E().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"})),wi||(wi=E().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)}));var xi;const Ti=E().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:o,disabled:a,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=()=>{},onClear:h=()=>{},onKeyDown:f,onExpand:p,placeholder:m="Search",renderIcon:v,role:y="searchbox",size:w="md",type:_="text",value:T,...S}=e;const O=!(!T&&!o),M=C(),{isFluid:N}=(0,b.useContext)(Tn),k=(0,b.useRef)(null),R=A([t,k]),D=(0,b.useRef)(null),I=Ce("search-input"),L=l||I,$=`${L}-search`,[P,B]=(0,b.useState)(O||!1),[z,H]=(0,b.useState)(T),F=x()({[`${M}--search`]:!0,[`${M}--search--sm`]:"sm"===w,[`${M}--search--md`]:"md"===w,[`${M}--search--lg`]:"lg"===w,[`${M}--search--light`]:u,[`${M}--search--disabled`]:a,[`${M}--search--fluid`]:N},r),U=x()({[`${M}--search-close`]:!0,[`${M}--search-close--hidden`]:!P||!s});function j(){!T&&k.current&&(k.current.value="");const e=Object.assign({},k.current,{value:""});d({target:e,type:"change"}),h(),B(!1),k.current?.focus()}return T!==z&&(B(!!T),H(T)),E().createElement("div",{role:"search","aria-label":m,className:F},E().createElement("div",{"aria-label":p?"button":void 0,"aria-labelledby":p?$:void 0,role:p?"button":void 0,className:`${M}--search-magnifier`,onClick:p,onKeyDown:function(e){(we(e,ce)||we(e,de))&&(e.stopPropagation(),p&&p(e))},tabIndex:p&&!s?0:-1,ref:D,"aria-expanded":!(!p||!s)||!(p&&!s)&&void 0,"aria-controls":p?L:void 0},E().createElement(Si,{icon:v})),E().createElement("label",{id:$,htmlFor:L,className:`${M}--label`},c),E().createElement("input",g({autoComplete:n,className:`${M}--search-input`,defaultValue:o,disabled:a,role:y,ref:R,id:L,onChange:Pe([d,function(e){B(""!==e.target.value)}]),onKeyDown:Pe([f,function(e){we(e,ue)&&(e.stopPropagation(),k.current?.value?j():p&&s&&D.current?.focus())}]),placeholder:m,type:_,value:T,tabIndex:p&&!s?-1:void 0},S)),E().createElement("button",{"aria-label":i,className:U,disabled:a,onClick:j,title:i,type:"button"},xi||(xi=E().createElement(jt,null))))}));function Si(e){let{icon:t}=e;const n=C();return t?E().createElement(t,{className:`${n}--search-magnifier-icon`}):E().createElement(Ei,{className:`${n}--search-magnifier-icon`})}Ti.displayName="Search",Ti.propTypes={autoComplete:y().string,className:y().string,closeButtonLabelText:y().string,defaultValue:y().oneOfType([y().string,y().number]),disabled:y().bool,id:y().string,isExpanded:y().bool,labelText:y().node.isRequired,light:te(y().bool),onChange:y().func,onClear:y().func,onExpand:y().func,onKeyDown:y().func,placeholder:y().string,renderIcon:y().oneOfType([y().func,y().object]),role:y().string,size:y().oneOf(["sm","md","lg"]),type:y().string,value:y().oneOfType([y().string,y().number])},Si.propTypes={icon:y().oneOfType([y().func,y().object])};const Oi={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},Ai=e=>Oi[e],Mi=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i=Ze,translateWithId:o=Ai,placeholder:a,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f=!1,id:p,onBlur:m,onFocus:v,size:y="lg",tabIndex:w="0",..._}=e;const{current:T}=(0,b.useRef)(void 0!==l),[S,O]=(0,b.useState)(Boolean(c||u)),A=T?l:S,[M,N]=(0,b.useState)(u||""),k=Ce("table-toolbar-search"),[R,D]=(0,b.useState)(null),I=C();(0,b.useEffect)((()=>{R&&(R.current?.querySelector?.("input")?.focus(),D(null))}),[R]),(0,b.useEffect)((()=>{u&&r?.("",u)}),[]);const L=x()(t,{[n]:n,[`${I}--toolbar-search-container-active`]:A,[`${I}--toolbar-search-container-disabled`]:d,[`${I}--toolbar-search-container-expandable`]:!f,[`${I}--toolbar-search-container-persistent`]:f}),$=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!A;d||(T||f||O(t),h&&h(e,t))};return E().createElement(Ti,g({disabled:d,className:L,value:M,id:void 0!==p?p:k,labelText:s||o("carbon.table.toolbar.search.label"),placeholder:a||o("carbon.table.toolbar.search.placeholder"),onChange:e=>{N(e.target.value),r&&r(e,e.target.value)},onClear:i,onFocus:v?e=>v(e,$):e=>$(e,!0),onBlur:m?e=>m(e,$):e=>!M&&$(e,!1),size:y,tabIndex:w},_))};var Ci,Ni,ki;Mi.propTypes={children:y().node,className:y().string,defaultExpanded:y().bool,defaultValue:y().string,disabled:y().bool,expanded:y().bool,id:y().string,labelText:y().string,onBlur:y().func,onChange:y().func,onClear:y().func,onExpand:y().func,onFocus:y().func,persistent:y().bool,placeholder:y().string,searchContainerClass:y().string,size:y().oneOf(["sm","md","lg"]),tabIndex:y().oneOfType([y().number,y().string]),translateWithId:y().func};const Ri=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ci||(Ci=E().createElement("circle",{cx:"16",cy:"8",r:"2"})),Ni||(Ni=E().createElement("circle",{cx:"16",cy:"16",r:"2"})),ki||(ki=E().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));function Di(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"enableSelectableItems":return{...e,hasSelectableItems:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Ii=(0,b.createContext)({state:{isRoot:!0,hasIcons:!1,hasSelectableItems:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:e=>{}}),Li=E().createContext({direction:"ltr"}),$i=(0,b.forwardRef)((function(e,t){let{children:n,className:r,containerRef:i,label:o,menuAlignment:a,mode:s,onClose:l,onOpen:c,open:u,size:d="sm",legacyAutoalign:h="true",target:f=_e&&document.body,x:p=0,y:m=0,...v}=e;const y=C(),w=(0,b.useRef)(null),_=(0,b.useContext)(Ii),T=_.state.isRoot,S=T?d:_.state.size,[O,M]=(0,b.useReducer)(Di,{..._.state,isRoot:!1,size:d,requestCloseRoot:T?H:_.state.requestCloseRoot}),N=(0,b.useMemo)((()=>({state:O,dispatch:M})),[O,M]),k=(0,b.useRef)(null),R=A([t,k]),[I,L]=(0,b.useState)([-1,-1]),$=N.state.items.filter((e=>!e.disabled&&e.ref.current));let P;if(i?.current){const{width:e}=i.current.getBoundingClientRect();P=e}const{direction:B}=(0,b.useContext)(Li);function z(){w.current&&w.current.focus()}function H(e){/^key/.test(e.type)?window.addEventListener("keyup",z,{once:!0}):"click"===e.type&&k.current?k.current.addEventListener("focusout",z,{once:!0}):z(),l&&l()}function F(e){const t=$.findIndex((e=>e.ref?.current?.contains(document.activeElement)));let n=t;if(-1===t?n=0:e&&(we(e,me)&&(n-=1),we(e,ve)&&(n+=1)),n<0&&(n=$.length-1),n>=$.length&&(n=0),n!==t){const t=$[n];t.ref?.current?.focus(),e?.preventDefault()}}function U(e,t){if(!k.current)return;const{width:n,height:r}=k.current.getBoundingClientRect(),i=T?"vertical":"horizontal",o={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:T?0:4}};if(P&&P<o.x.size&&("bottom"===a||"top"===a)&&(o.x.size=P),P&&("bottom-end"===a||"top-end"===a)&&o.x.anchor>=87&&P<o.x.size){const e=o.x.anchor+o.x.reversedAnchor;o.x.anchor=o.x.anchor+e}const{max:s,size:l,anchor:c,reversedAnchor:u,offset:d}=o[t],h=[s-8-l-c>=0&&c-d,u-l>=0&&u-l+d,s-8-l],f="top"===a||"top-end"===a||"top-start"===a;"number"==typeof h[0]&&f&&h[0]>=0&&!h[1]&&"y"===t?k.current.style.transform="translate(0)":f&&!h[0]&&"y"===t&&(h[0]=c-d);const p=h.find((e=>!1!==e));return p>=8?p:8}function j(e){return null!=e}function V(e){if(Array.isArray(e)){const t=e.filter(j);return 2===t.length?t:void 0}return[e,e]}(0,b.useEffect)((()=>{u&&$.length>0&&F()}),[u,$]),(0,b.useEffect)((()=>{u?function(){if(k.current){if(w.current=document.activeElement,h){const e=function(){const e={x:V(p),y:V(m)};return e.x&&e.y?[U(e.x,"x")??-1,U(e.y,"y")??-1]:[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==B||v?.id?.includes("MenuButton")?(k.current.style.insetInlineStart=`${e[0]}px`,k.current.style.insetInlineEnd="initial"):(k.current.style.insetInlineStart="initial",k.current.style.insetInlineEnd=`${e[0]}px`),k.current.style.insetBlockStart=`${e[1]}px`,L(e)}k.current.focus(),c&&c()}}():L([-1,-1])}),[u]);const G=x()(r,`${y}--menu`,`${y}--menu--${S}`,{[`${y}--menu--box-shadow-top`]:a&&"top"===a.slice(0,3),[`${y}--menu--open`]:u,[`${y}--menu--shown`]:u&&!h||I[0]>=0&&I[1]>=0,[`${y}--menu--with-icons`]:N.state.hasIcons,[`${y}--menu--with-selectable-items`]:N.state.hasSelectableItems,[`${y}--autoalign`]:!h}),W=E().createElement(Ii.Provider,{value:N},E().createElement("ul",g({},v,{className:G,role:"menu",ref:R,"aria-label":o,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(we(e,ue)||!T&&we(e,pe))&&l?H(e):F(e)},onBlur:function(e){u&&l&&T&&!k.current?.contains(e.relatedTarget)&&H(e)}}),n));return f&&T?u&&(0,D.createPortal)(W,f)||null:W}));$i.propTypes={children:y().node,className:y().string,label:y().string,menuAlignment:y().string,mode:te(y().oneOf(["full","basic"])),onClose:y().func,onOpen:y().func,open:y().bool,size:y().oneOf(["xs","sm","md","lg"]),target:y().object,x:y().oneOfType([y().number,y().arrayOf(y().number)]),y:y().oneOfType([y().number,y().arrayOf(y().number)])};const Pi="md",Bi=E().forwardRef((function(e,t){let{autoAlign:n=!1,children:r,className:i,label:o="Options",renderIcon:a=Ri,size:s=Pi,menuAlignment:l="bottom-start",tooltipAlignment:c,menuTarget:u,...d}=e;const h=re("enable-v12-dynamic-floating-styles")||n,{refs:f,floatingStyles:p,placement:m,middlewareData:v}=J(h?{placement:l,strategy:"fixed",middleware:[n&&F({fallbackPlacements:l.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]})],whileElementsMounted:I.ll}:{}),y=Ce("overflowmenu"),w=C(),_=(0,b.useRef)(null),{open:T,x:S,y:O,handleClick:A,handleMousedown:M,handleClose:N}=function(e){const[t,n]=(0,b.useState)(!1),[r,i]=(0,b.useState)([[-1,-1],[-1,-1]]);function o(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?o():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:o}=t.getBoundingClientRect();i([[e,r],[n,o]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:o}}(_);(0,b.useEffect)((()=>{h&&Object.keys(p).forEach((e=>{f.floating.current&&(f.floating.current.style[e]=p[e])}))}),[p,h,f.floating,T,m,v]);const k=x()(i,`${w}--overflow-menu__container`,{[`${w}--autoalign`]:h}),R=x()(`${w}--overflow-menu__${l}`),D=x()(`${w}--overflow-menu`,{[`${w}--overflow-menu--open`]:T},s!==Pi&&`${w}--overflow-menu--${s}`),L=ai(_,f.setReference);return E().createElement("div",g({},d,{className:k,"aria-owns":T?y:void 0,ref:t}),E().createElement($e,{"aria-controls":T?y:void 0,"aria-haspopup":!0,"aria-expanded":T,className:D,onClick:function(){_.current&&A()},onMouseDown:M,ref:L,label:o,align:c,kind:"ghost"},E().createElement(a,{className:`${w}--overflow-menu__icon`})),E().createElement($i,{containerRef:_,ref:f.setFloating,menuAlignment:l,className:R,id:y,size:s,legacyAutoalign:!h,open:T,onClose:N,x:S,y:O,label:o,target:u},r))}));Bi.propTypes={autoAlign:y().bool,children:y().node,className:y().string,label:y().string,menuAlignment:y().oneOf(["top-start","top-end","bottom-start","bottom-end"]),renderIcon:y().oneOfType([y().func,y().object]),size:y().oneOf(["sm","md","lg"]),tooltipAlignment:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),menuTarget:y().instanceOf("undefined"!=typeof Element?Element:Object)},n(8958);class zi extends E().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(zi.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 E().cloneElement(this.props.children,{ref:this.handleRef})}}m(zi,"propTypes",{children:y().element.isRequired,onClickOutside:y().func.isRequired});var Hi=n(6468),Fi=n.n(Hi);const Ui=(()=>{const e=[];let t=!1;const n=()=>{e.forEach((e=>{e()})),t=!1},r=()=>{t||(t=!0,Fi().requestAnimationFrame(n))};return{add:t=>(e.length||Fi().addEventListener("resize",r),(t=>{e.indexOf(t)<0&&e.push(t)})(t),{remove:()=>{const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}})(),ji="left",Vi="top",Gi="right",Wi="bottom",qi=e=>{let{children:t,flipped:n,focusTrap:r,menuDirection:i=Wi,menuOffset:o={top:0,left:0},menuRef:a,onPlace:s,selectorPrimaryFocus:l,styles:c,target:u=()=>document.body,triggerRef:d,updateOrientation:h}=e;const f=(0,b.useContext)(M),[m,g]=(0,b.useState)(void 0),v=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(!1),x=(0,b.useCallback)((e=>{const t=v.current;if(!t)return;const r=d.current,a=t.getBoundingClientRect(),s=r?r.getBoundingClientRect():void 0,l="function"==typeof o?o(t,i,r,n):o;if(h&&h({menuSize:a,refPosition:s,direction:i,offset:l,scrollX:Fi().pageXOffset,scrollY:Fi().pageYOffset,container:{rect:u().getBoundingClientRect(),position:getComputedStyle(u()).position}}),a.width>0&&a.height>0||!l){const n=(e=>{let{menuSize:t,refPosition:n,offset:r,direction:i,scrollX:o,scrollY:a,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:o,f="static"!==s.position?0:a,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,w=(l+u)/2,E=(c+d)/2;return{[ji]:()=>({left:l-g+h-b-m,top:E-v/2+f+y-9-p}),[Vi]:()=>({left:w-g/2+h+b-m,top:c-v+f-y-p}),[Gi]:()=>({left:u+h+b-m,top:E-v/2+f+y+3-p}),[Wi]:()=>({left:w-g/2+h+b-m,top:d+f+y-p})}[i]()})({menuSize:a,refPosition:s??{left:0,top:0,right:0,bottom:0},offset:l,direction:i,scrollX:Fi().pageXOffset,scrollY:Fi().pageYOffset,container:{rect:u().getBoundingClientRect(),position:getComputedStyle(u()).position}});if(m&&m.left===n.left&&m.top===n.top||g(n),!e){const e=t.getBoundingClientRect();e.width===a.width&&e.height===a.height||x(!0)}}}),[d,o,i,n,u,h,m]),T=e=>{v.current=e,_.current=!!e,a&&a(e),e&&x()};(0,b.useEffect)((()=>{_.current&&m&&v.current&&(v.current.contains(document.activeElement)||(e=>{const t=l?e.querySelector(l):null,n=e.querySelector(Ye),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()})(v.current),"function"==typeof s&&s(v.current),_.current=!1)}),[m,s]),(0,b.useEffect)((()=>{const e=Ui.add((()=>{x()}));return()=>{e.remove()}}),[d,o,i,n,u,h]),(0,b.useEffect)((()=>{x()}),[o,i,n,d,u,h]);const S=e=>{v.current&&y.current&&w.current&&function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:o,selectorsFloatingMenus:a}=e;if(t&&i&&o&&!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,a)){const e=o.compareDocumentPosition(i);if(i===n||e&We){const e=[...t.querySelectorAll(Ye)].reverse().find((e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}else if(i===r||e&qe){const e=Array.prototype.find.call(t.querySelectorAll(Ye),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}}}({bodyNode:v.current,startTrapNode:y.current,endTrapNode:w.current,currentActiveNode:e.relatedTarget,oldActiveNode:e.target})},O=e=>{we(e,le)&&v.current&&function(e){let{containerNode:t,currentActiveNode:n,event:r}=e;["blur","focusout","focusin","focus"].includes(r.type);const i=mn(t),o=i[0],a=i[i.length-1];n!==a||r.shiftKey||(r.preventDefault(),o.focus()),n===o&&r.shiftKey&&(r.preventDefault(),a.focus())}({containerNode:v.current,currentActiveNode:e.target,event:e})},A=p("enable-experimental-focus-wrap-without-sentinels");if("undefined"!=typeof document){const e=u?u():document.body;return D.createPortal(E().createElement("div",{onBlur:r&&!A?S:void 0,onKeyDown:A?O:void 0},!A&&E().createElement("span",{ref:y,tabIndex:0,role:"link",className:`${f}--visually-hidden`},"Focus sentinel"),(()=>{const e=m,n=e?{left:`${e.left}px`,top:`${e.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return(0,b.cloneElement)(t,{ref:T,style:{...c,...n,position:"absolute",opacity:1}})})(),!A&&E().createElement("span",{ref:w,tabIndex:0,role:"link",className:`${f}--visually-hidden`},"Focus sentinel")),e)}return null},Yi=Ee(),Zi={[Vi]:"bottom",[Wi]:"top"},Xi=(e,t,n,r)=>{const i=Zi[t],{offsetWidth:o,offsetHeight:a}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(o/2-(n?n.offsetWidth:0)/2),top:0};default:return{left:0,top:0}}},Ki=(0,b.forwardRef)(((e,t)=>{let{"aria-label":n=null,ariaLabel:r,children:i,className:o,direction:a=Wi,flipped:s=!1,focusTrap:l=!0,iconClass:c,iconDescription:u="Options",id:d,light:h,menuOffset:f=Xi,menuOffsetFlip:p=Xi,menuOptionsClass:m,onClick:v=Ze,onClose:y=Ze,onOpen:w=Ze,open:_,renderIcon:T=Ri,selectorPrimaryFocus:S="[data-floating-menu-primary-focus]",size:O="md",...A}=e;const C=(0,b.useContext)(M),[N,k]=(0,b.useState)(_??!1),[R,D]=(0,b.useState)(!1),[I,L]=(0,b.useState)(!1),$=(0,b.useRef)(null),P=(0,b.useRef)(Yi()),B=(0,b.useRef)(null),z=(0,b.useRef)({}),H=(0,b.useRef)(_),F=(0,b.useRef)(N),U=(0,b.useRef)(null);(0,b.useEffect)((()=>{H.current!==_&&(k(!!_),H.current=_)}),[_]),(0,b.useEffect)((()=>{U.current&&L(!0)}),[]),(0,b.useEffect)((()=>{!N&&F.current&&y(),F.current=N}),[N,y]);const j=(0,b.useCallback)((()=>{U.current&&U.current.focus()}),[]),V=(0,b.useCallback)((e=>{k(!1),e&&e(),y()}),[y]),G=(0,b.useCallback)((()=>{const e=R,t=N;V((()=>{t&&!e&&j()}))}),[R,N,V,j]),W=(0,b.useCallback)((()=>{const e=N;V((()=>{e&&j()}))}),[N,V,j]),q=e=>{let{currentIndex:t,direction:n}=e;const r=b.Children.toArray(i).reduce(((e,t,n)=>((0,b.isValidElement)(t)&&!t.props.disabled&&e.push(n),e)),[]),o=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),a=z.current[r[o]];a?.focus()},Y=`overflow-menu-${P.current}__menu-body`,Z=x()(o,`${C}--overflow-menu`,{[`${C}--overflow-menu--open`]:N,[`${C}--overflow-menu--light`]:h,[`${C}--overflow-menu--${O}`]:O}),X=x()(m,`${C}--overflow-menu-options`,{[`${C}--overflow-menu--flip`]:s,[`${C}--overflow-menu-options--open`]:N,[`${C}--overflow-menu-options--light`]:h,[`${C}--overflow-menu-options--${O}`]:O}),K=x()(`${C}--overflow-menu__icon`,c),Q=b.Children.toArray(i).map(((e,t)=>{if((0,b.isValidElement)(e)){const n=e;return(0,b.cloneElement)(n,{closeMenu:n.props.closeMenu||G,handleOverflowMenuItemFocus:q,ref:e=>{z.current[t]=e},index:t})}return null})),J=E().createElement("ul",{className:X,tabIndex:-1,role:"menu","aria-label":n||r,onKeyDown:e=>{N&&be(e,[me,ge,ve,pe])&&e.preventDefault(),be(e,[ue])&&(W(),e.stopPropagation())},id:Y},Q),ee=E().createElement(qi,{focusTrap:l,triggerRef:U,menuDirection:a,menuOffset:s?p:f,menuRef:e=>{e||(B.current=e),!e&&$.current&&($.current=$.current.release())},flipped:s,target:()=>{const e=U.current;return e instanceof Element&&e.closest("[data-floating-menu-container]")||document.body},onPlace:e=>{if(!e)return;B.current=e;const t="onfocusin"in window,n=t?"focusin":"focus";$.current=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=t.target,r=U.current;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${C}--overflow-menu:first-child, .${C}--overflow-menu-options:first-child`)||G())}),!t),w()},selectorPrimaryFocus:S},(0,b.cloneElement)(J,{"data-floating-menu-direction":a}));return E().createElement(zi,{onClickOutside:e=>{!N||B.current&&B.current.contains(e.target)||V()}},E().createElement("span",{className:`${C}--overflow-menu__wrapper`,"aria-owns":N?Y:void 0},E().createElement($e,g({},A,{type:"button","aria-haspopup":!0,"aria-expanded":N,"aria-controls":N?Y:void 0,className:Z,onClick:e=>{D(!0),B.current&&B.current.contains(e.target)||(k((e=>!e)),v(e))},id:d,ref:ai(U,t),size:O,label:u,kind:"ghost"}),E().createElement(T,{className:K,"aria-label":u})),N&&I&&ee))}));Ki.propTypes={"aria-label":y().string,ariaLabel:te(y().string),children:y().node,className:y().string,direction:y().oneOf([Vi,Wi]),flipped:y().bool,focusTrap:y().bool,iconClass:y().string,iconDescription:y().string,id:y().string,light:te(y().bool),menuOffset:y().oneOfType([y().shape({top:y().number.isRequired,left:y().number.isRequired}),y().func]),menuOffsetFlip:y().oneOfType([y().shape({top:y().number.isRequired,left:y().number.isRequired}),y().func]),menuOptionsClass:y().string,onClick:y().func,onClose:y().func,onFocus:y().func,onKeyDown:y().func,onOpen:y().func,open:y().bool,renderIcon:y().oneOfType([y().func,y().object]),selectorPrimaryFocus:y().string,size:y().oneOf(["sm","md","lg"])};const Qi=Ue(Ki),Ji=e=>re("enable-v12-overflowmenu")?E().createElement(Bi,e):E().createElement(Qi,e);Ji.displayName="OverflowMenu";const eo="Settings",to=e=>{let{className:t,renderIcon:n=_i,iconDescription:r=eo,children:i,menuOptionsClass:o,...a}=e;const s=C(),l=x()(t,`${s}--toolbar-action ${s}--overflow-menu`),c=x()(o,`${s}--toolbar-action__menu`);return E().createElement(Ji,g({"aria-label":r,renderIcon:n,className:l,title:r,iconDescription:r,menuOptionsClass:c,flipped:!0},a),i)};to.propTypes={children:y().node.isRequired,className:y().string,iconDescription:y().string,menuOptionsClass:y().string,renderIcon:y().oneOfType([y().func,y().object])};const no=Ee(),ro={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"},io={[ro.expandAll]:"Expand all rows",[ro.collapseAll]:"Collapse all rows",[ro.expandRow]:"Expand current row",[ro.collapseRow]:"Collapse current row",[ro.selectAll]:"Select all rows",[ro.unselectAll]:"Unselect all rows",[ro.selectRow]:"Select row",[ro.unselectRow]:"Unselect row"},oo=e=>io[e];class ao extends E().Component{constructor(e){var t;super(e),t=this,m(this,"instanceId",void 0),m(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:o,sortHeaderKey:a}=this.state;return{...i,key:t.key,sortDirection:o,isSortable:r,isSortHeader:a===t.key,slug:t.slug,decorator:t.decorator,onClick:e=>{const r=Tr(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),m(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i=oo}=t.props,{isExpandedAll:o,rowIds:a,rowsById:s}=t.state,l=o||a.every((e=>s[e].isExpanded));return{...r,"aria-label":i(l?ro.collapseAll:ro.expandAll),"aria-controls":a.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:Pe([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),m(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),m(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),m(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i=oo}=this.props,o=t.isExpanded?ro.collapseRow:ro.expandRow;return{...r,key:t.id,onExpand:Pe([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,"aria-label":i(o),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),m(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),m(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i=oo}=t.props;if(n){const o=n.isSelected?ro.unselectRow:ro.selectRow;return{...r,checked:n.isSelected,onSelect:Pe([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:`select-row-${t.instanceId}`,"aria-label":i(o),disabled:n.disabled,radio:t.props.radio}}const o=t.state.rowIds.length,a=t.getSelectedRows().length,s=o>0&&a===o,l=o>0&&a>0&&a!==o,c=s||l?ro.unselectAll:ro.selectAll;return{...r,"aria-label":i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:`select-all-${t.instanceId}`,onSelect:Pe([t.handleSelectAll,e])}})),m(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}})),m(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}})),m(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t="lg",isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o=!1,experimentalAutoAlign:a}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}})),m(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),m(this,"getCellProps",(e=>{let{cell:t,...n}=e;return{...n,hasAILabelHeader:t.hasAILabelHeader,hasDecoratorHeader:t.hasDecoratorHeader}})),m(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),m(this,"getFilteredRowIds",(()=>{const{filterRows:e=Mr}=this.props,t="string"==typeof this.state.filterInputValue?e({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:br}):this.state.rowIds;return 0==t.length?[]:t})),m(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),m(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,o)=>{const a={...e.rowsById[o]};return a.disabled||i&&!n.includes(o)||(a.isSelected=t),r[o]=a,r}),{})}})),m(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),m(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)}}))})),m(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}}}}))})),m(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}}}}))})),m(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}})),{})}}))})),m(this,"handleSortBy",(e=>()=>{this.setState((t=>Tr(this.props,t,{key:e})))})),m(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...Or(e,{}),isExpandedAll:!1},this.instanceId=no()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!vr()(t,n))return this.setState((e=>Or(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!vr()(r,i))return this.setState((e=>Or(this.props,e))),!1;if(!vr()(e.rows,this.props.rows))return this.setState((e=>Or(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t=Mr,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:o,rowsById:a,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:o,headers:n,cellsById:s,inputValue:i,getCellId:br}):o,c={rows:Ar(l,a,s),headers:this.props.headers,selectedRows:Ar(this.getSelectedRows(),a,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,getCellProps:this.getCellProps,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}}m(ao,"propTypes",{experimentalAutoAlign:y().bool,filterRows:y().func,headers:y().arrayOf(y().shape({key:y().string.isRequired,header:y().node.isRequired})).isRequired,isSortable:y().bool,locale:y().string,overflowMenuOnHover:y().bool,radio:y().bool,rows:y().arrayOf(y().shape({id:y().string.isRequired,disabled:y().bool,isSelected:y().bool,isExpanded:y().bool})).isRequired,size:y().oneOf(["xs","sm","md","lg","xl"]),sortRow:y().func,stickyHeader:y().bool,translateWithId:y().func,useStaticWidth:y().bool,useZebraStyles:y().bool}),m(ao,"translationKeys",Object.values(ro)),m(ao,"Table",void 0),m(ao,"TableActionList",void 0),m(ao,"TableBatchAction",void 0),m(ao,"TableBatchActions",void 0),m(ao,"TableBody",void 0),m(ao,"TableCell",void 0),m(ao,"TableContainer",void 0),m(ao,"TableDecoratorRow",void 0),m(ao,"TableExpandHeader",void 0),m(ao,"TableExpandRow",void 0),m(ao,"TableExpandedRow",void 0),m(ao,"TableHead",void 0),m(ao,"TableHeader",void 0),m(ao,"TableRow",void 0),m(ao,"TableSelectAll",void 0),m(ao,"TableSelectRow",void 0),m(ao,"TableSlugRow",void 0),m(ao,"TableToolbar",void 0),m(ao,"TableToolbarAction",void 0),m(ao,"TableToolbarContent",void 0),m(ao,"TableToolbarSearch",void 0),m(ao,"TableToolbarMenu",void 0),ao.Table=kr,ao.TableActionList=Dr,ao.TableBatchAction=Ir,ao.TableBatchActions=Pr,ao.TableBody=Br,ao.TableCell=zr,ao.TableContainer=jr,ao.TableDecoratorRow=Vr,ao.TableExpandHeader=Wr,ao.TableExpandRow=qr,ao.TableExpandedRow=Yr,ao.TableHead=Zr,ao.TableHeader=ni,ao.TableRow=ri,ao.TableSelectAll=oi,ao.TableSelectRow=li,ao.TableSlugRow=ui,ao.TableToolbar=di,ao.TableToolbarAction=fi,ao.TableToolbarContent=pi,ao.TableToolbarSearch=Mi,ao.TableToolbarMenu=to},279:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:l,days:o,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof y},h=function(e,t,n){return new y(e,n,t.$l)},f=function(e){return t.p(e)+"s"},p=function(e){return e<0},m=function(e){return p(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},v=function(e,t){return e?p(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function p(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(c);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/s),e%=s,this.$d.months=m(e/l),e%=l,this.$d.days=m(e/o),e%=o,this.$d.hours=m(e/i),e%=i,this.$d.minutes=m(e/r),e%=r,this.$d.seconds=m(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,"D"),i=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var s=v(a,"S"),l=e.negative||t.negative||r.negative||i.negative||o.negative||s.negative,c=i.format||o.format||s.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+r.format+c+i.format+o.format+s.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[f(e)]},g.get=function(e){var t=this.$ms,n=f(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?m(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return h(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}(),b=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){var n=i.locale();return h(e,{$l:n},t)},i.isDuration=d;var o=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?b(this,e,1):o.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?b(this,e,-1):a.bind(this)(e,t)}}}()},5602:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},8958:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,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,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},9772:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=a.length)return!1;for(l=s;0!=l--;)if(!o(e[l],a[l]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((s=e.length)!=a.length)return!1;for(l=s;0!=l--;)if(e[l]!==a[l])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!o(e[c[l]],a[c[l]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},320:(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}},524:(e,t,n)=>{"use strict";e.exports=n(320)},723:function(e,t,n){var r,i;"undefined"!=typeof self&&self,e.exports=(r=n(1343),i=n(3144),function(){"use strict";var e={156:function(e){e.exports=r},111:function(e){e.exports=i},582:function(e,t,n){n.r(t),n.d(t,{__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return T},__asyncValues:function(){return O},__await:function(){return x},__awaiter:function(){return p},__classPrivateFieldGet:function(){return k},__classPrivateFieldIn:function(){return D},__classPrivateFieldSet:function(){return R},__createBinding:function(){return g},__decorate:function(){return s},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return m},__importDefault:function(){return N},__importStar:function(){return C},__makeTemplateObject:function(){return A},__metadata:function(){return f},__param:function(){return l},__propKey:function(){return d},__read:function(){return b},__rest:function(){return a},__runInitializers:function(){return u},__setFunctionName:function(){return h},__spread:function(){return w},__spreadArray:function(){return _},__spreadArrays:function(){return E},__values:function(){return y}});var 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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),h=!1,f=n.length-1;f>=0;f--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[f])("accessor"===l?{get:d.get,set:d.set}:d[c],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===l?i.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),h=!0}function u(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function E(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function _(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function T(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof x?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:x(e[r](t)),done:!1}:i?i(t):t}:i}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var M=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return M(t,e),t}function N(e){return e&&e.__esModule?e:{default:e}}function k(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function R(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:l,__metadata:f,__awaiter:p,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:b,__spread:w,__spreadArrays:E,__spreadArray:_,__await:x,__asyncGenerator:T,__asyncDelegator:S,__asyncValues:O,__makeTemplateObject:A,__importStar:C,__importDefault:N,__classPrivateFieldGet:k,__classPrivateFieldSet:R,__classPrivateFieldIn:D}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.PrintContextConsumer=void 0;var t=n(582),r=n(156),i=n(111),a=Object.prototype.hasOwnProperty.call(r,"createContext"),s=Object.prototype.hasOwnProperty.call(r,"useMemo")&&Object.prototype.hasOwnProperty.call(r,"useCallback"),l=a?r.createContext({}):null;e.PrintContextConsumer=l?l.Consumer:function(){return null};var c={copyStyles:!0,pageStyle:"\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ",removeAfterPrint:!1,suppressErrors:!1},u=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.startPrint=function(e){var t=n.props,r=t.onAfterPrint,i=t.onPrintError,o=t.print,a=t.documentTitle;setTimeout((function(){var t,s;if(e.contentWindow)if(e.contentWindow.focus(),o)o(e).then((function(){return null==r?void 0:r()})).then((function(){return n.handleRemoveIframe()})).catch((function(e){i?i("print",e):n.logMessages(["An error was thrown by the specified `print` function"])}));else{if(e.contentWindow.print){var l=null!==(s=null===(t=e.contentDocument)||void 0===t?void 0:t.title)&&void 0!==s?s:"",c=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=l))}else n.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==r||r(),n.handleRemoveIframe()}else n.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},n.triggerPrint=function(e){var t=n.props,r=t.onBeforePrint,i=t.onPrintError;if(r){var o=r();o&&"function"==typeof o.then?o.then((function(){n.startPrint(e)})).catch((function(e){i&&i("onBeforePrint",e)})):n.startPrint(e)}else n.startPrint(e)},n.handleClick=function(){var e=n.props,t=e.onBeforeGetContent,r=e.onPrintError;if(t){var i=t();i&&"function"==typeof i.then?i.then(n.handlePrint).catch((function(e){r&&r("onBeforeGetContent",e)})):n.handlePrint()}else n.handlePrint()},n.handlePrint=function(){var e=n.props,r=e.bodyClass,o=e.content,a=e.copyStyles,s=e.fonts,l=e.pageStyle,c=e.nonce,u=o();if(void 0!==u)if(null!==u){var d=document.createElement("iframe");d.width="".concat(document.documentElement.clientWidth,"px"),d.height="".concat(document.documentElement.clientHeight,"px"),d.style.position="absolute",d.style.top="-".concat(document.documentElement.clientHeight+100,"px"),d.style.left="-".concat(document.documentElement.clientWidth+100,"px"),d.id="printWindow",d.srcdoc="<!DOCTYPE html>";var h=(0,i.findDOMNode)(u);if(h){var f=h.cloneNode(!0),p=f instanceof Text,m=document.querySelectorAll("link[rel='stylesheet']"),g=p?[]:f.querySelectorAll("img"),v=p?[]:f.querySelectorAll("video"),y=s?s.length:0;n.numResourcesToLoad=m.length+g.length+v.length+y,n.resourcesLoaded=[],n.resourcesErrored=[];var b=function(e,r){n.resourcesLoaded.includes(e)?n.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(r?(n.logMessages(t.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],t.__read(r),!1)),n.resourcesErrored.push(e)):n.resourcesLoaded.push(e),n.resourcesLoaded.length+n.resourcesErrored.length===n.numResourcesToLoad&&n.triggerPrint(d))};d.onload=function(){var e,i,o,u;d.onload=null;var m=d.contentDocument||(null===(i=d.contentWindow)||void 0===i?void 0:i.document);if(m){m.body.appendChild(f),s&&((null===(o=d.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(u=d.contentWindow)||void 0===u?void 0:u.FontFace)?s.forEach((function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});d.contentDocument.fonts.add(t),t.loaded.then((function(){b(t)})).catch((function(e){b(t,["Failed loading the font:",t,"Load error:",e])}))})):(s.forEach((function(e){return b(e)})),n.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var y="function"==typeof l?l():l;if("string"!=typeof y)n.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof y,'". Styles from `pageStyle` will not be applied.')]);else{var w=m.createElement("style");c&&(w.setAttribute("nonce",c),m.head.setAttribute("nonce",c)),w.appendChild(m.createTextNode(y)),m.head.appendChild(w)}if(r&&(e=m.body.classList).add.apply(e,t.__spreadArray([],t.__read(r.split(" ")),!1)),!p){for(var E=p?[]:h.querySelectorAll("canvas"),_=m.querySelectorAll("canvas"),x=0;x<E.length;++x){var T=E[x],S=_[x].getContext("2d");S&&S.drawImage(T,0,0)}var O=function(e){var t=g[e],n=t.getAttribute("src");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,n,r,i,o){return b(t,["Error loading <img>",t,"Error",o])},r.src=n}else b(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',t])};for(x=0;x<g.length;x++)O(x);var A=function(e){var t=v[e];t.preload="auto";var n=t.getAttribute("poster");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,r,i,o,a){return b(t,["Error loading video poster",n,"for video",t,"Error:",a])},r.src=n}else t.readyState>=2?b(t):(t.onloadeddata=function(){return b(t)},t.onerror=function(e,n,r,i,o){return b(t,["Error loading video",t,"Error",o])},t.onstalled=function(){return b(t,["Loading video stalled, skipping",t])})};for(x=0;x<v.length;x++)A(x);var M="input",C=h.querySelectorAll(M),N=m.querySelectorAll(M);for(x=0;x<C.length;x++)N[x].value=C[x].value;var k="input[type=checkbox],input[type=radio]",R=h.querySelectorAll(k),D=m.querySelectorAll(k);for(x=0;x<R.length;x++)D[x].checked=R[x].checked;var I="select",L=h.querySelectorAll(I),$=m.querySelectorAll(I);for(x=0;x<L.length;x++)$[x].value=L[x].value}if(a)for(var P=document.querySelectorAll("style, link[rel='stylesheet']"),B=function(e,t){var r=P[e];if("style"===r.tagName.toLowerCase()){var i=m.createElement(r.tagName),o=r.sheet;if(o){var a="";try{for(var s=o.cssRules.length,l=0;l<s;++l)"string"==typeof o.cssRules[l].cssText&&(a+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(e){n.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",r],"warning")}i.setAttribute("id","react-to-print-".concat(e)),c&&i.setAttribute("nonce",c),i.appendChild(m.createTextNode(a)),m.head.appendChild(i)}}else if(r.getAttribute("href"))if(r.hasAttribute("disabled"))n.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",r],"warning"),b(r);else{for(var u=m.createElement(r.tagName),d=(l=0,r.attributes.length);l<d;++l){var h=r.attributes[l];h&&u.setAttribute(h.nodeName,h.nodeValue||"")}u.onload=function(){return b(u)},u.onerror=function(e,t,n,r,i){return b(u,["Failed to load",u,"Error:",i])},c&&u.setAttribute("nonce",c),m.head.appendChild(u)}else n.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",r],"warning"),b(r)},z=(x=0,P.length);x<z;++x)B(x)}0!==n.numResourcesToLoad&&a||n.triggerPrint(d)},n.handleRemoveIframe(!0),document.body.appendChild(d)}else n.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else n.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else n.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},n.handleRemoveIframe=function(e){var t=n.props.removeAfterPrint;if(e||t){var r=document.getElementById("printWindow");r&&document.body.removeChild(r)}},n.logMessages=function(e,t){void 0===t&&(t="error"),n.props.suppressErrors||("error"===t?console.error(e):"warning"===t?console.warn(e):"debug"===t&&console.debug(e))},n}return t.__extends(n,e),n.prototype.render=function(){var e=this.props,t=e.children,n=e.trigger;if(n)return r.cloneElement(n(),{onClick:this.handleClick});if(!l)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var i={handlePrint:this.handleClick};return r.createElement(l.Provider,{value:i},t)},n.defaultProps=c,n}(r.Component);e.default=u,e.useReactToPrint=function(e){if(!s)return e.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var n=r.useMemo((function(){return new u(t.__assign(t.__assign({},c),e))}),[e]);return r.useCallback((function(){return n.handleClick()}),[n])}}(),o}())},3335:(e,t,n)=>{"use strict";var r=n(1343);Symbol.for("react.element"),Symbol.for("react.fragment"),Object.prototype.hasOwnProperty,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},1085:(e,t,n)=>{"use strict";n(3335)},6468: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},1890:(e,t,n)=>{"use strict";n.d(t,{bl:()=>Pw});var r=n(1343),i=Object.defineProperty,o=(e,t,n)=>((e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),a=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(a||{}),s=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(s||{}),l=(e=>(e.UPDATE="model-update",e))(l||{}),c=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(c||{}),u=(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))(u||{}),d=(e=>(e.CHANGE="zoom-domain-change",e))(d||{}),h=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(h||{}),f=(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))(f||{}),p=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(p||{}),m=(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))(m||{}),g=(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))(g||{}),v=(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))(v||{}),y=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(y||{}),b=(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))(b||{}),w=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(w||{}),E=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(E||{}),_=(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))(_||{}),x=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(x||{}),T=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(T||{}),S=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(S||{}),O=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(O||{}),A=(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))(A||{}),M=(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))(M||{}),C=(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))(C||{}),N=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(N||{}),k=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(k||{}),R=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(R||{});const D=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:C,Area:p,Axis:f,Bar:y,Boxplot:b,CanvasZoom:h,Chart:a,Choropleth:R,CirclePack:M,Gauge:v,Heatmap:k,Legend:A,Line:E,Meter:N,Modal:s,Model:l,Pie:g,Radar:_,Scatter:w,Threshold:O,Toolbar:c,Tooltip:S,Tree:x,Treemap:T,WordCloud:m,ZoomBar:u,ZoomDomain:d},Symbol.toStringTag,{value:"Module"}));var I=(e=>(e.HTML="html",e.SVG="svg",e))(I||{}),L=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(L||{}),$=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))($||{}),P=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(P||{}),B=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(B||{}),z=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(z||{}),H=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(H||{}),F=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(F||{}),U=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(U||{}),j=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(j||{}),V=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(V||{}),G=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(G||{}),W=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(W||{}),q=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(q||{}),Y=(e=>(e.CENTER="center",e))(Y||{}),Z=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Z||{}),X=(e=>(e.SEMI="semi",e.FULL="full",e))(X||{}),K=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(K||{}),Q=(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))(Q||{}),J=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(J||{}),ee=(e=>(e.LEFT="left",e.RIGHT="right",e))(ee||{}),te=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(te||{}),ne=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(ne||{}),re=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(re||{}),ie=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(ie||{}),oe=(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))(oe||{});function ae(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function se(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function le(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const ce=6048e5,ue=864e5,de=6e4,he=36e5,fe=Symbol.for("constructDateFrom");function pe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&fe in e?e[fe](t):e instanceof Date?new e.constructor(t):new Date(t)}function me(e,...t){const n=pe.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}let ge={};function ve(){return ge}function ye(e,t){return pe(t||e,e)}function be(e,t){var n,r,i,o;const a=ve(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=ye(e,null==t?void 0:t.in),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const we={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"}},Ee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_e={ordinalNumber:(e,t)=>{const 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:se({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:se({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:se({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:se({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:se({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"})},xe={ordinalNumber:(Se={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Se.matchPattern);if(!n)return null;const r=n[0],i=e.match(Se.parsePattern);if(!i)return null;let o=Se.valueCallback?Se.valueCallback(i[0]):i[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:le({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:le({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:le({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:le({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:le({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"})},Te={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=we[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:{date:ae({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ae({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:ae({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,n,r)=>Ee[e],localize:_e,match:xe,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Se,Oe="object"==typeof global&&global&&global.Object===Object&&global,Ae="object"==typeof self&&self&&self.Object===Object&&self,Me=Oe||Ae||Function("return this")(),Ce=Me.Symbol,Ne=Object.prototype,ke=Ne.hasOwnProperty,Re=Ne.toString,De=Ce?Ce.toStringTag:void 0,Ie=Object.prototype.toString,Le="[object Null]",$e="[object Undefined]",Pe=Ce?Ce.toStringTag:void 0;function Be(e){return null==e?void 0===e?$e:Le:Pe&&Pe in Object(e)?function(e){var t=ke.call(e,De),n=e[De];try{e[De]=void 0;var r=!0}catch{}var i=Re.call(e);return r&&(t?e[De]=n:delete e[De]),i}(e):function(e){return Ie.call(e)}(e)}function ze(e){return null!=e&&"object"==typeof e}var He="[object Symbol]";function Fe(e){return"symbol"==typeof e||ze(e)&&Be(e)==He}function Ue(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}var je=Array.isArray,Ve=Ce?Ce.prototype:void 0,Ge=Ve?Ve.toString:void 0;function We(e){if("string"==typeof e)return e;if(je(e))return Ue(e,We)+"";if(Fe(e))return Ge?Ge.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ye(e){return e}var Ze="[object AsyncFunction]",Xe="[object Function]",Ke="[object GeneratorFunction]",Qe="[object Proxy]";function Je(e){if(!qe(e))return!1;var t=Be(e);return t==Xe||t==Ke||t==Ze||t==Qe}var et=Me["__core-js_shared__"],tt=function(){var e=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Function.prototype.toString;function rt(e){if(null!=e){try{return nt.call(e)}catch{}try{return e+""}catch{}}return""}var it=/^\[object .+?Constructor\]$/,ot=Function.prototype,at=Object.prototype,st=ot.toString,lt=at.hasOwnProperty,ct=RegExp("^"+st.call(lt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ut(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!qe(e)||function(e){return!!tt&&tt in e}(e))&&(Je(e)?ct:it).test(rt(e))}(n)?n:void 0}var dt=ut(Me,"WeakMap"),ht=Object.create,ft=function(){function e(){}return function(t){if(!qe(t))return{};if(ht)return ht(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function pt(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var mt=Date.now;function gt(e){return function(){return e}}var vt=function(){try{var e=ut(Object,"defineProperty");return e({},"",{}),e}catch{}}(),yt=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:gt(t),writable:!0})}:Ye,bt=function(e){var t=0,n=0;return function(){var r=mt(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(yt);function wt(e){return e!=e}function Et(e,t){return!(null==e||!e.length)&&function(e,t){return t==t?function(e,t){for(var n=-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t):function(e,t){for(var n=e.length,r=-1;++r<n;)if(t(e[r],r,e))return r;return-1}(e,wt)}(e,t)>-1}var _t=9007199254740991,xt=/^(?:0|[1-9]\d*)$/;function Tt(e,t){var n=typeof e;return!!(t=t??_t)&&("number"==n||"symbol"!=n&&xt.test(e))&&e>-1&&e%1==0&&e<t}function St(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ot(e,t){return e===t||e!=e&&t!=t}var At=Object.prototype.hasOwnProperty;function Mt(e,t,n){var r=e[t];(!At.call(e,t)||!Ot(r,n)||void 0===n&&!(t in e))&&St(e,t,n)}function Ct(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;void 0===l&&(l=e[s]),i?St(n,s,l):Mt(n,s,l)}return n}var Nt=Math.max;function kt(e,t,n){return t=Nt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Nt(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),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)}}function Rt(e,t){return bt(kt(e,t,Ye),e+"")}var Dt=9007199254740991;function It(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Dt}function Lt(e){return null!=e&&It(e.length)&&!Je(e)}var $t=Object.prototype;function Pt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$t)}function Bt(e){return ze(e)&&"[object Arguments]"==Be(e)}var zt=Object.prototype,Ht=zt.hasOwnProperty,Ft=zt.propertyIsEnumerable,Ut=Bt(function(){return arguments}())?Bt:function(e){return ze(e)&&Ht.call(e,"callee")&&!Ft.call(e,"callee")},jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Vt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,Gt=Vt&&Vt.exports===jt?Me.Buffer:void 0,Wt=(Gt?Gt.isBuffer:void 0)||function(){return!1},qt={};function Yt(e){return function(t){return e(t)}}qt["[object Float32Array]"]=qt["[object Float64Array]"]=qt["[object Int8Array]"]=qt["[object Int16Array]"]=qt["[object Int32Array]"]=qt["[object Uint8Array]"]=qt["[object Uint8ClampedArray]"]=qt["[object Uint16Array]"]=qt["[object Uint32Array]"]=!0,qt["[object Arguments]"]=qt["[object Array]"]=qt["[object ArrayBuffer]"]=qt["[object Boolean]"]=qt["[object DataView]"]=qt["[object Date]"]=qt["[object Error]"]=qt["[object Function]"]=qt["[object Map]"]=qt["[object Number]"]=qt["[object Object]"]=qt["[object RegExp]"]=qt["[object Set]"]=qt["[object String]"]=qt["[object WeakMap]"]=!1;var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Kt=Xt&&Xt.exports===Zt&&Oe.process,Qt=function(){try{return Xt&&Xt.require&&Xt.require("util").types||Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Qt&&Qt.isTypedArray,en=Jt?Yt(Jt):function(e){return ze(e)&&It(e.length)&&!!qt[Be(e)]},tn=Object.prototype.hasOwnProperty;function nn(e,t){var n=je(e),r=!n&&Ut(e),i=!n&&!r&&Wt(e),o=!n&&!r&&!i&&en(e),a=n||r||i||o,s=a?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||tn.call(e,c))&&(!a||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Tt(c,l)))&&s.push(c);return s}function rn(e,t){return function(n){return e(t(n))}}var on=rn(Object.keys,Object),an=Object.prototype.hasOwnProperty;function sn(e){if(!Pt(e))return on(e);var t=[];for(var n in Object(e))an.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ln(e){return Lt(e)?nn(e):sn(e)}var cn=Object.prototype.hasOwnProperty;function un(e){return Lt(e)?nn(e,!0):function(e){if(!qe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Pt(e),n=[];for(var r in e)"constructor"==r&&(t||!cn.call(e,r))||n.push(r);return n}(e)}var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hn=/^\w*$/;function fn(e,t){if(je(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fe(e))||hn.test(e)||!dn.test(e)||null!=t&&e in Object(t)}var pn=ut(Object,"create"),mn=Object.prototype.hasOwnProperty,gn=Object.prototype.hasOwnProperty;function vn(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 yn(e,t){for(var n=e.length;n--;)if(Ot(e[n][0],t))return n;return-1}vn.prototype.clear=function(){this.__data__=pn?pn(null):{},this.size=0},vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vn.prototype.get=function(e){var t=this.__data__;if(pn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return mn.call(t,e)?t[e]:void 0},vn.prototype.has=function(e){var t=this.__data__;return pn?void 0!==t[e]:gn.call(t,e)},vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pn&&void 0===t?"__lodash_hash_undefined__":t,this};var bn=Array.prototype.splice;function wn(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])}}wn.prototype.clear=function(){this.__data__=[],this.size=0},wn.prototype.delete=function(e){var t=this.__data__,n=yn(t,e);return!(n<0||(n==t.length-1?t.pop():bn.call(t,n,1),--this.size,0))},wn.prototype.get=function(e){var t=this.__data__,n=yn(t,e);return n<0?void 0:t[n][1]},wn.prototype.has=function(e){return yn(this.__data__,e)>-1},wn.prototype.set=function(e,t){var n=this.__data__,r=yn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var En=ut(Me,"Map");function _n(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 xn(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])}}xn.prototype.clear=function(){this.size=0,this.__data__={hash:new vn,map:new(En||wn),string:new vn}},xn.prototype.delete=function(e){var t=_n(this,e).delete(e);return this.size-=t?1:0,t},xn.prototype.get=function(e){return _n(this,e).get(e)},xn.prototype.has=function(e){return _n(this,e).has(e)},xn.prototype.set=function(e,t){var n=_n(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Tn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tn.Cache||xn),n}Tn.Cache=xn;var Sn,On,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mn=/\\(\\)?/g,Cn=(Sn=Tn((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(An,(function(e,n,r,i){t.push(r?i.replace(Mn,"$1"):n||e)})),t}),(function(e){return 500===On.size&&On.clear(),e})),On=Sn.cache,Sn);function Nn(e){return null==e?"":We(e)}function kn(e,t){return je(e)?e:fn(e,t)?[e]:Cn(Nn(e))}function Rn(e){if("string"==typeof e||Fe(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Dn(e,t){for(var n=0,r=(t=kn(t,e)).length;null!=e&&n<r;)e=e[Rn(t[n++])];return n&&n==r?e:void 0}function In(e,t,n){var r=null==e?void 0:Dn(e,t);return void 0===r?n:r}function Ln(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $n=Ce?Ce.isConcatSpreadable:void 0;function Pn(e){return je(e)||Ut(e)||!!($n&&e&&e[$n])}function Bn(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Pn),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Bn(s,t-1,n,r,i):Ln(i,s):r||(i[i.length]=s)}return i}var zn=rn(Object.getPrototypeOf,Object),Hn="[object Object]",Fn=Function.prototype,Un=Object.prototype,jn=Fn.toString,Vn=Un.hasOwnProperty,Gn=jn.call(Object);function Wn(e){if(!ze(e)||Be(e)!=Hn)return!1;var t=zn(e);if(null===t)return!0;var n=Vn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&jn.call(n)==Gn}function qn(e){var t=this.__data__=new wn(e);this.size=t.size}qn.prototype.clear=function(){this.__data__=new wn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof wn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xn(r)}return n.set(e,t),this.size=n.size,this};var Yn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zn=Yn&&"object"==typeof module&&module&&!module.nodeType&&module,Xn=Zn&&Zn.exports===Yn?Me.Buffer:void 0,Kn=Xn?Xn.allocUnsafe:void 0;function Qn(e,t){if(t)return e.slice();var n=e.length,r=Kn?Kn(n):new e.constructor(n);return e.copy(r),r}function Jn(){return[]}var er=Object.prototype.propertyIsEnumerable,tr=Object.getOwnPropertySymbols,nr=tr?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a)&&(o[i++]=a)}return o}(tr(e),(function(t){return er.call(e,t)})))}:Jn,rr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ln(t,nr(e)),e=zn(e);return t}:Jn;function ir(e,t,n){var r=t(e);return je(e)?r:Ln(r,n(e))}function or(e){return ir(e,ln,nr)}function ar(e){return ir(e,un,rr)}var sr=ut(Me,"DataView"),lr=ut(Me,"Promise"),cr=ut(Me,"Set"),ur="[object Map]",dr="[object Promise]",hr="[object Set]",fr="[object WeakMap]",pr="[object DataView]",mr=rt(sr),gr=rt(En),vr=rt(lr),yr=rt(cr),br=rt(dt),wr=Be;(sr&&wr(new sr(new ArrayBuffer(1)))!=pr||En&&wr(new En)!=ur||lr&&wr(lr.resolve())!=dr||cr&&wr(new cr)!=hr||dt&&wr(new dt)!=fr)&&(wr=function(e){var t=Be(e),n="[object Object]"==t?e.constructor:void 0,r=n?rt(n):"";if(r)switch(r){case mr:return pr;case gr:return ur;case vr:return dr;case yr:return hr;case br:return fr}return t});var Er=Object.prototype.hasOwnProperty,_r=Me.Uint8Array;function xr(e){var t=new e.constructor(e.byteLength);return new _r(t).set(new _r(e)),t}var Tr=/\w*$/,Sr=Ce?Ce.prototype:void 0,Or=Sr?Sr.valueOf:void 0;function Ar(e,t){var n=t?xr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Mr="[object Boolean]",Cr="[object Date]",Nr="[object Map]",kr="[object Number]",Rr="[object RegExp]",Dr="[object Set]",Ir="[object String]",Lr="[object Symbol]",$r="[object ArrayBuffer]",Pr="[object DataView]",Br="[object Float32Array]",zr="[object Float64Array]",Hr="[object Int8Array]",Fr="[object Int16Array]",Ur="[object Int32Array]",jr="[object Uint8Array]",Vr="[object Uint8ClampedArray]",Gr="[object Uint16Array]",Wr="[object Uint32Array]";function qr(e){return"function"!=typeof e.constructor||Pt(e)?{}:ft(zn(e))}var Yr=Qt&&Qt.isMap,Zr=Yr?Yt(Yr):function(e){return ze(e)&&"[object Map]"==wr(e)},Xr=Qt&&Qt.isSet,Kr=Xr?Yt(Xr):function(e){return ze(e)&&"[object Set]"==wr(e)},Qr=1,Jr=2,ei=4,ti="[object Arguments]",ni="[object Function]",ri="[object GeneratorFunction]",ii="[object Object]",oi={};function ai(e,t,n,r,i,o){var a,s=t&Qr,l=t&Jr,c=t&ei;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!qe(e))return e;var u=je(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Er.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return pt(e,a)}else{var d=wr(e),h=d==ni||d==ri;if(Wt(e))return Qn(e,s);if(d==ii||d==ti||h&&!i){if(a=l||h?{}:qr(e),!s)return l?function(e,t){return Ct(e,rr(e),t)}(e,function(e,t){return e&&Ct(t,un(t),e)}(a,e)):function(e,t){return Ct(e,nr(e),t)}(e,function(e,t){return e&&Ct(t,ln(t),e)}(a,e))}else{if(!oi[d])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case $r:return xr(e);case Mr:case Cr:return new r(+e);case Pr:return function(e,t){var n=t?xr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Br:case zr:case Hr:case Fr:case Ur:case jr:case Vr:case Gr:case Wr:return Ar(e,n);case Nr:return new r;case kr:case Ir:return new r(e);case Rr:return function(e){var t=new e.constructor(e.source,Tr.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Dr:return new r;case Lr:return function(e){return Or?Object(Or.call(e)):{}}(e)}}(e,d,s)}}o||(o=new qn);var f=o.get(e);if(f)return f;o.set(e,a),Kr(e)?e.forEach((function(r){a.add(ai(r,t,n,r,e,o))})):Zr(e)&&e.forEach((function(r,i){a.set(i,ai(r,t,n,i,e,o))}));var p=u?void 0:(c?l?ar:or:l?un:ln)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(p||e,(function(r,i){p&&(r=e[i=r]),Mt(a,i,ai(r,t,n,i,e,o))})),a}oi[ti]=oi["[object Array]"]=oi["[object ArrayBuffer]"]=oi["[object DataView]"]=oi["[object Boolean]"]=oi["[object Date]"]=oi["[object Float32Array]"]=oi["[object Float64Array]"]=oi["[object Int8Array]"]=oi["[object Int16Array]"]=oi["[object Int32Array]"]=oi["[object Map]"]=oi["[object Number]"]=oi[ii]=oi["[object RegExp]"]=oi["[object Set]"]=oi["[object String]"]=oi["[object Symbol]"]=oi["[object Uint8Array]"]=oi["[object Uint8ClampedArray]"]=oi["[object Uint16Array]"]=oi["[object Uint32Array]"]=!0,oi["[object Error]"]=oi[ni]=oi["[object WeakMap]"]=!1;var si=1,li=4;function ci(e){return ai(e,si|li)}function ui(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xn;++t<n;)this.add(e[t])}function di(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 hi(e,t){return e.has(t)}ui.prototype.add=ui.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ui.prototype.has=function(e){return this.__data__.has(e)};var fi=1,pi=2;function mi(e,t,n,r,i,o){var a=n&fi,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&pi?new ui:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!di(t,(function(e,t){if(!hi(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function gi(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function vi(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var yi=1,bi=2,wi="[object Boolean]",Ei="[object Date]",_i="[object Error]",xi="[object Map]",Ti="[object Number]",Si="[object RegExp]",Oi="[object Set]",Ai="[object String]",Mi="[object Symbol]",Ci="[object ArrayBuffer]",Ni="[object DataView]",ki=Ce?Ce.prototype:void 0,Ri=ki?ki.valueOf:void 0,Di=1,Ii=Object.prototype.hasOwnProperty,Li=1,$i="[object Arguments]",Pi="[object Array]",Bi="[object Object]",zi=Object.prototype.hasOwnProperty;function Hi(e,t,n,r,i){return e===t||(null==e||null==t||!ze(e)&&!ze(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=je(e),s=je(t),l=a?Pi:wr(e),c=s?Pi:wr(t),u=(l=l==$i?Bi:l)==Bi,d=(c=c==$i?Bi:c)==Bi,h=l==c;if(h&&Wt(e)){if(!Wt(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new qn),a||en(e)?mi(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case Ni:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ci:return!(e.byteLength!=t.byteLength||!o(new _r(e),new _r(t)));case wi:case Ei:case Ti:return Ot(+e,+t);case _i:return e.name==t.name&&e.message==t.message;case Si:case Ai:return e==t+"";case xi:var s=gi;case Oi:var l=r&yi;if(s||(s=vi),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=bi,a.set(e,t);var u=mi(s(e),s(t),r,i,o,a);return a.delete(e),u;case Mi:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}(e,t,l,n,r,i,o);if(!(n&Li)){var f=u&&zi.call(e,"__wrapped__"),p=d&&zi.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new qn),i(m,g,n,r,o)}}return!!h&&(o||(o=new qn),function(e,t,n,r,i,o){var a=n&Di,s=or(e),l=s.length;if(l!=or(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Ii.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):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 o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}(e,t,n,r,Hi,i))}var Fi=1,Ui=2;function ji(e){return e==e&&!qe(e)}function Vi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function Gi(e,t){return null!=e&&t in Object(e)}var Wi=1,qi=2;function Yi(e){return"function"==typeof e?e:null==e?Ye:"object"==typeof e?je(e)?function(e,t){return fn(e)&&ji(t)?Vi(Rn(e),t):function(n){var r=In(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=kn(t,e)).length,o=!1;++r<i;){var a=Rn(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&It(i)&&Tt(a,i)&&(je(e)||Ut(e))}(e,t,Gi)}(n,e):Hi(t,r,Wi|qi)}}(e[0],e[1]):function(e){var t=function(e){for(var t=ln(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ji(i)]}return t}(e);return 1==t.length&&t[0][2]?Vi(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n){var r=n.length,i=r;if(null==e)return!i;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<i;){var a=(o=n[r])[0],s=e[a],l=o[1];if(o[2]){if(void 0===s&&!(a in e))return!1}else{var c=new qn;if(!Hi(l,s,Fi|Ui,void 0,c))return!1}}return!0}(n,0,t)}}(e):function(e){return fn(e)?function(e){return function(t){return null==t?void 0:t[e]}}(Rn(e)):function(e){return function(t){return Dn(t,e)}}(e)}(e)}var Zi=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};function Xi(e,t,n){(void 0!==n&&!Ot(e[t],n)||void 0===n&&!(t in e))&&St(e,t,n)}function Ki(e){return ze(e)&&Lt(e)}function Qi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Ji(e,t,n,r,i){e!==t&&Zi(t,(function(o,a){if(i||(i=new qn),qe(o))!function(e,t,n,r,i,o,a){var s=Qi(e,n),l=Qi(t,n),c=a.get(l);if(c)Xi(e,n,c);else{var u=o?o(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=je(l),f=!h&&Wt(l),p=!h&&!f&&en(l);u=l,h||f||p?je(s)?u=s:Ki(s)?u=pt(s):f?(d=!1,u=Qn(l,!0)):p?(d=!1,u=Ar(l,!0)):u=[]:Wn(l)||Ut(l)?(u=s,Ut(s)?u=function(e){return Ct(e,un(e))}(s):(!qe(s)||Je(s))&&(u=qr(l))):d=!1}d&&(a.set(l,u),i(u,l,r,o,a),a.delete(l)),Xi(e,n,u)}}(e,t,a,n,Ji,r,i);else{var s=r?r(Qi(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Xi(e,a,s)}}),un)}function eo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var to=Object.prototype.hasOwnProperty;var no=function(e){return Rt((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&function(e,t,n){if(!qe(n))return!1;var r=typeof t;return!!("number"==r?Lt(n)&&Tt(t,n.length):"string"==r&&t in n)&&Ot(n[t],e)}(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r)}return t}))}((function(e,t,n){Ji(e,t,n)})),ro=cr&&1/vi(new cr([,-0]))[1]==1/0?function(e){return new cr(e)}:function(){},io=200;function oo(e,t,n){var r=-1,i=Et,o=e.length,a=!0,s=[],l=s;if(o>=io){var c=t?null:ro(e);if(c)return vi(c);a=!1,i=hi,l=new ui}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=0!==u?u:0,a&&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}var ao=Rt((function(e){var t=eo(e);return Ki(t)&&(t=void 0),oo(Bn(e,1,Ki,!0),Yi(t))}));function so(e){return e&&e.length?oo(e):[]}function lo(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function co(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function uo(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=lo,n=(t,n)=>lo(e(t),n),r=(t,n)=>e(t)-n):(t=e===lo||e===co?e:ho,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function ho(){return 0}const fo=uo(lo).right;function po(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 o of e)null!=(o=t(o,++i,e))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}uo((function(e){return null===e?NaN:+e})).center;let mo=class extends Map{constructor(e,t=vo){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(go(this,e))}has(e){return super.has(go(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 go({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vo(e){return null!==e&&"object"==typeof e?e.valueOf():e}const yo=Math.sqrt(50),bo=Math.sqrt(10),wo=Math.sqrt(2);function Eo(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=yo?10:o>=bo?5:o>=wo?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,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)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Eo(e,t,2*n):[s,l,c]}function _o(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?Eo(t,e,n):Eo(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function xo(e,t,n){return Eo(e=+e,t=+t,n=+n)[2]}function To(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?xo(t,e,n):xo(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function So(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}var Oo={value:()=>{}};function Ao(){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 Mo(r)}function Mo(e){this._=e}function Co(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function No(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Oo,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Mo.prototype=Ao.prototype={constructor:Mo,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),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=No(r[n],e.name,t);else if(null==t)for(n in r)r[n]=No(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Co(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Mo(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(t,n)}};var ko="http://www.w3.org/1999/xhtml";const Ro={svg:"http://www.w3.org/2000/svg",xhtml:ko,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Do(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ro.hasOwnProperty(t)?{space:Ro[t],local:e}:e}function Io(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ko&&t.documentElement.namespaceURI===ko?t.createElement(e):t.createElementNS(n,e)}}function Lo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $o(e){var t=Do(e);return(t.local?Lo:Io)(t)}function Po(){}function Bo(e){return null==e?Po:function(){return this.querySelector(e)}}function zo(){return[]}function Ho(e){return null==e?zo:function(){return this.querySelectorAll(e)}}function Fo(e){return function(){return this.matches(e)}}function Uo(e){return function(t){return t.matches(e)}}var jo=Array.prototype.find;function Vo(){return this.firstElementChild}var Go=Array.prototype.filter;function Wo(){return Array.from(this.children)}function qo(e){return new Array(e.length)}function Yo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Zo(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Yo(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Xo(e,t,n,r,i,o,a){var s,l,c,u=new Map,d=t.length,h=o.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new Yo(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function Ko(e){return e.__data__}function Qo(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Jo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ea(e){return function(){this.removeAttribute(e)}}function ta(e){return function(){this.removeAttributeNS(e.space,e.local)}}function na(e,t){return function(){this.setAttribute(e,t)}}function ra(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ia(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function oa(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 aa(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function sa(e){return function(){this.style.removeProperty(e)}}function la(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ca(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ua(e,t){return e.style.getPropertyValue(t)||aa(e).getComputedStyle(e,null).getPropertyValue(t)}function da(e){return function(){delete this[e]}}function ha(e,t){return function(){this[e]=t}}function fa(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function pa(e){return e.trim().split(/^|\s+/)}function ma(e){return e.classList||new ga(e)}function ga(e){this._node=e,this._names=pa(e.getAttribute("class")||"")}function va(e,t){for(var n=ma(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ya(e,t){for(var n=ma(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ba(e){return function(){va(this,e)}}function wa(e){return function(){ya(this,e)}}function Ea(e,t){return function(){(t.apply(this,arguments)?va:ya)(this,e)}}function _a(){this.textContent=""}function xa(e){return function(){this.textContent=e}}function Ta(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Sa(){this.innerHTML=""}function Oa(e){return function(){this.innerHTML=e}}function Aa(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ma(){this.nextSibling&&this.parentNode.appendChild(this)}function Ca(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Na(){return null}function ka(){var e=this.parentNode;e&&e.removeChild(this)}function Ra(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Da(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ia(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++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 La(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function $a(e,t,n){var r=aa(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 Pa(e,t){return function(){return $a(this,e,t)}}function Ba(e,t){return function(){return $a(this,e,t.apply(this,arguments))}}Yo.prototype={constructor:Yo,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)}},ga.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 za=[null];function Ha(e,t){this._groups=e,this._parents=t}function Fa(){return new Ha([[document.documentElement]],za)}function Ua(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]}function ja(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Va(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ga(){}Ha.prototype=Fa.prototype={constructor:Ha,select:function(e){"function"!=typeof e&&(e=Bo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Ha(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}(e):Ho(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new Ha(r,i)},selectChild:function(e){return this.select(null==e?Vo:function(e){return function(){return jo.call(this.children,e)}}("function"==typeof e?e:Uo(e)))},selectChildren:function(e){return this.selectAll(null==e?Wo:function(e){return function(){return Go.call(this.children,e)}}("function"==typeof e?e:Uo(e)))},filter:function(e){"function"!=typeof e&&(e=Fo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new Ha(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ko);var n=t?Xo:Zo,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],d=i[c],h=d.length,f=Qo(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,w=0;b<p;++b)if(v=m[b]){for(b>=w&&(w=b+1);!(y=g[w])&&++w<p;);v._next=y||null}}return(a=new Ha(a,r))._enter=s,a._exit=l,a},enter:function(){return new Ha(this._enter||this._groups.map(qo),this._parents)},exit:function(){return new Ha(this._exit||this._groups.map(qo),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=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?o.remove():n(o),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,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++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 Ha(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],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Jo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Ha(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,o=r.length;i<o;++i){var a=r[i];if(a)return a}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,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Do(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?ta:ea:"function"==typeof t?n.local?oa:ia:n.local?ra:na)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?sa:"function"==typeof t?ca:la)(e,t,n??"")):ua(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?da:"function"==typeof t?fa:ha)(e,t)):this.node()[e]},classed:function(e,t){var n=pa(e+"");if(arguments.length<2){for(var r=ma(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Ea:t?ba:wa)(n,t))},text:function(e){return arguments.length?this.each(null==e?_a:("function"==typeof e?Ta:xa)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Sa:("function"==typeof e?Aa:Oa)(e)):this.node().innerHTML},raise:function(){return this.each(Ma)},lower:function(){return this.each(Ca)},append:function(e){var t="function"==typeof e?e:$o(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:$o(e),r=null==t?Na:"function"==typeof t?t:Bo(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ka)},clone:function(e){return this.select(e?Da:Ra)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=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+""),a=o.length;if(!(arguments.length<2)){for(s=t?La:Ia,r=0;r<a;++r)this.each(s(o[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<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Ba:Pa)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Wa=.7,qa=1/Wa,Ya="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ka=/^#([0-9a-f]{3,8})$/,Qa=new RegExp(`^rgb\\(${Ya},${Ya},${Ya}\\)$`),Ja=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),es=new RegExp(`^rgba\\(${Ya},${Ya},${Ya},${Za}\\)$`),ts=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${Za}\\)$`),ns=new RegExp(`^hsl\\(${Za},${Xa},${Xa}\\)$`),rs=new RegExp(`^hsla\\(${Za},${Xa},${Xa},${Za}\\)$`),is={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 os(){return this.rgb().formatHex()}function as(){return this.rgb().formatRgb()}function ss(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ka.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ls(t):3===n?new ds(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?cs(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?cs(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=Qa.exec(e))?new ds(t[1],t[2],t[3],1):(t=Ja.exec(e))?new ds(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=es.exec(e))?cs(t[1],t[2],t[3],t[4]):(t=ts.exec(e))?cs(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ns.exec(e))?vs(t[1],t[2]/100,t[3]/100,1):(t=rs.exec(e))?vs(t[1],t[2]/100,t[3]/100,t[4]):is.hasOwnProperty(e)?ls(is[e]):"transparent"===e?new ds(NaN,NaN,NaN,0):null}function ls(e){return new ds(e>>16&255,e>>8&255,255&e,1)}function cs(e,t,n,r){return r<=0&&(e=t=n=NaN),new ds(e,t,n,r)}function us(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Ga||(e=ss(e)),e?new ds((e=e.rgb()).r,e.g,e.b,e.opacity):new ds}(e):new ds(e,t,n,r??1)}function ds(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function hs(){return`#${gs(this.r)}${gs(this.g)}${gs(this.b)}`}function fs(){const e=ps(this.opacity);return`${1===e?"rgb(":"rgba("}${ms(this.r)}, ${ms(this.g)}, ${ms(this.b)}${1===e?")":`, ${e})`}`}function ps(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gs(e){return((e=ms(e))<16?"0":"")+e.toString(16)}function vs(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bs(e,t,n,r)}function ys(e){if(e instanceof bs)return new bs(e.h,e.s,e.l,e.opacity);if(e instanceof Ga||(e=ss(e)),!e)return new bs;if(e instanceof bs)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new bs(a,s,l,e.opacity)}function bs(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ws(e){return(e=(e||0)%360)<0?e+360:e}function Es(e){return Math.max(0,Math.min(1,e||0))}function _s(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ja(Ga,ss,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:os,formatHex:os,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ys(this).formatHsl()},formatRgb:as,toString:as}),ja(ds,us,Va(Ga,{brighter(e){return e=null==e?qa:Math.pow(qa,e),new ds(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Wa:Math.pow(Wa,e),new ds(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ds(ms(this.r),ms(this.g),ms(this.b),ps(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:hs,formatHex:hs,formatHex8:function(){return`#${gs(this.r)}${gs(this.g)}${gs(this.b)}${gs(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:fs,toString:fs})),ja(bs,(function(e,t,n,r){return 1===arguments.length?ys(e):new bs(e,t,n,r??1)}),Va(Ga,{brighter(e){return e=null==e?qa:Math.pow(qa,e),new bs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Wa:Math.pow(Wa,e),new bs(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 ds(_s(e>=240?e-240:e+120,i,r),_s(e,i,r),_s(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new bs(ws(this.h),Es(this.s),Es(this.l),ps(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=ps(this.opacity);return`${1===e?"hsl(":"hsla("}${ws(this.h)}, ${100*Es(this.s)}%, ${100*Es(this.l)}%${1===e?")":`, ${e})`}`}}));const xs=e=>()=>e;function Ts(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xs(isNaN(e)?t:e)}const Ss=function e(t){var n=function(e){return 1==(e=+e)?Ts: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):xs(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=us(e)).r,(t=us(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ts(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Os(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function As(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Is(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Ms(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Cs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ns(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]=Is(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var ks=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rs=new RegExp(ks.source,"g");function Ds(e,t){var n,r,i,o=ks.lastIndex=Rs.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ks.exec(e))&&(r=Rs.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cs(n,r)})),o=Rs.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=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 Is(e,t){var n,r=typeof t;return null==t||"boolean"===r?xs(t):("number"===r?Cs:"string"===r?(n=ss(t))?(t=n,Ss):Ds:t instanceof ss?Ss:t instanceof Date?Ms:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Os:Array.isArray(t)?As:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ns:Cs)(e,t)}function Ls(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var $s,Ps=180/Math.PI,Bs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zs(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(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,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ps,skewX:Math.atan(l)*Ps,scaleX:a,scaleY:s}}function Hs(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Cs(e,i)},{i:l-2,x:Cs(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Cs(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Cs(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Cs(e,n)},{i:s-2,x:Cs(t,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=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 Fs,Us,js=Hs((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bs:zs(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Vs=Hs((function(e){return null!=e&&($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",e),e=$s.transform.baseVal.consolidate())?zs((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Bs}),", ",")",")"),Gs=0,Ws=0,qs=0,Ys=1e3,Zs=0,Xs=0,Ks=0,Qs="object"==typeof performance&&performance.now?performance:Date,Js="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function el(){return Xs||(Js(tl),Xs=Qs.now()+Ks)}function tl(){Xs=0}function nl(){this._call=this._time=this._next=null}function rl(e,t,n){var r=new nl;return r.restart(e,t,n),r}function il(){Xs=(Zs=Qs.now())+Ks,Gs=Ws=0;try{!function(){el(),++Gs;for(var e,t=Fs;t;)(e=Xs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Gs}()}finally{Gs=0,function(){for(var e,t,n=Fs,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:Fs=t);Us=e,al(r)}(),Xs=0}}function ol(){var e=Qs.now(),t=e-Zs;t>Ys&&(Ks-=t,Zs=e)}function al(e){Gs||(Ws&&(Ws=clearTimeout(Ws)),e-Xs>24?(e<1/0&&(Ws=setTimeout(il,e-Qs.now()-Ks)),qs&&(qs=clearInterval(qs))):(qs||(Zs=Qs.now(),qs=setInterval(ol,Ys)),Gs=1,Js(il)))}function sl(e,t,n){var r=new nl;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}nl.prototype=rl.prototype={constructor:nl,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?el():+n)+(null==t?0:+t),!this._next&&Us!==this&&(Us?Us._next=this:Fs=this,Us=this),this._call=e,this._time=n,al()},stop:function(){this._call&&(this._call=null,this._time=1/0,al())}};var ll=Ao("start","end","cancel","interrupt"),cl=[],ul=0,dl=2,hl=3,fl=5,pl=6;function ml(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,d,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===hl)return sl(o);4===h.state?(h.state=pl,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=pl,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(sl((function(){n.state===hl&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=dl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===dl){for(n.state=hl,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 a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=fl,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);n.state===fl&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=pl,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=rl((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:ll,tween:cl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ul})}function gl(e,t){var n=yl(e,t);if(n.state>ul)throw new Error("too late; already scheduled");return n}function vl(e,t){var n=yl(e,t);if(n.state>hl)throw new Error("too late; already running");return n}function yl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function bl(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>dl&&n.state<fl,n.state=pl,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}}function wl(e,t){var n,r;return function(){var i=vl(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function El(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=vl(this,e),a=o.tween;if(a!==r){i=(r=a).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)}o.tween=i}}function _l(e,t,n){var r=e._id;return e.each((function(){var e=vl(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return yl(e,r).value[t]}}function xl(e,t){var n;return("number"==typeof t?Cs:t instanceof ss?Ss:(n=ss(t))?(t=n,Ss):Ds)(e,t)}function Tl(e){return function(){this.removeAttribute(e)}}function Sl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ol(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Al(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Ml(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttribute(e):(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Cl(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Nl(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 kl(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 Rl(e,t){return function(){gl(this,e).delay=+t.apply(this,arguments)}}function Dl(e,t){return t=+t,function(){gl(this,e).delay=t}}function Il(e,t){return function(){vl(this,e).duration=+t.apply(this,arguments)}}function Ll(e,t){return t=+t,function(){vl(this,e).duration=t}}var $l=Fa.prototype.constructor;function Pl(e){return function(){this.style.removeProperty(e)}}var Bl=0;function zl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Hl(){return++Bl}var Fl=Fa.prototype;function Ul(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}zl.prototype={constructor:zl,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Bo(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,d=o[a]=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,ml(d[h],t,n,h,d,yl(s,n)));return new zl(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Ho(e));for(var r=this._groups,i=r.length,o=[],a=[],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=yl(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&ml(h,t,n,m,f,p);o.push(f),a.push(l)}return new zl(o,a,t,n)},selectChild:Fl.selectChild,selectChildren:Fl.selectChildren,filter:function(e){"function"!=typeof e&&(e=Fo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new zl(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,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],d=c.length,h=a[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)a[s]=t[s];return new zl(a,this._parents,this._name,this._id)},selection:function(){return new $l(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Hl(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=yl(a,t);ml(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new zl(r,this._parents,e,n)},call:Fl.call,nodes:Fl.nodes,node:Fl.node,size:Fl.size,empty:Fl.empty,each:Fl.each,on:function(e,t){var n=this._id;return arguments.length<2?yl(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,o=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)?gl:vl;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=Do(e),r="transform"===n?Vs:xl;return this.attrTween(e,"function"==typeof t?(n.local?Cl:Ml)(n,r,_l(this,"attr."+e,t)):null==t?(n.local?Sl:Tl)(n):(n.local?Al:Ol)(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=Do(e);return this.tween(n,(r.local?Nl:kl)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?js:xl;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=ua(this,e),a=(this.style.removeProperty(e),ua(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,Pl(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=ua(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=ua(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,_l(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=vl(this,e),c=l.on,u=null==l.value[a]?o||(o=Pl(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,o=n+"";return function(){var a=ua(this,e);return a===o?null:a===r?i:i=t(r=a,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 o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(_l(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=yl(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?wl:El)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Rl:Dl)(t,e)):yl(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Il:Ll)(t,e)):yl(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(){vl(this,e).ease=t}}(t,e)):yl(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;vl(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=vl(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&&o()}))},[Symbol.iterator]:Fl[Symbol.iterator]};var jl={time:null,delay:0,duration:250,ease:Ul};function Vl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Gl(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 Wl(e){return(e=Gl(Math.abs(e)))?e[1]:NaN}Fa.prototype.interrupt=function(e){return this.each((function(){bl(this,e)}))},Fa.prototype.transition=function(e){var t,n;e instanceof zl?(t=e._id,e=e._name):(t=Hl(),(n=jl).time=el(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&ml(a,e,t,c,s,n||Vl(a,t));return new zl(r,this._parents,e,t)};var ql,Yl=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zl(e){if(!(t=Yl.exec(e)))throw new Error("invalid format: "+e);var t;return new Xl({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 Xl(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 Kl(e,t){var n=Gl(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")}Zl.prototype=Xl.prototype,Xl.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 Ql={"%":(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)=>Kl(100*e,t),r:Kl,s:function(e,t){var n=Gl(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(ql=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gl(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Jl(e){return e}var ec,tc,nc,rc=Array.prototype.map,ic=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function oc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}ec=function(e){var t=void 0===e.grouping||void 0===e.thousands?Jl:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(rc.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+"",o=void 0===e.numerals?Jl:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(rc.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Zl(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"):Ql[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():"",w="$"===h?r:/[%p]/.test(y)?a:"",E=Ql[y],_=/[defgprs%]/.test(y);function x(e){var n,r,a,h=b,x=w;if("c"===y)x=E(e)+x,e="";else{var T=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(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)),T&&0==+e&&"+"!==d&&(T=!1),h=(T?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?ic[8+ql/3]:"")+x+(T&&"("===d?")":""),_)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){x=(46===a?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var S=h.length+e.length+x.length,O=S<p?new Array(p-S+1).join(c):"";switch(m&&f&&(e=t(O+e,O.length?p-x.length:1/0),O=""),u){case"<":e=h+e+x+O;break;case"=":e=h+O+e+x;break;case"^":e=O.slice(0,S=O.length>>1)+h+e+x+O.slice(S);break;default:e=O+h+e+x}return o(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=Zl(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Wl(t)/3))),i=Math.pow(10,-r),o=ic[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),tc=ec.format,nc=ec.formatPrefix;const ac=Symbol("implicit");function sc(){var e=new mo,t=[],n=[],r=ac;function i(i){let o=e.get(i);if(void 0===o){if(r!==ac)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new mo;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 sc(t,n).unknown(r)},oc.apply(i,arguments),i}function lc(e){return+e}var cc=[0,1];function uc(e){return e}function dc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hc(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=dc(i,r),o=n(a,o)):(r=dc(r,i),o=n(o,a)),function(e){return o(r(e))}}function fc(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=dc(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=fo(e,t,1,r)-1;return o[n](i[n](t))}}function pc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mc(){var e,t,n,r,i,o,a=cc,s=cc,l=Is,c=uc;function u(){var e=Math.min(a.length,s.length);return c!==uc&&(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))}}(a[0],a[e-1])),r=e>2?fc:hc,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Cs)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,lc),u()):a.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=Ls,u()},d.clamp=function(e){return arguments.length?(c=!!e||uc,u()):c!==uc},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 gc(){return mc()(uc,uc)}function vc(e){var t=e.domain;return e.ticks=function(e){var n=t();return _o(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=To(e,t,n);switch((r=Zl(r??",f")).type){case"s":var a=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(Wl(t)/3)))-Wl(Math.abs(e)))}(o,a))&&(r.precision=i),nc(r,a);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,Wl(t)-Wl(e))+1}(o,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,-Wl(Math.abs(e)))}(o))&&(r.precision=i-2*("%"===r.type))}return tc(r)}(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=xo(l,c,n))===r)return o[a]=l,o[s]=c,t(o);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 yc(){var e=gc();return e.copy=function(){return pc(e,yc())},oc.apply(e,arguments),vc(e)}function bc(e,t,n){this.k=e,this.x=t,this.y=n}bc.prototype={constructor:bc,scale:function(e){return 1===e?this:new bc(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new bc(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+")"}},bc.prototype;const wc="cds",Ec=7,_c=2.5,xc=3.5,Tc={reference:"value",compareTo:"marker"},Sc=4,Oc={duration:1e3,ease:Ul,zoomLevel:3},Ac={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},Mc={defaultBins:10},Cc={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}},Nc=.3,kc=1,Rc=24,Dc={defaultOffset:4,horizontalOffset:10},Ic={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Lc={height:{[B.GRAPH_VIEW]:32,[B.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},$c=[{type:te.RADIUS,name:"Radius"},{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}],Pc={type:z.END_LINE,threshold:16,numCharacter:14},Bc={code:typeof navigator<"u"&&(null==navigator?void 0:navigator.language)||"en-US",number:(e,t=(null==navigator?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},zc={enabled:!0,position:U.BOTTOM,clickable:!0,truncation:Pc,alignment:j.LEFT,order:null,additionalItems:[]},Hc={enabled:!0,showTotal:!0,truncation:Pc,groupLabel:"Group"},Fc={top:{visible:!0,includeZero:!0,truncation:Pc},bottom:{visible:!0,includeZero:!0,truncation:Pc},left:{visible:!0,includeZero:!0,truncation:Pc},right:{visible:!0,includeZero:!0,truncation:Pc}},Uc={addSpaceOnEdges:1,showDayName:!1,localeObject:Te,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"}}};let jc=!1;try{jc=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(Se){console.warn("Fullscreen capabilities check failed: ",Se.message)}const Vc={width:null,height:null,resizable:!0,theme:L.WHITE,tooltip:Hc,legend:zc,locale:Bc,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:J.SHOW_AS_DATATABLE},...jc?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},Gc=no({},Vc,{thematic:{projection:ie.geoNaturalEarth1}}),Wc=no({},Vc,{axes:Fc,timeScale:Uc,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:B.GRAPH_VIEW}}}),qc=no({},Wc,{bars:{maxWidth:16,spacingFactor:.25},timeScale:no(Uc,{addSpaceOnEdges:1})}),Yc=no({},qc,{}),Zc=no({},qc,{}),Xc=no({},qc,{bars:no({},qc.bars,{dividerSize:1.5})}),Kc=no({},qc,{}),Qc=no({},Wc,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Jc=Qc,eu=no({},Qc,{points:{radius:3,filled:!1,enabled:!0}}),tu=no({},eu,{timeScale:no(Uc,{addSpaceOnEdges:0})}),nu=tu,ru=no({},Wc,{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:te.RADIUS,name:"Radius"}]}}),iu=no({},Wc,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}]}}),ou=no({},qc,{bars:{dividerSize:1.5},timeScale:no(Uc,{addSpaceOnEdges:0})}),au=no({},Vc,{tooltip:no({},Hc,{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"}}),su=no({},Vc,{pie:{labels:{formatter:null,enabled:!0},alignment:j.LEFT,sortFunction:null,valueMapsTo:"value"}}),lu=no({},Vc,{legend:{enabled:!1},gauge:{type:X.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,alignment:j.LEFT}}),cu=no({},su,{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)},alignment:j.LEFT}}),uu=no({},Vc,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),du=no({},uu,{legend:{enabled:!0}}),hu=no({},Vc,{radar:{axes:{angle:"key",value:"value"},alignment:j.LEFT},tooltip:{gridline:{enabled:!0}}}),fu=no({},qc,{comboChartTypes:[]}),pu=no({tree:{type:G.TREE}},Vc,{}),mu=no({},Vc,{data:no(Vc.data,{groupMapsTo:"name"})}),gu=no({},Vc,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:no(Vc.data,{groupMapsTo:"name"})}),vu=no({},Vc,{alluvial:{data:no(Vc.data,{groupMapsTo:"source"}),nodeAlignment:j.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),yu=no({},Vc,{axes:Fc,heatmap:{divider:{state:ne.AUTO},colorLegend:{type:"linear"}}}),bu={alluvialChart:vu,areaChart:tu,axisChart:Wc,boxplotChart:Kc,bubbleChart:ru,bulletChart:iu,chart:Vc,circlePackChart:gu,choroplethChart:no({},Gc,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:fu,donutChart:cu,gaugeChart:lu,groupedBarChart:Zc,heatmapChart:yu,histogramChart:ou,lineChart:eu,lollipopChart:Jc,meterChart:uu,pieChart:su,proportionalMeterChart:du,radarChart:hu,scatterChart:Qc,simpleBarChart:Yc,stackedAreaChart:nu,stackedBarChart:Xc,thematicChart:Gc,treeChart:pu,treemapChart:mu,wordCloudChart:au};function wu(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 Eu(e,t,n){return n>e.length?e:t===z.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===z.FRONT_LINE?"..."+e.substr(-n):t===z.END_LINE?e.substr(0,n)+"...":void 0}function _u(e,t){const n=xu(e,"legend","additionalItems"),r=xu(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),o=n.map((e=>e.type)),a=$c.filter((e=>o.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=a,t.legend.additionalItems=ao(a,r,"name")}}const xu=(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},Tu=(e,t)=>t===H.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e;function Su(e,t,n){return n===H.VERTICAL?[e,t]:[t,e]}function Ou(e){const t=ye(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Au(e,t){const n=ye(e,void 0);return n.setHours(0,0,0,0),n}function Mu(e,t,n){const[r,i]=me(0,e,t),o=Au(r),a=Au(i),s=+o-Ou(o),l=+a-Ou(a);return Math.round((s-l)/ue)}function Cu(e,t){return be(e,{...t,weekStartsOn:1})}function Nu(e,t){const n=ye(e,void 0),r=n.getFullYear(),i=pe(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Cu(i),a=pe(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Cu(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ku(e,t){var n,r,i,o;const a=ye(e,null==t?void 0:t.in),s=a.getFullYear(),l=ve(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(i=l.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,u=pe((null==t?void 0:t.in)||e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=be(u,t),h=pe((null==t?void 0:t.in)||e,0);h.setFullYear(s,0,c),h.setHours(0,0,0,0);const f=be(h,t);return+a>=+d?s+1:+a>=+f?s:s-1}function Ru(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Du={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ru("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ru(n+1,2)},d:(e,t)=>Ru(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Ru(e.getHours()%12||12,t.length),H:(e,t)=>Ru(e.getHours(),t.length),m:(e,t)=>Ru(e.getMinutes(),t.length),s:(e,t)=>Ru(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ru(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Iu={G:function(e,t,n){const r=e.getFullYear()>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){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Du.y(e,t)},Y:function(e,t,n,r){const i=ku(e,r),o=i>0?i:1-i;return"YY"===t?Ru(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Ru(o,t.length)},R:function(e,t){return Ru(Nu(e),t.length)},u:function(e,t){return Ru(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ru(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){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ru(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){const r=e.getMonth();switch(t){case"M":case"MM":return Du.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ru(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){const i=function(e,t){const n=ye(e,null==t?void 0:t.in),r=+be(n,t)-+function(e,t){var n,r,i,o;const a=ve(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,l=ku(e,t),c=pe((null==t?void 0:t.in)||e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),be(c,t)}(n,t);return Math.round(r/ce)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ru(i,t.length)},I:function(e,t,n){const r=function(e){const t=ye(e,void 0),n=+Cu(t)-+function(e){const t=Nu(e),n=pe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Cu(n)}(t);return Math.round(n/ce)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ru(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Du.d(e,t)},D:function(e,t,n){const r=function(e){const t=ye(e,void 0);return Mu(t,function(e){const t=ye(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ru(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ru(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ru(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Ru(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){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Du.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Du.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ru(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ru(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Du.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Du.s(e,t)},S:function(e,t){return Du.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return $u(r);case"XXXX":case"XX":return Pu(r);default:return Pu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $u(r);case"xxxx":case"xx":return Pu(r);default:return Pu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lu(r,":");default:return"GMT"+Pu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lu(r,":");default:return"GMT"+Pu(r,":")}},t:function(e,t,n){return Ru(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ru(+e,t.length)}};function Lu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+Ru(o,2)}function $u(e,t){return e%60==0?(e>0?"-":"+")+Ru(Math.abs(e)/60,2):Pu(e,t)}function Pu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ru(Math.trunc(r/60),2)+t+Ru(r%60,2)}const Bu=(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"})}},zu=(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"})}},Hu={p:zu,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Bu(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Bu(r,t)).replace("{{time}}",zu(i,t))}},Fu=/^D+$/,Uu=/^Y+$/,ju=["D","DD","YY","YYYY"];const Vu=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wu=/^'([^]*?)'?$/,qu=/''/g,Yu=/[a-zA-Z]/;function Zu(e,t,n){var r,i,o,a,s,l,c,u;const d=ve(),h=(null==n?void 0:n.locale)??d.locale??Te,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(i=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(o=d.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=ye(e,null==n?void 0:n.in);if(!function(e){return!(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e||isNaN(+ye(e)))}(m))throw new RangeError("Invalid time value");let g=t.match(Gu).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,Hu[t])(e,h.formatLong):e})).join("").match(Vu).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Xu(e)};if(Iu[t])return{isToken:!0,value:e};if(t.match(Yu))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));h.localize.preprocessor&&(g=h.localize.preprocessor(m,g));const v={firstWeekContainsDate:f,weekStartsOn:p,locale:h};return g.map((r=>{if(!r.isToken)return r.value;const i=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(e){return Uu.test(e)}(i)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(e){return Fu.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),ju.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,Iu[i[0]])(m,i,h.localize,v)})).join("")}function Xu(e){const t=e.match(Wu);return t?t[1].replace(qu,"'"):e}const Ku=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Qu(e,t,n,r,i){const o=0===t,a=2===Number(Zu(new Date(e),"c")),s=1===Number(Zu(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(e){const{s:t,m:n,H:r}=ed(e);return 0===r&&0===n&&0===t}(e)||nd(e,l)||rd(e);case"daily":return i?o||a||rd(e):o||nd(e,l)||rd(e);case"weekly":return o||a||rd(e);case"monthly":return o||rd(e);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Ju(e,t,n,r,i,o){const a=i.showDayName,s="daily"===r&&a?"weekly":r,l=new Date(e),c=xu(i,"timeIntervalFormats")[s],u=xu(c,"primary"),d=xu(c,"secondary"),h=Qu(e,t,n,r,a);let f=h?u:d;"15seconds"===r&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:m,optionsObject:g}=o,v=g[r].type,y=g[r][h?"primary":"secondary"][f];if("quarterly"!==r&&y)return o[v](l,m,y);{const e=Zu(l,f,{locale:p}).split("").map((e=>{const t=Number(e);return" "===e||Number.isNaN(t)?e:t.toLocaleString(m)}));return o[v](l,m,{},e.join(""))}}function ed(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function td(e,t){if(oe[t])return t;if(1===e.length)return"15seconds";const n=function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e);return function(e){const t=Ku.reduce(((t,[,n],r)=>{const i=Ku[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return Ku[t][0]}(function(e){let t;for(const n of e)null!=n&&(t>n||void 0===t&&n>=n)&&(t=n);return t}(n))}function nd(e,t){return ed(e).M!==ed(t).M}function rd(e){const{M:t,d:n,s:r,m:i,H:o}=ed(e);return 1===t&&1===n&&0===o&&0===i&&0===r}function id(e){return void 0===e?"":e.toISOString()}var od=(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))(od||{}),ad=function(e,t){if(null==e)return e;if(!Lt(e))return function(e,t){return e&&Zi(e,t,ln)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e};function sd(e){return function(){return e}}function ld(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function cd(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function ud(e,t,n,r){return ad(e,(function(e,i,o){t(r,e,n(e),o)})),r}Array.prototype.slice;var dd=Object.prototype.hasOwnProperty,hd=function(e){return function(t,n){return(je(t)?cd:ud)(t,e,Yi(n),{})}}((function(e,t,n){dd.call(e,n)?e[n].push(t):St(e,n,[t])}));function fd(e){return e}var pd=Array.prototype.slice;function md(e){return()=>e}function gd(e){return Math.max(1,Math.ceil(Math.log(function(e){let t=0;for(let n of e)null!=n&&(n=+n)>=n&&++t;return t}(e))/Math.LN2)+1)}function vd(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function yd(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bd(e,t){return e[t]}function wd(e){const t=[];return t.key=e,t}function Ed(){var e=sd([]),t=yd,n=vd,r=bd;function i(i){var o,a,s=Array.from(e.apply(this,arguments),wd),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=ld(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:sd(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:sd(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?yd:"function"==typeof e?e:sd(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??vd,i):n},i}function _d(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}class xd{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}formatTable({headers:e,cells:t}){const n=this.getOptions(),{code:r,date:i,number:o}=xu(n,"locale"),a=xu(n,"tabularRepModal","tableHeadingFormatter"),s=xu(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services;let c;return(null==l?void 0:l.getDomainAxisScaleType())===F.TIME&&(c=e=>i(e,r,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof a?a(e):e,..."function"==typeof s?s(t):t.map((e=>{c&&(e[1]=c(e[1]));for(const t in e){const n=e[t];"number"==typeof n&&(e[t]=o(n,r))}return e}))]}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=xu(t,"data"),o=xu(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),o&&Object.keys(o).forEach((e=>{const t=o[e].mapsTo,r=o[e].scaleType;if((r===F.LINEAR||r===F.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&o[e].domain)if(r===F.LABELS)n=n.filter((n=>o[e].domain.includes(n[t])));else{const[r,i]=o[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}=Cc.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(ci(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return xu(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Cc.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 hd(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:o}=t.data,{bins:a=Mc.defaultBins}=i,s=Array.isArray(a),l=function(){var e=fd,t=po,n=gd;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=e(r[i],i,r);var c=t(l),u=c[0],d=c[1],h=n(l,u,d);if(!Array.isArray(h)){const e=d,n=+h;if(t===po&&([u,d]=function(e,t,n){let r;for(;;){const i=xo(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}}(u,d,n)),(h=_o(u,d,n))[0]<=u&&(a=xo(u,d,n)),h[h.length-1]>=d)if(e>=d&&t===po){const e=xo(u,d,n);isFinite(e)&&(e>0?d=(Math.floor(d/e)+1)*e:e<0&&(d=(Math.ceil(d*-e)+1)/-e))}else h.pop()}for(var f=h.length,p=0,m=f;h[p]<=u;)++p;for(;h[m-1]>d;)--m;(p||m<f)&&(h=h.slice(p,m),f=m-p);var g,v=new Array(f+1);for(i=0;i<=f;++i)(g=v[i]=[]).x0=i>0?h[i-1]:u,g.x1=i<f?h[i]:d;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[Math.min(f,Math.floor((o-u)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=l[i])&&u<=o&&o<=d){const e=Math.floor((u-o)*a);v[Math.min(f,e+(h[e]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[fo(h,o,0,f)].push(r[i]);return v}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:md(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:md([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:md(Array.isArray(e)?pd.call(e):e),r):n},r}().value((e=>e[r])).thresholds(a)(e);if(s)l[l.length-1].x1=a[a.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?[a[0],a[a.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[o])))),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 Ed().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const o=e[i];return o[t]=n[r],o}))))}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}`)):so(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?id(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const o=this.services.cartesianScales.domainAxisPosition,a=n.axes[o].scaleType;return a===F.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(a===F.LOG||a===F.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),o=this.getDataGroupNames(),a=this.getStackKeys({bins:e,groups:t});return e?a.map((t=>{const[n,i]=t.split(":"),a={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return o.forEach((e=>{a[e]=s.filter((t=>t[r]===e)).length})),a})):a.map((e=>{const t={sharedStackKey:e};return o.forEach((n=>{const o=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?id(t[i])===e:t[i].toString()===e)})),a=this.services.cartesianScales.getRangeIdentifier(t);t[n]=o?o[a]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,o=this.getActiveDataGroupNames(t),a=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}(a.map((e=>[e.sharedStackKey,0])));a.forEach((t=>{o.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),a.forEach((t=>{o.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Ed().offset(_d):Ed()).keys(o)(a).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=o[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:no(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(D.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Cc.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),o=r.filter((e=>e.status===t));if(i)if(1===o.length&&o[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,o)=>{r[o].status=i.name===e?t:n}));const a=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=a.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(D.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=xu(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=xu(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=xu(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://charts.carbondesignsystem.com/");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let o;const a=xu(e,"label");if(null===a){o=xu(r,i)||"Ungrouped"}else o=a;const s={group:o,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).split(/[,;'"`]/).map((e=>function(e){const t=e.trim();return["=","+","-","@","\t","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}(e))).join("")}"`)))).map((e=>e.join(","))).join("\n"),t=this.getOptions();let n="myChart";const r=xu(t,"fileDownload","fileName");"function"==typeof r?n=r("csv"):"string"==typeof r&&(n=r),this.services.files.downloadCSV(e,`${n}.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}=Cc.items.status,i=this.getOptions(),o=so(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>o.includes(e)))||(i.data.selectedGroups=[]));const a=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return o.map((e=>({name:e,status:a(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=xu(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=xu(this.getOptions(),"color","pairing");let t=xu(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=xu(e,"option");const r=t>5?14:t;n=n<=Ac[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=sc().range(i).domain(this.allDataGroups)}}class Td extends xd{constructor(e){super(e),this.axisFlavor=re.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:xu(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{primaryDomain:r,primaryRange:i,secondaryDomain:o,secondaryRange:a}=this.assignRangeAndDomains(),{number:s,code:l}=xu(this.getOptions(),"locale"),c=["Group",r.label,i.label,...o?[o.label]:[],...a?[a.label]:[]],u=e.map((e=>[e[n],null===e[r.identifier]?"–":e[r.identifier],null===e[i.identifier]||isNaN(e[i.identifier])?"–":s(e[i.identifier],l),...o?[null===e[o.identifier]?"–":e[o.identifier]]:[],...a?[null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier]]:[]]));return super.formatTable({headers:c,cells:u})}setData(e){let t;if(e&&(t=super.setData(e),xu(this.getOptions(),"zoomBar",P.TOP,"enabled"))){const e=xu(this.getOptions(),"zoomBar",P.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize(ci(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 o=t.map((t=>t[e].getTime()));o=so(o).sort(),n=o.map((n=>{let r=0;const o={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),o[e]=new Date(n),o[i]=r,o}))}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(P).forEach((e=>{const r=P[e],i=t.axes[r];if(i&&i.scaleType===F.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===xu(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}}var Sd=/\s/,Od=/^\s+/;var Ad=NaN,Md=/^[-+]0x[0-9a-f]+$/i,Cd=/^0b[01]+$/i,Nd=/^0o[0-7]+$/i,kd=parseInt;function Rd(e){if("number"==typeof e)return e;if(Fe(e))return Ad;if(qe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Sd.test(e.charAt(t)););return t}(e)+1).replace(Od,"")}(e);var n=Cd.test(e);return n||Nd.test(e)?kd(e.slice(2),n?2:8):Md.test(e)?Ad:+e}var Dd=function(){return Me.Date.now()},Id=Math.max,Ld=Math.min;function $d(e){return"string"==typeof e?new Ha([[document.querySelector(e)]],[document.documentElement]):new Ha([[e]],za)}function Pd(){var e,t,n=sc().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,h=d?a:o,f=d?o:a;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)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(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?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,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 Pd(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},oc.apply(d(),arguments)}function Bd(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}const zd=new Date,Hd=new Date;function Fd(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,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Fd((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)=>(zd.setTime(+t),Hd.setTime(+r),e(zd),e(Hd),Math.floor(n(zd,Hd))),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 Ud=Fd((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));Ud.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Fd((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):Ud:null),Ud.range;const jd=1e3,Vd=6e4,Gd=60*Vd,Wd=24*Gd,qd=7*Wd,Yd=30*Wd,Zd=365*Wd,Xd=Fd((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*jd)}),((e,t)=>(t-e)/jd),(e=>e.getUTCSeconds()));Xd.range;const Kd=Fd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jd)}),((e,t)=>{e.setTime(+e+t*Vd)}),((e,t)=>(t-e)/Vd),(e=>e.getMinutes()));Kd.range;const Qd=Fd((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Vd)}),((e,t)=>(t-e)/Vd),(e=>e.getUTCMinutes()));Qd.range;const Jd=Fd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jd-e.getMinutes()*Vd)}),((e,t)=>{e.setTime(+e+t*Gd)}),((e,t)=>(t-e)/Gd),(e=>e.getHours()));Jd.range;const eh=Fd((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Gd)}),((e,t)=>(t-e)/Gd),(e=>e.getUTCHours()));eh.range;const th=Fd((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vd)/Wd),(e=>e.getDate()-1));th.range;const nh=Fd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Wd),(e=>e.getUTCDate()-1));nh.range;const rh=Fd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Wd),(e=>Math.floor(e/Wd)));function ih(e){return Fd((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())*Vd)/qd))}rh.range;const oh=ih(0),ah=ih(1),sh=ih(2),lh=ih(3),ch=ih(4),uh=ih(5),dh=ih(6);function hh(e){return Fd((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)/qd))}oh.range,ah.range,sh.range,lh.range,ch.range,uh.range,dh.range;const fh=hh(0),ph=hh(1),mh=hh(2),gh=hh(3),vh=hh(4),yh=hh(5),bh=hh(6);fh.range,ph.range,mh.range,gh.range,vh.range,yh.range,bh.range;const wh=Fd((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()));wh.range;const Eh=Fd((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()));Eh.range;const _h=Fd((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()));_h.every=e=>isFinite(e=Math.floor(e))&&e>0?Fd((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,_h.range;const xh=Fd((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()));xh.every=e=>isFinite(e=Math.floor(e))&&e>0?Fd((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,xh.range;const[Th,Sh]=function(e,t,n,r,i,o){const a=[[Xd,1,jd],[Xd,5,5e3],[Xd,15,15e3],[Xd,30,3e4],[o,1,Vd],[o,5,5*Vd],[o,15,15*Vd],[o,30,30*Vd],[i,1,Gd],[i,3,3*Gd],[i,6,6*Gd],[i,12,12*Gd],[r,1,Wd],[r,2,2*Wd],[n,1,qd],[t,1,Yd],[t,3,3*Yd],[e,1,Zd]];function s(t,n,r){const i=Math.abs(n-t)/r,o=uo((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(To(t/Zd,n/Zd,r));if(0===o)return Ud.every(Math.max(To(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}(_h,wh,oh,th,Jd,Kd);function Oh(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 Ah(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 Mh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Ch,Nh,kh={"-":"",_:" ",0:"0"},Rh=/^\s*\d+/,Dh=/^%/,Ih=/[\\^$*+?|[\]().{}]/g;function Lh(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function $h(e){return e.replace(Ih,"\\$&")}function Ph(e){return new RegExp("^(?:"+e.map($h).join("|")+")","i")}function Bh(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function zh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Hh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Fh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Uh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function jh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Vh(e,t,n){var r=Rh.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Gh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wh(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 qh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Yh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Zh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xh(e,t,n){var r=Rh.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Kh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Jh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ef(e,t,n){var r=Rh.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tf(e,t,n){var r=Rh.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nf(e,t,n){var r=Dh.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rf(e,t,n){var r=Rh.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function of(e,t,n){var r=Rh.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function af(e,t){return Lh(e.getDate(),t,2)}function sf(e,t){return Lh(e.getHours(),t,2)}function lf(e,t){return Lh(e.getHours()%12||12,t,2)}function cf(e,t){return Lh(1+th.count(_h(e),e),t,3)}function uf(e,t){return Lh(e.getMilliseconds(),t,3)}function df(e,t){return uf(e,t)+"000"}function hf(e,t){return Lh(e.getMonth()+1,t,2)}function ff(e,t){return Lh(e.getMinutes(),t,2)}function pf(e,t){return Lh(e.getSeconds(),t,2)}function mf(e){var t=e.getDay();return 0===t?7:t}function gf(e,t){return Lh(oh.count(_h(e)-1,e),t,2)}function vf(e){var t=e.getDay();return t>=4||0===t?ch(e):ch.ceil(e)}function yf(e,t){return e=vf(e),Lh(ch.count(_h(e),e)+(4===_h(e).getDay()),t,2)}function bf(e){return e.getDay()}function wf(e,t){return Lh(ah.count(_h(e)-1,e),t,2)}function Ef(e,t){return Lh(e.getFullYear()%100,t,2)}function _f(e,t){return Lh((e=vf(e)).getFullYear()%100,t,2)}function xf(e,t){return Lh(e.getFullYear()%1e4,t,4)}function Tf(e,t){var n=e.getDay();return Lh((e=n>=4||0===n?ch(e):ch.ceil(e)).getFullYear()%1e4,t,4)}function Sf(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Lh(t/60|0,"0",2)+Lh(t%60,"0",2)}function Of(e,t){return Lh(e.getUTCDate(),t,2)}function Af(e,t){return Lh(e.getUTCHours(),t,2)}function Mf(e,t){return Lh(e.getUTCHours()%12||12,t,2)}function Cf(e,t){return Lh(1+nh.count(xh(e),e),t,3)}function Nf(e,t){return Lh(e.getUTCMilliseconds(),t,3)}function kf(e,t){return Nf(e,t)+"000"}function Rf(e,t){return Lh(e.getUTCMonth()+1,t,2)}function Df(e,t){return Lh(e.getUTCMinutes(),t,2)}function If(e,t){return Lh(e.getUTCSeconds(),t,2)}function Lf(e){var t=e.getUTCDay();return 0===t?7:t}function $f(e,t){return Lh(fh.count(xh(e)-1,e),t,2)}function Pf(e){var t=e.getUTCDay();return t>=4||0===t?vh(e):vh.ceil(e)}function Bf(e,t){return e=Pf(e),Lh(vh.count(xh(e),e)+(4===xh(e).getUTCDay()),t,2)}function zf(e){return e.getUTCDay()}function Hf(e,t){return Lh(ph.count(xh(e)-1,e),t,2)}function Ff(e,t){return Lh(e.getUTCFullYear()%100,t,2)}function Uf(e,t){return Lh((e=Pf(e)).getUTCFullYear()%100,t,2)}function jf(e,t){return Lh(e.getUTCFullYear()%1e4,t,4)}function Vf(e,t){var n=e.getUTCDay();return Lh((e=n>=4||0===n?vh(e):vh.ceil(e)).getUTCFullYear()%1e4,t,4)}function Gf(){return"+0000"}function Wf(){return"%"}function qf(e){return+e}function Yf(e){return Math.floor(+e/1e3)}function Zf(e){return new Date(e)}function Xf(e){return e instanceof Date?+e:+new Date(+e)}function Kf(e,t,n,r,i,o,a,s,l,c){var u=gc(),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"),w=c("%Y");function E(e){return(l(e)<e?f:s(e)<e?p:a(e)<e?m:o(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:w)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,Xf)):h().map(Zf)},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?E: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(Bd(n,e)):u},u.copy=function(){return pc(u,Kf(e,t,n,r,i,o,a,s,l,c))},u}function Qf(){return oc.apply(Kf(Th,Sh,_h,wh,oh,th,Jd,Kd,Xd,Nh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}Ch=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Ph(i),u=Bh(i),d=Ph(o),h=Bh(o),f=Ph(a),p=Bh(a),m=Ph(s),g=Bh(s),v=Ph(l),y=Bh(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:af,e:af,f:df,g:_f,G:Tf,H:sf,I:lf,j:cf,L:uf,m:hf,M:ff,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:qf,s:Yf,S:pf,u:mf,U:gf,V:yf,w:bf,W:wf,x:null,X:null,y:Ef,Y:xf,Z:Sf,"%":Wf},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Of,e:Of,f:kf,g:Uf,G:Vf,H:Af,I:Mf,j:Cf,L:Nf,m:Rf,M:Df,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:qf,s:Yf,S:If,u:Lf,U:$f,V:Bf,w:zf,W:Hf,x:null,X:null,y:Ff,Y:jf,Z:Gf,"%":Wf},E={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 T(e,t,n,r)},d:Zh,e:Zh,f:tf,g:Gh,G:Vh,H:Kh,I:Kh,j:Xh,L:ef,m:Yh,M:Qh,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:qh,Q:rf,s:of,S:Jh,u:Hh,U:Fh,V:Uh,w:zh,W:jh,x:function(e,t,r){return T(e,n,t,r)},X:function(e,t,n){return T(e,r,t,n)},y:Gh,Y:Vh,Z:Wh,"%":nf};function _(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=kh[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function x(e,t){return function(n){var r,i,o=Mh(1900,void 0,1);if(T(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ah(Mh(o.y,0,1))).getUTCDay(),r=i>4||0===i?ph.ceil(r):ph(r),r=nh.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Oh(Mh(o.y,0,1))).getDay(),r=i>4||0===i?ah.ceil(r):ah(r),r=th.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ah(Mh(o.y,0,1)).getUTCDay():Oh(Mh(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ah(o)):Oh(o)}}function T(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=E[i in kh?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),w.x=_(n,w),w.X=_(r,w),w.c=_(t,w),{format:function(e){var t=_(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+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Nh=Ch.format,Ch.parse,Ch.utcFormat,Ch.utcParse;const Jf=Math.abs,ep=Math.atan2,tp=Math.cos,np=Math.max,rp=Math.min,ip=Math.sin,op=Math.sqrt,ap=1e-12,sp=Math.PI,lp=sp/2,cp=2*sp;function up(e){return e>=1?lp:e<=-1?-lp:Math.asin(e)}function dp(e){this._context=e}function hp(e){return new dp(e)}function fp(){}function pp(e){this._context=e}function mp(e){return new pp(e)}dp.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)}}},pp.prototype={areaStart:fp,areaEnd:fp,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))}};const gp=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${e}`)})();function vp(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function yp(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function bp(e,t={}){const n=t.width||function(e){const t=yp(e,"border-left-width"),n=yp(e,"border-right-width");return e.clientWidth+t+n}(e),r=t.height||function(e){const t=yp(e,"border-top-width"),n=yp(e,"border-bottom-width");return e.clientHeight+t+n}(e);return{width:n,height:r}}const wp=16384;function Ep(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}))}const _p=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||_p(n,t))};function xp(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const o=gp();try{t.className=`${t.className} ${o}`}catch{return}const a=document.createElement("style");a.appendChild(function(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 vp(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}(o,n,r)),t.appendChild(a)}const Tp="application/font-woff",Sp="image/jpeg",Op={woff:Tp,woff2:Tp,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Sp,jpeg:Sp,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ap(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return Op[t]||""}function Mp(e){return-1!==e.search(/^(data:)/)}async function Cp(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 o=new FileReader;o.onerror=t,o.onloadend=()=>{try{e(n({res:r,result:o.result}))}catch(e){t(e)}},o.readAsDataURL(i)}))}const Np={};async function kp(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!=Np[r])return Np[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const r=await Cp(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n))));i=function(e,t){return`data:${t};base64,${e}`}(r,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 Np[r]=i,i}const Rp=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function Dp(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>async function(e,t){return _p(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):Ep(t)}(e):_p(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),Ep(t.toDataURL())}const n=e.poster,r=Ap(n);return Ep(await kp(n,r,t))}(e,t):_p(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await Dp(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t))).then((n=>async function(e,t,n){var r,i;let o=[];return o=Rp(e)&&e.assignedNodes?vp(e.assignedNodes()):_p(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?vp(e.contentDocument.body.childNodes):vp((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===o.length||_p(e,HTMLVideoElement)||await o.reduce(((e,r)=>e.then((()=>Dp(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>function(e,t){return _p(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):vp(r).forEach((i=>{let o=r.getPropertyValue(i);"font-size"===i&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),_p(e,HTMLIFrameElement)&&"display"===i&&"inline"===o&&(o="block"),"d"===i&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),n.setProperty(i,o,r.getPropertyPriority(i))}))}(e,t),function(e,t){xp(e,t,":before"),xp(e,t,":after")}(e,t),function(e,t){_p(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),_p(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(_p(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}(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 o=n[i].getAttribute("xlink:href");if(o){const n=e.querySelector(o),i=document.querySelector(o);!n&&i&&!r[o]&&(r[o]=await Dp(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 Ip=/url\((['"]?)([^'"]+?)\1\)/g,Lp=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,$p=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Pp(e){return-1!==e.search(Ip)}async function Bp(e,t,n){if(!Pp(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace($p,(e=>{for(;;){const[n,,r]=Lp.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(Ip,((e,n,r)=>(t.push(r),e))),t.filter((e=>!Mp(e)))}(r).reduce(((e,r)=>e.then((e=>async function(e,t,n,r,i){try{const o=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,a=Ap(t);let s;return i||(s=await kp(o,a,r)),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}(e,r,t,n)))),Promise.resolve(r))}async function zp(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await Bp(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function Hp(e,t){_p(e,Element)&&(await async function(e,t){await zp("background",e,t)||await zp("background-image",e,t),await zp("mask",e,t)||await zp("mask-image",e,t)}(e,t),await async function(e,t){const n=_p(e,HTMLImageElement);if((!n||Mp(e.src))&&(!_p(e,SVGImageElement)||Mp(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await kp(r,Ap(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const o=e;o.decode&&(o.decode=t),"lazy"===o.loading&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=vp(e.childNodes).map((e=>Hp(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const Fp={};async function Up(e){let t=Fp[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},Fp[e]=t),t}async function jp(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let o=i.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Cp(o,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function Vp(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,o=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=o.exec(n),null===e)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(e[0])}return t}async function Gp(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await async function(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=vp(e.ownerDocument.styleSheets),r=await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{vp(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let o=i+1;const a=Up(e.href).then((e=>jp(e,t))).then((e=>Vp(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?o+=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(a)}}))}catch(i){const o=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(Up(n.href).then((e=>jp(e,t))).then((e=>Vp(e).forEach((e=>{o.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{vp(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>Pp(e.style.getPropertyValue("src"))))}(r)}(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return Bp(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 Wp(e,t={}){const{width:n,height:r}=bp(e,t),i=await Dp(e,t,!0);return await Gp(i,t),await Hp(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 async function(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.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)}(i,n,r)}async function qp(e,t={}){const{width:n,height:r}=bp(e,t),i=await Wp(e,t),o=await Ep(i),a=document.createElement("canvas"),s=a.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 a.width=c*l,a.height=u*l,t.skipAutoScale||function(e){(e.width>wp||e.height>wp)&&(e.width>wp&&e.height>wp?e.width>e.height?(e.height*=wp/e.width,e.width=wp):(e.width*=wp/e.height,e.height=wp):e.width>wp?(e.height*=wp/e.width,e.width=wp):(e.width*=wp/e.height,e.height=wp))}(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(o,0,0,a.width,a.height),a}let Yp=class{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}},Zp=class e extends Yp{constructor(e,t){super(e,t)}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=$d(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")},o=e.node();let a,s,l,c,u;try{"function"==typeof o.getBBox&&(a=o.getBBox(),s={width:a.width,height:a.height})}catch(e){console.error(e)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.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:xu(e.node(),"width","baseVal","value"),height:xu(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.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(e,t=!1){const n={left:0,top:0},r=e.getBoundingClientRect(),i=t?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=r.left-i.left,n.top=r.top-i.top}catch(e){console.error(e)}return n}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=xu(e,"style","prefix"),n=$d(this.getHolder()).append("div").classed(`${wc}--${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),$d(this.getHolder()).classed(`${wc}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=$d(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await qp(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 o="myChart";const a=xu(t,"fileDownload","fileName");"function"==typeof a?o=a("jpg"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=$d(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await qp(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=xu(t,"fileDownload","fileName");"function"==typeof a?o=a("png"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}isFullScreenMode(){return $d(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const e=this.getHolder();$d(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=$d(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=e.getSVGElementSize($d(this.mainContainer),{useBBox:!0}),n=$d(this.mainContainer).attr("class"),r=$d(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize($d(t),{useBBox:!0}).height)})),i<=t?$d(this.mainContainer).attr("height",i):$d(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&$d(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(D.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(D.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=function(e,t,n){var r,i,o,a,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,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function m(){var e=Dd();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Ld(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,a)}function v(){var e=Dd(),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):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Rd(t)||0,qe(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Id(Rd(n.maxWait)||0,t):o,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?a:g(Dd())},v}((()=>{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(D.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}},Xp=class e extends Yp{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(t,n){let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var Kp=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"}),Qp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),em=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nm="\\ud800-\\udfff",rm="\\u2700-\\u27bf",im="a-z\\xdf-\\xf6\\xf8-\\xff",om="A-Z\\xc0-\\xd6\\xd8-\\xde",am="\\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="["+am+"]",lm="\\d+",cm="["+rm+"]",um="["+im+"]",dm="[^"+nm+am+lm+rm+im+om+"]",hm="(?:\\ud83c[\\udde6-\\uddff]){2}",fm="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+om+"]",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])?",wm="[\\ufe0e\\ufe0f]?",Em=wm+bm+"(?:\\u200d(?:"+["[^"+nm+"]",hm,fm].join("|")+")"+wm+bm+")*",_m="(?:"+[cm,hm,fm].join("|")+")"+Em,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,_m].join("|"),"g");var Tm=RegExp("['’]","g");function Sm(e){return function(t){return function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)n=t(n,e[r],r,e);return n}(function(e,t){return e=Nn(e),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)||[]}(function(e){return(e=Nn(e))&&e.replace(Qp,Kp).replace(Jp,"")}(t).replace(Tm,"")),e,"")}}function Om(e,t){var n;return ad(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Am(e,t,n){return(je(e)?di:Om)(e,Yi(t))}Rt((function(e,t,n){return function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}(e,Rd(t)||0,n)})),Sm((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));class Mm{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],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}function Cm(e){return e}var Nm=1,km=2,Rm=3,Dm=4,Im=1e-6;function Lm(e){return"translate("+e+",0)"}function $m(e){return"translate(0,"+e+")"}function Pm(e){return t=>+e(t)}function Bm(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function zm(){return!this.__axis}function Hm(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Nm||e===Dm?-1:1,u=e===Dm||e===km?"x":"y",d=e===Nm||e===Rm?Lm:$m;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):Cm),m=Math.max(o,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?Bm:Pm)(t.copy(),l),w=h.selection?h.selection():h,E=w.selectAll(".domain").data([null]),_=w.selectAll(".tick").data(f,t).order(),x=_.exit(),T=_.enter().append("g").attr("class","tick"),S=_.select("line"),O=_.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Nm?"0em":e===Rm?"0.71em":"0.32em")),h!==w&&(E=E.transition(h),_=_.transition(h),S=S.transition(h),O=O.transition(h),x=x.transition(h).attr("opacity",Im).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),T.attr("opacity",Im).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),E.attr("d",e===Dm||e===km?a?"M"+c*a+","+v+"H"+l+"V"+y+"H"+c*a:"M"+l+","+v+"V"+y:a?"M"+v+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+v+","+l+"H"+y),_.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),S.attr(u+"2",c*o),O.attr(u,c*m).text(p),w.filter(zm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===km?"start":e===Dm?"end":"middle"),w.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?(o=a=+e,h):o},h.tickSizeInner=function(e){return arguments.length?(o=+e,h):o},h.tickSizeOuter=function(e){return arguments.length?(a=+e,h):a},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function Fm(e){return Hm(Nm,e)}function Um(e){return Hm(km,e)}function jm(e){return Hm(Rm,e)}function Vm(e){return Hm(Dm,e)}const Gm={capture:!0,passive:!1};function Wm(e){e.preventDefault(),e.stopImmediatePropagation()}const qm=e=>+e,Ym=e=>()=>e;function Zm(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){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:o}})}function Xm(e){e.preventDefault(),e.stopImmediatePropagation()}var Km={name:"drag"},Qm={name:"space"},Jm={name:"handle"},eg={name:"center"};const{abs:tg,max:ng,min:rg}=Math;function ig(e){return[+e[0],+e[1]]}function og(e){return[ig(e[0]),ig(e[1])]}var ag={name:"x",handles:["w","e"].map(fg),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]]}},sg={},lg={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"},cg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ug={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},dg={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},hg={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function fg(e){return{type:e}}function pg(e){return!e.ctrlKey&&!e.button}function mg(){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 gg(){return navigator.maxTouchPoints||"ontouchstart"in this}function vg(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function yg(){return function(e){var t,n=mg,r=pg,i=gg,o=!0,a=Ao("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([fg("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",lg.overlay).merge(n).each((function(){var e=vg(this).extent;$d(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([fg("selection")]).enter().append("rect").attr("class","selection").attr("cursor",lg.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 lg[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=$d(this),t=vg(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,a,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,w="selection"===(o&&n.metaKey?b="overlay":b)?Km:o&&n.altKey?eg:Jm,E=e===sg?null:dg[b],_=e===ag?null:hg[b],x=vg(y),T=x.extent,S=x.selection,O=T[0][0],A=T[0][1],M=T[1][0],C=T[1][1],N=0,k=0,R=E&&_&&o&&n.shiftKey,D=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=Ua(e,y)).point0=e.slice(),e.identifier=t,e}));bl(y);var I=u(y,arguments,!0).beforestart();if("overlay"===b){S&&(m=!0);const t=[D[0],D[1]||D[0]];x.selection=S=[[i=e===sg?O:rg(t[0][0],t[1][0]),s=e===ag?A:rg(t[0][1],t[1][1])],[d=e===sg?M:ng(t[0][0],t[1][0]),f=e===ag?C:ng(t[0][1],t[1][1])]],D.length>1&&z(n)}else i=S[0][0],s=S[0][1],d=S[1][0],f=S[1][1];a=i,l=s,h=d,p=f;var L=$d(y).attr("pointer-events","none"),$=L.selectAll(".overlay").attr("cursor",lg[b]);if(n.touches)I.moved=B,I.ended=H;else{var P=$d(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",H,!0);o&&P.on("keydown.brush",(function(e){switch(e.keyCode){case 16:R=E&&_;break;case 18:w===Jm&&(E&&(d=h-N*E,i=a+N*E),_&&(f=p-k*_,s=l+k*_),w=eg,z(e));break;case 32:(w===Jm||w===eg)&&(E<0?d=h-N:E>0&&(i=a-N),_<0?f=p-k:_>0&&(s=l-k),w=Qm,$.attr("cursor",lg.selection),z(e));break;default:return}Xm(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:R&&(g=v=R=!1,z(e));break;case 18:w===eg&&(E<0?d=h:E>0&&(i=a),_<0?f=p:_>0&&(s=l),w=Jm,z(e));break;case 32:w===Qm&&(e.altKey?(E&&(d=h-N*E,i=a+N*E),_&&(f=p-k*_,s=l+k*_),w=eg):(E<0?d=h:E>0&&(i=a),_<0?f=p:_>0&&(s=l),w=Jm),$.attr("cursor",lg[b]),z(e));break;default:return}Xm(e)}),!0),function(e){var t=e.document.documentElement,n=$d(e).on("dragstart.drag",Wm,Gm);"onselectstart"in t?n.on("selectstart.drag",Wm,Gm):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,w.name)}function B(e){for(const t of e.changedTouches||[e])for(const e of D)e.identifier===t.identifier&&(e.cur=Ua(t,y));if(R&&!g&&!v&&1===D.length){const e=D[0];tg(e.cur[0]-e[0])>tg(e.cur[1]-e[1])?v=!0:g=!0}for(const e of D)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,Xm(e),z(e)}function z(e){const t=D[0],n=t.point0;var r;switch(N=t[0]-n[0],k=t[1]-n[1],w){case Qm:case Km:E&&(N=ng(O-i,rg(M-d,N)),a=i+N,h=d+N),_&&(k=ng(A-s,rg(C-f,k)),l=s+k,p=f+k);break;case Jm:D[1]?(E&&(a=ng(O,rg(M,D[0][0])),h=ng(O,rg(M,D[1][0])),E=1),_&&(l=ng(A,rg(C,D[0][1])),p=ng(A,rg(C,D[1][1])),_=1)):(E<0?(N=ng(O-i,rg(M-i,N)),a=i+N,h=d):E>0&&(N=ng(O-d,rg(M-d,N)),a=i,h=d+N),_<0?(k=ng(A-s,rg(C-s,k)),l=s+k,p=f):_>0&&(k=ng(A-f,rg(C-f,k)),l=s,p=f+k));break;case eg:E&&(a=ng(O,rg(M,i-N*E)),h=ng(O,rg(M,d+N*E))),_&&(l=ng(A,rg(C,s-k*_)),p=ng(A,rg(C,f+k*_)))}h<a&&(E*=-1,r=i,i=d,d=r,r=a,a=h,h=r,b in cg&&$.attr("cursor",lg[b=cg[b]])),p<l&&(_*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in ug&&$.attr("cursor",lg[b=ug[b]])),x.selection&&(S=x.selection),g&&(a=S[0][0],h=S[1][0]),v&&(l=S[0][1],p=S[1][1]),(S[0][0]!==a||S[0][1]!==l||S[1][0]!==h||S[1][1]!==p)&&(x.selection=[[a,l],[h,p]],c.call(y),I.brush(e,w.name))}function H(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=$d(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wm,Gm),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),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);L.attr("pointer-events","all"),$.attr("cursor",lg.overlay),x.selection&&(S=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(S)&&(x.selection=null,c.call(y)),I.end(e,w.name)}}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=og(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),o=r.selection,a=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Is(o,a);function l(e){r.selection=1===e&&null===a?null:s(e),c.call(t),i.brush()}return null!==o&&null!==a?l:l(1)})):t.each((function(){var t=this,i=arguments,o=t.__brush,a=e.input("function"==typeof n?n.apply(t,i):n,o.extent),s=u(t,i).beforestart();bl(t),o.selection=null===a?null:a,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=$d(this.that).datum();a.call(t,this.that,new Zm(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:Ym(og(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:Ym(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:Ym(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(o=!!e,l):o},l.on=function(){var e=a.on.apply(a,arguments);return e===a?l:e},l}(ag)}const bg=Math.PI,wg=2*bg,Eg=1e-6,_g=wg-Eg;function xg(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let Tg=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?xg:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xg;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,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}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 o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Eg)if(Math.abs(u*s-l*c)>Eg&&i){let h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((bg-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Eg&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+w*s},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Eg||Math.abs(this._y1-c)>Eg)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%wg+wg),d>_g?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Eg&&this._append`A${n},${n},0,${+(d>=bg)},${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._}};Tg.prototype;var Sg=Math.PI,Og=2*Sg,Ag=Sg/180,Mg=Math.abs,Cg=(Math.atan,Math.atan2,Math.cos),Ng=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function kg(e,t){return Mg(e)>Sg&&(e-=Math.round(e/Og)*Og),[e,t]}function Rg(){}function Dg(e,t){return[e,t]}kg.invert=kg,new Mm,new Mm,new Mm,Rg.prototype={constructor:Rg,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()}},Cg(30*Ag),Dg.invert=Dg;Ng(3);function Ig(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 Lg(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Pg)):void 0===t&&(t=$g);for(var n,r,i,o,a,s=new Hg(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Hg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(zg)}function $g(e){return e.children}function Pg(e){return Array.isArray(e)?e[1]:null}function Bg(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function zg(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Hg(e){this.data=e,this.depth=this.height=0,this.parent=null}function Fg(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function Ug(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function jg(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 Tg(t)}function Vg(e){return e.innerRadius}function Gg(e){return e.outerRadius}function Wg(e){return e.startAngle}function qg(e){return e.endAngle}function Yg(e){return e&&e.padAngle}function Zg(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/op(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,w=y*y+b*b,E=i-o,_=h*m-p*f,x=(b<0?-1:1)*op(np(0,E*E*w-_*_)),T=(_*b-y*x)/w,S=(-_*y-b*x)/w,O=(_*b+y*x)/w,A=(-_*y+b*x)/w,M=T-g,C=S-v,N=O-g,k=A-v;return M*M+C*C>N*N+k*k&&(T=O,S=A),{cx:T,cy:S,x01:-u,y01:-d,x11:T*(i/E-1),y11:S*(i/E-1)}}function Xg(e){return e[0]}function Kg(e){return e[1]}function Qg(e,t){var n=sd(!0),r=null,i=hp,o=null,a=jg(s);function s(s){var l,c,u,d=(s=ld(s)).length,h=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Xg:sd(e),t="function"==typeof t?t:void 0===t?Kg:sd(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:sd(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Jg(e,t,n){var r=null,i=sd(!0),o=null,a=hp,s=null,l=jg(c);function c(c){var u,d,h,f,p,m=(c=ld(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(s=a(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 Qg().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Xg:sd(+e),t="function"==typeof t?t:sd(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Kg:sd(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:sd(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:sd(+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:sd(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function ev(e){this._curve=e}Hg.prototype=Lg.prototype={constructor:Hg,count:function(){return this.eachAfter(Ig)},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,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.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 Lg(this).eachBefore(Bg)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Object.create(Hg.prototype),function e(t){function n(e,n,r,i,o){!function(e,t,n,r,i,o){for(var a,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,w=0,E=y.length,_=t.value;b<E;){l=i-n,c=o-r;do{u=y[w++].value}while(!u&&w<E);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(_*e)),p=Math.max(h/g,g/d);w<E;++w){if(u+=s=y[w].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(a={value:u,dice:l<c,children:y.slice(b,w)}),a.dice?Fg(a,n,r,i,_?r+=c*u/_:o):Ug(a,n,r,_?n+=l*u/_:i,o),_-=u,b=w}}(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2),function(e){function t(t){return new ev(e(t))}t._curve=e}(hp),ev.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))}};let tv=class{constructor(e,t,n){if(this.type="",this.renderType=I.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=xu(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent($d(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=xu(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${wc}--${e}--${this.type}`,!0),n&&n.classed(`${wc}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const t=xu(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Zp.appendOrSelect(this.parent,`${this.renderType===I.SVG?"svg":"div"}${n}.${wc}--${t}--${this.type}`);if(e.ariaLabel&&r.attr("aria-label",e.ariaLabel),e.isPresentational&&r.attr("role","presentation"),e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=$d(`#${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?no({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:nv,setPrototypeOf:rv,isFrozen:iv,getPrototypeOf:ov,getOwnPropertyDescriptor:av}=Object;let{freeze:sv,seal:lv,create:cv}=Object,{apply:uv,construct:dv}=typeof Reflect<"u"&&Reflect;sv||(sv=function(e){return e}),lv||(lv=function(e){return e}),uv||(uv=function(e,t,n){return e.apply(t,n)}),dv||(dv=function(e,t){return new e(...t)});const hv=Ov(Array.prototype.forEach),fv=Ov(Array.prototype.lastIndexOf),pv=Ov(Array.prototype.pop),mv=Ov(Array.prototype.push),gv=Ov(Array.prototype.splice),vv=Ov(String.prototype.toLowerCase),yv=Ov(String.prototype.toString),bv=Ov(String.prototype.match),wv=Ov(String.prototype.replace),Ev=Ov(String.prototype.indexOf),_v=Ov(String.prototype.trim),xv=Ov(Object.prototype.hasOwnProperty),Tv=Ov(RegExp.prototype.test),Sv=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dv(e,n)}}(TypeError);function Ov(e){return 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];return uv(e,t,r)}}function Av(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vv;rv&&rv(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(iv(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Mv(e){for(let t=0;t<e.length;t++)xv(e,t)||(e[t]=null);return e}function Cv(e){const t=cv(null);for(const[n,r]of nv(e))xv(e,n)&&(Array.isArray(r)?t[n]=Mv(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Cv(r):t[n]=r);return t}function Nv(e,t){for(;null!==e;){const n=av(e,t);if(n){if(n.get)return Ov(n.get);if("function"==typeof n.value)return Ov(n.value)}e=ov(e)}return function(){return null}}const kv=sv(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Rv=sv(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dv=sv(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Iv=sv(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Lv=sv(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$v=sv(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pv=sv(["#text"]),Bv=sv(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zv=sv(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hv=sv(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fv=sv(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Uv=lv(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jv=lv(/<%[\w\W]*|[\w\W]*%>/gm),Vv=lv(/\$\{[\w\W]*/gm),Gv=lv(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wv=lv(/^aria-[\-\w]+$/),qv=lv(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yv=lv(/^(?:\w+script|data):/i),Zv=lv(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xv=lv(/^html$/i),Kv=lv(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qv=Object.freeze({__proto__:null,ARIA_ATTR:Wv,ATTR_WHITESPACE:Zv,CUSTOM_ELEMENT:Kv,DATA_ATTR:Gv,DOCTYPE_NAME:Xv,ERB_EXPR:jv,IS_ALLOWED_URI:qv,IS_SCRIPT_OR_DATA:Yv,MUSTACHE_EXPR:Uv,TMPLIT_EXPR:Vv});var Jv=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,m=c.prototype,g=Nv(m,"cloneNode"),v=Nv(m,"remove"),y=Nv(m,"nextSibling"),b=Nv(m,"childNodes"),w=Nv(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,_="";const{implementation:x,createNodeIterator:T,createDocumentFragment:S,getElementsByTagName:O}=r,{importNode:A}=i;let M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof nv&&"function"==typeof w&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:N,TMPLIT_EXPR:k,DATA_ATTR:R,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:$}=Qv;let{IS_ALLOWED_URI:P}=Qv,B=null;const z=Av({},[...kv,...Rv,...Dv,...Lv,...Pv]);let H=null;const F=Av({},[...Bv,...zv,...Hv,...Fv]);let U=Object.seal(cv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,V=null,G=!0,W=!0,q=!1,Y=!0,Z=!1,X=!0,K=!1,Q=!1,J=!1,ee=!1,te=!1,ne=!1,re=!0,ie=!1,oe=!0,ae=!1,se={},le=null;const ce=Av({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=Av({},["audio","video","img","source","image","track"]);let he=null;const fe=Av({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ve=ge,ye=!1,be=null;const we=Av({},[pe,me,ge],yv);let Ee=Av({},["mi","mo","mn","ms","mtext"]),_e=Av({},["annotation-xml"]);const xe=Av({},["title","style","font","a","script"]);let Te=null;const Se=["application/xhtml+xml","text/html"];let Oe=null,Ae=null;const Me=r.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ae||Ae!==e){if((!e||"object"!=typeof e)&&(e={}),e=Cv(e),Te=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Oe="application/xhtml+xml"===Te?yv:vv,B=xv(e,"ALLOWED_TAGS")?Av({},e.ALLOWED_TAGS,Oe):z,H=xv(e,"ALLOWED_ATTR")?Av({},e.ALLOWED_ATTR,Oe):F,be=xv(e,"ALLOWED_NAMESPACES")?Av({},e.ALLOWED_NAMESPACES,yv):we,he=xv(e,"ADD_URI_SAFE_ATTR")?Av(Cv(fe),e.ADD_URI_SAFE_ATTR,Oe):fe,ue=xv(e,"ADD_DATA_URI_TAGS")?Av(Cv(de),e.ADD_DATA_URI_TAGS,Oe):de,le=xv(e,"FORBID_CONTENTS")?Av({},e.FORBID_CONTENTS,Oe):ce,j=xv(e,"FORBID_TAGS")?Av({},e.FORBID_TAGS,Oe):{},V=xv(e,"FORBID_ATTR")?Av({},e.FORBID_ATTR,Oe):{},se=!!xv(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||qv,ve=e.NAMESPACE||ge,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,_e=e.HTML_INTEGRATION_POINTS||_e,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(W=!1),te&&(ee=!0),se&&(B=Av({},Pv),H=[],!0===se.html&&(Av(B,kv),Av(H,Bv)),!0===se.svg&&(Av(B,Rv),Av(H,zv),Av(H,Fv)),!0===se.svgFilters&&(Av(B,Dv),Av(H,zv),Av(H,Fv)),!0===se.mathMl&&(Av(B,Lv),Av(H,Hv),Av(H,Fv))),e.ADD_TAGS&&(B===z&&(B=Cv(B)),Av(B,e.ADD_TAGS,Oe)),e.ADD_ATTR&&(H===F&&(H=Cv(H)),Av(H,e.ADD_ATTR,Oe)),e.ADD_URI_SAFE_ATTR&&Av(he,e.ADD_URI_SAFE_ATTR,Oe),e.FORBID_CONTENTS&&(le===ce&&(le=Cv(le)),Av(le,e.FORBID_CONTENTS,Oe)),oe&&(B["#text"]=!0),K&&Av(B,["html","head","body"]),B.table&&(Av(B,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Sv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Sv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,_=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(p,o)),null!==E&&"string"==typeof _&&(_=E.createHTML(""));sv&&sv(e),Ae=e}},ke=Av({},[...Rv,...Dv,...Iv]),Re=Av({},[...Lv,...$v]),De=function(e){mv(n.removed,{element:e});try{w(e).removeChild(e)}catch{v(e)}},Ie=function(e,t){try{mv(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{mv(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{De(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Le=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=bv(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Te&&ve===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=E?E.createHTML(e):e;if(ve===ge)try{t=(new f).parseFromString(i,Te)}catch{}if(!t||!t.documentElement){t=x.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?_:i}catch{}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),ve===ge?O.call(t,K?"html":"body")[0]:K?t.documentElement:o},$e=function(e){return T.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Pe=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function ze(e,t,r){hv(e,(e=>{e.call(n,t,r,Ae)}))}const He=function(e){let t=null;if(ze(M.beforeSanitizeElements,e,null),Pe(e))return De(e),!0;const r=Oe(e.nodeName);if(ze(M.uponSanitizeElement,e,{tagName:r,allowedTags:B}),e.hasChildNodes()&&!Be(e.firstElementChild)&&Tv(/<[/\w]/g,e.innerHTML)&&Tv(/<[/\w]/g,e.textContent)||7===e.nodeType||X&&8===e.nodeType&&Tv(/<[/\w]/g,e.data))return De(e),!0;if(!B[r]||j[r]){if(!j[r]&&Ue(r)&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,r)||U.tagNameCheck instanceof Function&&U.tagNameCheck(r)))return!1;if(oe&&!le[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,y(e))}}return De(e),!0}return e instanceof c&&!function(e){let t=w(e);(!t||!t.tagName)&&(t={namespaceURI:ve,tagName:"template"});const n=vv(e.tagName),r=vv(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===pe?"svg"===n&&("annotation-xml"===r||Ee[r]):!!ke[n]:e.namespaceURI===pe?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&_e[r]:!!Re[n]:e.namespaceURI===ge?!(t.namespaceURI===me&&!_e[r]||t.namespaceURI===pe&&!Ee[r])&&!Re[n]&&(xe[n]||!ke[n]):!("application/xhtml+xml"!==Te||!be[e.namespaceURI]))}(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&Tv(/<\/no(script|embed|frames)/i,e.innerHTML)?(De(e),!0):(Z&&3===e.nodeType&&(t=e.textContent,hv([C,N,k],(e=>{t=wv(t,e," ")})),e.textContent!==t&&(mv(n.removed,{element:e.cloneNode()}),e.textContent=t)),ze(M.afterSanitizeElements,e,null),!1)},Fe=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Me))return!1;if((!W||V[t]||!Tv(R,t))&&(!G||!Tv(D,t)))if(!H[t]||V[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&Tv(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(!he[t]&&!Tv(P,wv(n,L,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ev(n,"data:")||!ue[e])&&(!q||Tv(I,wv(n,L,"")))&&n)return!1;return!0},Ue=function(e){return"annotation-xml"!==e&&bv(e,$)},je=function(e){ze(M.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Pe(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=Oe(a);let u="value"===a?l:_v(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,ze(M.uponSanitizeAttribute,e,r),u=r.attrValue,ie&&("id"===c||"name"===c)&&(Ie(a,e),u="user-content-"+u),X&&Tv(/((--!?|])>)|<\/(style|title)/i,u)){Ie(a,e);continue}if(r.forceKeepAttr||(Ie(a,e),!r.keepAttr))continue;if(!Y&&Tv(/\/>/i,u)){Ie(a,e);continue}Z&&hv([C,N,k],(e=>{u=wv(u,e," ")}));const d=Oe(e.nodeName);if(Fe(d,c,u)){if(E&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!s)switch(p.getAttributeType(d,c)){case"TrustedHTML":u=E.createHTML(u);break;case"TrustedScriptURL":u=E.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),Pe(e)?De(e):pv(n.removed)}catch{}}}ze(M.afterSanitizeAttributes,e,null)},Ve=function e(t){let n=null;const r=$e(t);for(ze(M.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ze(M.uponSanitizeShadowNode,n,null),He(n),je(n),n.content instanceof a&&e(n.content);ze(M.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,c=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw Sv("toString is not a function");if("string"!=typeof(e=e.toString()))throw Sv("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Oe(e.nodeName);if(!B[t]||j[t])throw Sv("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Le("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ee&&!Z&&!K&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(r=Le(e),!r)return ee?null:ne?_:""}r&&J&&De(r.firstChild);const u=$e(ae?e:r);for(;s=u.nextNode();)He(s),je(s),s.content instanceof a&&Ve(s.content);if(ae)return e;if(ee){if(te)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(H.shadowroot||H.shadowrootmode)&&(c=A.call(i,c,!0)),c}let d=K?r.outerHTML:r.innerHTML;return K&&B["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Tv(Xv,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Z&&hv([C,N,k],(e=>{d=wv(d,e," ")})),E&&ne?E.createHTML(d):d},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Ae=null,Q=!1},n.isValidAttribute=function(e,t,n){Ae||Ne({});const r=Oe(e),i=Oe(t);return Fe(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&mv(M[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=fv(M[e],t);return-1===n?void 0:gv(M[e],n,1)[0]}return pv(M[e])},n.removeHooks=function(e){M[e]=[]},n.removeAllHooks=function(){M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const ey=e=>Jv.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),ty=e=>Jv.sanitize(e,{ALLOWED_TAGS:[]}),ny=class e extends tv{constructor(){super(...arguments),this.type="toolbar",this.renderType=I.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(D.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(D.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(xu(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"),o=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("role","button").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-${ty(e.id)}`)}" aria-label="${ty(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=>Jv.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(e.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){$d(this).select("svg").style("pointer-events","none").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"),$d(this).select("button").on("mouseover focus",(function(t){const n=$d(this);n.classed("hovered",!0),o.services.events.dispatchEvent(D.Toolbar.SHOW_TOOLTIP,{event:t,hoveredElement:n,content:e.title,noWrap:!0,placements:["top","bottom"]})})).on("mouseout blur",(function(){o.services.events.dispatchEvent(D.Toolbar.HIDE_TOOLTIP)})).on("click",(t=>{e.shouldBeDisabled()||o.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&o.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=>xu(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.title))}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),$d(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(D.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(D.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=$d(`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=$d(`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=$d(`#${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=$d(`#${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=$d(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(o=>{o&&"Enter"===o.key?t.triggerFunctionAndEvent(n,e,i.node()):o&&"ArrowUp"===o.key?t.focusOnPreviousEnabledMenuItem(r):o&&"ArrowDown"===o.key?t.focusOnNextEnabledMenuItem(r):o&&"Escape"===o.key&&t.updateOverflowMenu(!1),o.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(D.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=xu(this.getOptions(),"toolbar","numberOfIcons")-1,n=xu(this.getOptions(),"toolbar","controls"),r=[],i=[],o=[];return n.forEach((n=>{let a=null;if(n.type===J.CUSTOM)null===xu(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===xu(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),a=n;else{const e=this.services.domUtils.isFullScreenMode();n.type===J.MAKE_FULLSCREEN&&e?n.type=J.EXIT_FULLSCREEN:n.type===J.EXIT_FULLSCREEN&&!e&&(n.type=J.MAKE_FULLSCREEN),a=this.getControlConfigByType(n.type)}a&&(a.text=n.text?n.text:n.type,-1!==a.id.indexOf("toolbar-export")?r.push(a):i.length<t?null===xu(a,"iconSVG","content")?o.push(a):i.push(a):o.push(a))})),o.push(...r),o.length?{buttonList:i,overflowMenuItemList:o}:{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(){const{moreOptions:e}=xu(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:e,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(),r=this.model.getOptions(),{exportAsCSV:i,exportAsJPG:o,exportAsPNG:a,zoomIn:s,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:d,showAsTable:h}=xu(r,"locale","translations","toolbar");let f;switch(e){case J.ZOOM_IN:t&&(f={id:"toolbar-zoomIn",title:s,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:t&&(f={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:t&&(f={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:d,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:h,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(D.Modal.SHOW)};break;case J.EXPORT_CSV:f={id:"toolbar-export-CSV",title:i,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:f={id:"toolbar-export-PNG",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:f={id:"toolbar-export-JPG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return f}getControlIconByType(e){switch(e){case J.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 J.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 J.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 J.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 J.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case J.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 J.EXPORT_CSV:case J.EXPORT_JPG:case J.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)}}};ny.buttonID=0;let ry=ny;const iy=class e extends tv{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=xu(e,"growth");return t===q.PREFERRED||t===q.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>xu(e,"growth")===q.STRETCH)).size()}render(e=!0){const t=this.model.getOptions(),n=this.parent,{width:r,height:i}=Zp.getHTMLElementSize(n.node()),o=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,a=xu(this.model.getOptions(),"style","prefix"),s=n.classed(`${wc}--${a}--layout-row`,this.configs.direction===W.ROW).classed(`${wc}--${a}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${wc}--${a}--layout-column`,this.configs.direction===W.COLUMN).classed(`${wc}--${a}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${wc}--${a}--layout-alignitems-center`,this.configs.alignItems===Y.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));s.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(n){n.components.forEach((r=>{var i;const o=$d(this),a=xu(n,"renderType")===I.SVG;r.setParent(a?Zp.appendOrSelect(o,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):o),a&&!o.select("svg.layout-svg-wrapper").attr("aria-label")&&o.select("svg.layout-svg-wrapper").attr("aria-label",(null==(i=null==t?void 0:t.accessibility)?void 0:i.svgAriaLabel)||(null==t?void 0:t.title));const s=xu(n,"growth");(s===q.PREFERRED||s===q.FIXED)&&r.render(e)}))})),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=xu(e,"growth"),n=xu(e,"renderType")===I.SVG?Zp.getSVGElementSize($d(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Zp.getHTMLElementSize(this);if(t===q.PREFERRED){const t=o?n.width:n.height,a=o?r:i;e.size=t/a*100}})),s.exit().remove(),this.children.filter((e=>xu(e,"growth")===q.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));o?l.style("width",(e=>e.size/100*r+"px")).style("height","100%"):l.style("height",(e=>e.size/100*i+"px")).style("width","100%"),l.each((function(t){t.components.forEach((n=>{xu(t,"growth")===q.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()))}))}};iy.instanceID=Math.floor(99999999999*Math.random());let oy=iy;class ay extends tv{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||Rc}px`).style("height",`${this.configs.size||Rc}px`).attr("opacity",0)}}class sy extends tv{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const e=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${e}__modal-title`).attr("aria-describedby",`${e}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",(e=>{e.stopPropagation()})),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=e=>{"Escape"===e.key&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(D.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(D.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.services.domUtils.getChartID(),t=this.model.getOptions(),{title:n,downloadAsCSV:r}=xu(t,"locale","translations","tabularRep"),i=xu(t,"style","prefix"),o=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container">\n\t\t\t<div class="cds--modal-header">\n\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta" id="${e}__modal-description">${ty(t.title)}</p>\n\n\t\t\t\t<button class="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">\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">\n\t\t\t\t<table class="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${In(o,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${ty(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>${o.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>${ty(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">\n\t\t\t <div class="${wc}--${i}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${r}</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=$d(this.services.domUtils.getHolder()),n=xu(t,"style","prefix");this.modal=Zp.appendOrSelect(e,`div.${wc}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class ly extends tv{constructor(){super(...arguments),this.type="title",this.renderType=I.HTML}render(e=!1){const t=this.getComponentContainer(),n=xu(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=>ty(e))),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(D.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=Zp.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),o=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,o-1)).append("tspan").text("...");const a=this;e.on("mouseover",(function(t){a.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){a.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){a.services.events.dispatchEvent(D.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Zp.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}}class cy extends tv{constructor(){super(...arguments),this.type="legend",this.renderType=I.HTML}render(e=!1){const t=this.getOptions(),n=xu(t,"legend"),r=xu(n,"alignment"),i=xu(t,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:a}=Cc.items.status,s=o.some((e=>e.status===a)),l=xu(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===j.CENTER).classed("right-aligned",r===j.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",od.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));const u=c.selectAll("div.legend-item").data(o,(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===Cc.items.status.ACTIVE}));const h=xu(this.getOptions(),"legend","clickable");c.classed("clickable",h&&o.length>1);const f=Cc.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",od.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===Cc.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[$.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Cc.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Cc.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=xu(t,"legend","additionalItems");if(g&&o.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=$d(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}=Cc.area;if(t.type===te.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===te.RADIUS){const{iconData:n,fill:r,stroke:i}=Cc.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",od.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===te.LINE){const i=Cc.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",od.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===te.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",od.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Cc.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===te.SIZE){const{iconData:n,fill:r,stroke:i}=Cc.size;e.attr("fill","none").attr("role",od.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===te.QUARTILE){const{iconData:t}=Cc.quartile;e.selectAll("rect").attr("role",od.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===te.ZOOM){const{iconData:n,color:r}=xu(Cc,"zoom"),i=e.attr("role",od.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=xu(this.getOptions(),"legend","truncation"),n=xu(t,"type"),r=xu(t,"threshold"),i=xu(t,"numCharacter"),o=e.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==z.NONE?o.html((function(e){const t=ty(e.name);return t.length>r&&t.length!==i?Eu(t,n,i):t})):o.html((e=>ty(e.name)))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=xu(n,"legend"),i=xu(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(D.Legend.ITEM_HOVER,{hoveredElement:$d(this)});const n=$d(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){$d(this).datum().name.length>i.threshold&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(D.Legend.ITEM_CLICK,{clickedElement:$d(this)});const t=$d(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=$d(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.HIDE),e.services.events.dispatchEvent(D.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(D.Legend.ITEM_HOVER,{hoveredElement:$d(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(D.Legend.ITEM_MOUSEOUT,{hoveredElement:$d(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=$d(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class uy extends tv{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=I.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,o]=n.range(),[a,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Zp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Zp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-i>0&&l.attr("x",i).attr("y",s).attr("width",o-i).attr("height",a-s),this.chartClipPath.merge(l).lower()}}class dy extends uy{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}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Zp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Zp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}var hy,fy;!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(fy||(fy={}));var py=((hy={})[fy.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)}},hy[fy.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)}},hy[fy.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)}},hy[fy.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)}},hy),my=typeof window<"u"?window:{innerHeight:0,innerWidth:0},gy=function(){function e(e){void 0===e&&(e={}),this.positions=py,this.positions=Object.assign({},py,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(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.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),o=e.getBoundingClientRect();return this.calculatePosition(i,o,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 o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var a=n.map((function(n){var a=i(e,t,n),s=o.getPlacementBox(t,a),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 a.sort((function(e,t){return t.weight-e.weight})),a[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;return void 0===r&&(r=this.defaultContainerFunction.bind(this)),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:my.innerHeight,width:my.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 gy;class vy extends tv{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=I.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new gy,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items,n=$d(e.detail.event.target).datum();let r;const i=this.formatItems(this.getItems(e));r=e.detail.content?`<div class="title-tooltip"><p>${ey(e.detail.content)}</p></div>`:ey(this.getTooltipHTML(i));const o=Zp.appendOrSelect(this.tooltip,"div.content-box");if(xu(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${ey(e.detail.content)}</p></div>`;o.html(t)}else o.html(`<div class="title-tooltip"><p>${ey(this.model.getOptions().tooltip.customHTML(t,r,n))}</p></div>`);else o.html(r);o.selectAll(".datapoint-tooltip").each((function(e,t){const n=i[t];i[t]&&i[t].color&&$d(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.lastTriggeredEventType=e.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(D.Tooltip.MOVE,(e=>{this.lastTriggeredEventType!==D.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),this.services.events.addEventListener(D.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(D.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(D.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(D.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(D.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(D.Tooltip.MOVE,null),this.services.events.removeEventListener(D.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(D.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(D.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(D.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(D.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=xu(t,"tooltip","truncation","type"),r=xu(t,"tooltip","truncation","threshold"),i=xu(t,"tooltip","truncation","numCharacter");return n!==z.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=Eu(e.label,n,i)),e.value&&e.value.length>r&&(e.value=Eu(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>"}isDate(e){return e instanceof Date}valueFormatter(e,t){const n=this.getOptions(),r=xu(n,"tooltip","valueFormatter"),{code:i,number:o,date:a}=xu(n,"locale");if(r)return r(e,t);if(this.isDate(e))return a(e,i,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return a(new Date(e),i,{month:"short",day:"numeric",year:"numeric"})}catch{}return o(e,i)}render(e=!1){const t=this.getOptions(),n=xu(t,"tooltip","enabled");if(n){const e=$d(this.services.domUtils.getHolder()),n=xu(t,"style","prefix");this.tooltip=Zp.appendOrSelect(e,`div.${wc}--${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)}addOffsetByPlacement(e,t,n){const r=Object.assign({},e);return t==fy.LEFT?r.left-=n:t==fy.RIGHT?r.left+=n:t==fy.TOP?r.top-=n:t==fy.BOTTOM&&(r.top+=n),r}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=t.offsetWidth,r=t.offsetHeight,i=this.tooltip.node(),o=this.getOptions(),a=xu(o,"zoomBar","top","enabled"),s=!!xu(e,"detail","noWrap"),l=Array.isArray(xu(e,"detail","placements")),c=l?xu(e,"detail","placements"):[fy.RIGHT,fy.LEFT,fy.TOP,fy.BOTTOM];let u,{horizontalOffset:d}=Dc;const{defaultOffset:h}=Dc;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",s),l){const t=xu(e,"detail","event","target"),o=this.services.domUtils.getElementOffset(t,!0);u=this.positionService.findBestPlacementAt(o,i,c,(()=>({top:0,left:0,width:n,height:r})));let a=this.positionService.findPosition(t,i,u,(()=>this.services.domUtils.getElementOffset(t)));return a=this.addOffsetByPlacement(a,u,h),void this.positionService.setElement(i,a)}let f=xu(e,"detail","mousePosition");if(f){const e=xu(o,"zoomBar","top","type"),t=Lc.height[e];a&&(f[1]+=t+Lc.spacerHeight)}else f=Ua(xu(e,"detail","event"),t);u=f[0]/n>.9?fy.LEFT:f[0]/n<.1?fy.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},i,c,(()=>({top:void 0,left:void 0,width:n,height:r}))),u===fy.LEFT&&(d*=-1);const p=this.positionService.findPositionAt({left:f[0]+d,top:f[1]},i,u);this.positionService.setElement(i,p)}}const yy=class e extends tv{constructor(){super(...arguments),this.type="grid-brush",this.renderType=I.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const i=Zp.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Zp.appendOrSelect(i,`g.${this.type}`),a=Zp.appendOrSelect(o,this.selectionSelector),{width:s,height:l}=Zp.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=Zp.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===F.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),o=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-o),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(a.attr("x"))+parseFloat(i.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=Qf().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]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=yg().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),o.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=Ua(o.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)}}))}}};yy.DASH_LENGTH=4;let by=yy;class wy extends tv{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=I.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=yg(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(D.ZoomBar.UPDATE,this.render.bind(this));const e=xu(this.getOptions(),"zoomBar",P.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(P.TOP),r=this.services.zoom.isZoomBarLocked(P.TOP),i=xu(this.getOptions(),"zoomBar",P.TOP,"type"),o=xu(this.getOptions(),"axes",P.BOTTOM,"highlights"),a=Lc.height[i],{width:s}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Zp.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);if(Zp.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",Lc.spacerHeight).attr("opacity",1).attr("fill","none"),i===B.GRAPH_VIEW?Zp.appendOrSelect(u,"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===B.SLIDER_VIEW&&Zp.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",a/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(u,l,s);const{cartesianScales:d}=this.services,h=d.getMainXScale(),f=d.getMainYScale(),p=d.getMainXScaleType();if(h&&p===F.TIME){let e=this.services.zoom.getZoomBarData();if(function(e){if(null==e)return!0;if(Lt(e)&&(je(e)||"string"==typeof e||"function"==typeof e.splice||Wt(e)||en(e)||Ut(e)))return!e.length;var t=wr(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Pt(e))return!sn(e).length;for(var n in e)if(to.call(e,n))return!1;return!0}(e)||1===e.length)return;this.xScale=h.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const c=this.model.get("initialZoomDomain"),d=xu(this.getOptions(),"zoomBar",P.TOP,"initialZoomDomain");d&&d[0]&&d[1]&&(d[0]=new Date(d[0]),d[1]=new Date(d[1])),!d||c&&c[0].valueOf()===d[0].valueOf()&&c[1].valueOf()===d[1].valueOf()?null===d&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:no([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:no([],d),zoomDomain:d?no([],d):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(po(e,(e=>e.value)));const p=this.model.get("zoomDomain");if(i===B.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(u,l,s),o)){const e=o.highlightStartMapsTo,t=o.highlightEndMapsTo,n=o.color,r=o.labelMapsTo;o.data.forEach(((i,o)=>{Zp.appendOrSelect(u,`rect.highlight-${o}`).attr("height",a-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(p,l,s);const m=Zp.appendOrSelect(t,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())m.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const e=p.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=xu(this.getOptions(),"zoomBar",P.TOP,"type"),i=Lc.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=D.ZoomBar.SELECTION_START:"brush"===e.type?n=D.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=D.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(D.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=Lc.handleWidth,i=xu(this.getOptions(),"zoomBar",P.TOP,"type"),o=Lc.height[i],a=-r/2,s=Lc.handleBarWidth,l=i===B.GRAPH_VIEW?Lc.handleBarHeight:6,c=-s/2,u=(o-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]+a,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+a,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",o).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]-a+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+a+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===B.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],o)}updateSliderSelectedArea(e){const t=xu(this.getOptions(),"zoomBar",P.TOP,"type"),n=Lc.height[t],r=this.getComponentContainer().select("svg.zoom-container");Zp.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,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,o),d=c(this.yScale,l,a),h=xu(this.getOptions(),"zoomBar",P.TOP,"type"),f=Lc.height[h],p=Jg().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Zp.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,o){const a=Zp.appendOrSelect(e,"clipPath").attr("id",t);Zp.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=ci(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=xu(this.model.getOptions(),"zoomBar",P.TOP,"type"),o=Lc.height[i],a=Qg()([[t,o],[n,o]]);Zp.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",a).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),Zp.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),xu(this.getOptions(),"zoomBar",P.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(D.ZoomBar.UPDATE,this.render.bind(this))}}class Ey extends tv{constructor(e,t){super(e,t),this.type="threshold",this.renderType=I.SVG,this.positionService=new gy}render(e=!1){const t=xu(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(P).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({ariaLabel:"threshold lines",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 o=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("line").attr("class","threshold-line"),a.append("rect").attr("class","threshold-hoverable-area"),a.merge(o).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,o=null;t===P.LEFT||t===P.RIGHT?(o=n,i=s.services.cartesianScales.getMainXScale()):(i=n,o=s.services.cartesianScales.getMainYScale());const a=r===F.LABELS,[l,c]=i.range(),[u,d]=o.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=Su((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=$d(this);t===P.TOP||t===P.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)+(a?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(a?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)+(a?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(a?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(D.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(D.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions(),i=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:a}=xu(r,"locale");if(i===F.TIME){const e=[P.LEFT,P.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),a=e?o:i,s=xu(r,"timeScale"),l=td(a.ticks(),xu(s,"timeInterval"));return Ju(t,0,a.ticks(),l,s,r.locale)}return a(t,o)}appendThresholdLabel(){const e=$d(this.services.domUtils.getHolder()),t=xu(this.getOptions(),"style","prefix");this.label=Zp.appendOrSelect(e,`div.${wc}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=Ua(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(ty(`${t.label||"Threshold"}: ${i}`)).style("background-color",t.fillColor);const o=this.label.node(),a=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},o,[fy.RIGHT,fy.LEFT,fy.TOP,fy.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},o,a);this.positionService.setElement(o,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=xu(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){$d(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(D.Threshold.SHOW,{event:t,hoveredElement:$d(this),datum:$d(this).datum()})})).on("mouseout",(function(t){$d(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(D.Threshold.HIDE,{event:t,hoveredElement:$d(this),datum:$d(this).datum()})}))}}class _y extends tv{constructor(e,t){super(e,t),this.type="highlight",this.renderType=I.SVG,this.positionService=new gy,this.highlightStrokeWidth=1}render(e=!1){const t=xu(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(P).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({ariaLabel:"highlight areas",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 o=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)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,o]=n.range(),[a,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=Su((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=$d(this);t===P.TOP||t===P.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(a-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(o-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 xy extends vy{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(),o=r.isDualAxes(),{groupMapsTo:a}=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(o){const e=r.getRangeAxisPosition({datum:i,groups:[i[a]]});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:In(n,"locale.translations.group")||In(n,"tooltip.groupLabel"),value:i[a],color:this.model.getFillColor(i[a]),class:this.model.getColorClassName({classNameTypes:[$.TOOLTIP],dataGroupName:i[a]})})}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[a],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[a]),class:this.model.getColorClassName({classNameTypes:[$.TOOLTIP],dataGroupName:e[a]})}})).sort(((e,t)=>t.value-e.value))),!o&&!0===xu(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:In(n,"locale.translations.total")||In(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}var Ty=Math.PI,Sy=2*Ty,Oy=1e-6,Ay=Sy-Oy;function My(){this._x0=this._y0=this._x1=this._y1=null,this._=""}My.prototype=function(){return new My}.prototype={constructor:My,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,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-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>Oy)if(Math.abs(u*s-l*c)>Oy&&i){var h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Ty-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Oy&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+w*s)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?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)>Oy||Math.abs(this._y1-c)>Oy)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Sy+Sy),d>Ay?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Oy&&(this._+="A"+n+","+n+",0,"+ +(d>=Ty)+","+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._}},Array.prototype.slice;class Cy extends tv{constructor(){super(...arguments),this.type="grid",this.renderType=I.SVG}render(e=!0){const t=xu(this.getOptions(),"grid","x","enabled"),n=xu(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Zp.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Zp.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=jm(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(xu(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=xu(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=xu(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=Vm(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(xu(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=xu(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=xu(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(wu(e).tx)-Number(wu(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+wu(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,o=n[r],a=n[i];let s;if(o)if(a)s=+wu(a).tx-+wu(o).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Zp.getSVGElementSize(e).width-+wu(o).tx}else s=+wu(a).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=xu(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=wu(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(),[o,a]=r.range(),[s,l]=i.range();this.backdrop=Zp.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Zp.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(a-o)).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 Ny extends tv{constructor(){super(...arguments),this.type="line",this.renderType=I.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?Nc:kc))},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",kc)}}init(){const{events:e}=this.services;e.addEventListener(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,o]=Su((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),a=this.getOptions(),s=Qg().x(i).y(o).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(a.axes).some((e=>a.axes[e].percentage)),{groupMapsTo:t}=a.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:xu(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!Am(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:[$.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name,null,e.data))).attr("role",od.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class ky extends tv{constructor(){super(...arguments),this.type="ruler",this.renderType=I.SVG,this.isXGridEnabled=xu(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=xu(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=xu(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(),o=this.model.getDisplayData(),a=this.services.cartesianScales.getRangeScale(),[s,l]=a.range(),c=i===H.HORIZONTAL?n:t,u=Zp.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Zp.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=o.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(D.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 r=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),o=p.map((e=>e.domainValue)),a=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return o.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(e,t){return Hi(e,t)}(this.elementsToHighlight,a)&&this.hideRuler(),a.dispatch("mouseover"),this.elementsToHighlight=a,this.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(r)}),u.attr("opacity",1);const c=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",c.domainValue).attr("y2",c.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",c.domainValue).attr("x2",c.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Zp.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(D.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=Ua(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const o=this;o.mousePosition=Ua(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(o,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=Zp.appendOrSelect(e,"svg.chart-grid-backdrop")}}let Ry=class extends tv{constructor(){super(...arguments),this.type="scatter",this.renderType=I.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(D.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(D.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(!xu(this.getOptions(),"points","enabled")&&!xu(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const o=i.getDomainIdentifier(),a=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[o]}`));a.exit().attr("opacity",0).remove();const s=a.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(a);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,o]=Su(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[a,s]=Su((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=a(e),c=s(e);return o&&i?c<=o.scaleValue&&l>=i.scaleValue:o?c<=o.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:a}=n.data,[s,l]=Su((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=o.getDomainIdentifier(e),n=this.model.getIsFilled(e[a],e[t],e,r)?[$.FILL,$.STROKE]:[$.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[a],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=o.getDomainIdentifier(e);return this.model.getIsFilled(e[a],e[t],e,r)})).classed("unfilled",(e=>{const t=o.getDomainIdentifier(e);return!this.model.getIsFilled(e[a],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=o.getDomainIdentifier(e);if(this.model.getIsFilled(e[a],e[t],e,r))return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=o.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",od.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[o.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,o;const a=$d(this);a.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[$.FILL],dataGroupName:n[t],originalClassName:a.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(D.Tooltip.SHOW,{event:n,hoveredElement:a,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(o=e.services.events)||o.dispatchEvent(D.Scatter.SCATTER_MOUSEOVER,{event:n,element:a,datum:r})})).on("mousemove",(function(t,n){var r,i;const o=$d(this);null==(r=e.services.events)||r.dispatchEvent(D.Scatter.SCATTER_MOUSEMOVE,{event:t,element:o,datum:n}),null==(i=e.services.events)||i.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(D.Scatter.SCATTER_CLICK,{event:t,element:$d(this),datum:n})})).on("mouseout",(function(n,r){var i,o,a;const s=$d(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,o=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),a=e.model.getIsFilled(r[t],r[o],r,n);s.classed("unfilled",!a).style("fill",(r=>a||n?e.model.getFillColor(r[t],r[o],r):null))}null==(o=e.services.events)||o.dispatchEvent(D.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(a=e.services.events)||a.dispatchEvent(D.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(D.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(D.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class Dy extends tv{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=I.SVG,this.truncation={[P.LEFT]:!1,[P.RIGHT]:!1,[P.TOP]:!1,[P.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=xu(n,"axes",t,"visible"),i=this.getComponentContainer({ariaLabel:"axes"}),{width:o,height:a}=Zp.getSVGElementSize(i,{useAttrs:!0}),s=Zp.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===P.BOTTOM||t===P.TOP?(l=this.configs.axes[P.LEFT]?this.margins.left:0,c=this.configs.axes[P.RIGHT]?o-this.margins.right:o):(l=a-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===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case P.LEFT:d=Vm;break;case P.BOTTOM:d=jm;break;case P.RIGHT:d=Um;break;case P.TOP:d=Fm}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Zp.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${od.GRAPHICS_OBJECT} ${od.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Zp.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=xu(n,"axes",t),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=t===P.LEFT||t===P.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=xu(m,"scaleType"),w=xu(n,"data","loading"),E=xu(m,"ticks","number"),_=xu(m,"ticks","values"),x=xu(m,"truncation","type"),T=xu(m,"truncation","threshold"),S=xu(m,"truncation","numCharacter"),O=null!==E,A=xu(n,"timeScale"),M=Zp.appendOrSelect(p,"g.tick"),C=Zp.appendOrSelect(M,"text").text("0"),N=Zp.getSVGElementSize(C.node(),{useBBox:!0}).height;M.remove();const k=this.scaleType||m.scaleType||F.LINEAR,R=d(u).tickSizeOuter(0);if(u.ticks){let e;if(O?e=E:(e=Ec,v&&(e=this.getNumberOfFittingTicks(a,N,_c))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),R.ticks(e),g)if(u.ticks(e).length){const r=xu(n,"timeScale","addSpaceOnEdges"),i=xu(n,"axes",t,"domain"),o=u.copy();r&&!i&&o.nice(e);const a=o.ticks(e);r&&a.length>2&&!i&&(a.splice(a.length-1,1),a.splice(0,1)),R.tickValues(a)}else R.tickValues([])}let D;const I=xu(m,"ticks","formatter"),{code:L,number:$}=xu(n,"locale");if(g){const e=td(R.tickValues(),xu(n,"timeScale","timeInterval"));D=null===I?(t,r)=>Ju(t,r,R.tickValues(),e,A,n.locale):(t,r)=>{const i=Ju(t,r,R.tickValues(),e,A,n.locale);return I(t,r,i)}}else null===I?k===F.LINEAR&&(D=e=>$(e,L)):D=I;R.tickFormat(D);const[B,H]=this.services.cartesianScales.getScaleByPosition(t).domain();let U;if(_){if(g)_.forEach(((e,t)=>{void 0===e.getTime&&(_[t]=new Date(e))})),U=_.filter((e=>{const t=e.getTime();return t>=new Date(B).getTime()&&t<=new Date(H).getTime()}));else if(b===F.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();U=_.filter((t=>e.includes(t)))}else U=_.filter((e=>e>=B&&e<=H));R.tickValues(U)}switch(t){case P.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case P.BOTTOM:f.attr("transform",`translate(0, ${a-this.margins.bottom})`);break;case P.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case P.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const e=Zp.appendOrSelect(s,"text.axis-title").html(j||w?"":ty(m.title)),n=xu(m,"titleOrientation");let r;switch(t){case P.LEFT:n===ee.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 P.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${a+4})`).style("text-anchor","middle");break;case P.RIGHT:n===ee.LEFT?e.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case P.TOP:r=Zp.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=td(R.tickValues(),xu(n,"timeScale","timeInterval")),r=A.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(R),i.selectAll(".tick").data(R.tickValues(),u).order().select("text").attr("class",((e,n)=>Qu(e,n,R.tickValues(),t,r)?"tick-label--primary":"tick-label"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(R):f.call(R);if(p.call(R),t===P.BOTTOM||t===P.TOP){let e=!1;const n=xu(m,"ticks","rotation");if(n===K.ALWAYS)e=!0;else if(n===K.NEVER)e=!1;else if(!n||n===K.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Zp.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Zp.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=$d(this),i=parseFloat(xu(wu(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(O||(R.ticks(this.getNumberOfFittingTicks(o,N,xc)),p.call(R),f.call(R)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===P.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?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!==z.NONE&&b===F.LABELS&&!_){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>T?(r.truncation[t]=!0,Eu(e,x,S)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>T?Eu(e,x,S):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=Zp.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=xu(r,"axes",t),o=xu(i,"scaleType"),a=xu(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOVER,{event:e,element:$d(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,hoveredElement:$d(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEMOVE,{event:e,element:$d(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_CLICK,{event:e,element:$d(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOUT,{event:e,element:$d(this),datum:t}),o===F.LABELS&&s.services.events.dispatchEvent(D.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 function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Rd(n))==n?n:0),void 0!==t&&(t=(t=Rd(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}(Rd(e),t,n)}(Math.floor(e/(t*n)),2,Ec)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Zp.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class Iy extends Dy{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),r=Zp.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=$d(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=r.select("text"),{width:a,height:s}=Zp.getSVGElementSize(o,{useBBox:!0}),l=Zp.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case P.LEFT:c=-a+Number(o.attr("x")),u=-s/2;break;case P.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-s/2;break;case P.TOP:c=-a/2,u=-s+Number(o.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case P.BOTTOM:c=-a/2,u=s/2-2,i.truncation[t]&&(c=-a,l.attr("transform","rotate(-45)"))}l.attr("x",c-Sc).attr("y",u).attr("width",a+2*Sc).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Zp.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=xu(r,"axes",t),o=xu(i,"scaleType"),a=xu(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=$d(this).select("text"),n=t.datum();s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),o===F.LABELS&&n.length>a&&s.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=$d(this).select("text"),n=t.datum();s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_CLICK,{event:e,element:$d(this).select("text"),datum:$d(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOUT,{event:e,element:$d(this).select("text"),datum:$d(this).select("text").datum()}),o===F.LABELS&&s.services.events.dispatchEvent(D.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(D.Axis.LABEL_FOCUS,{event:{...e,...t},element:$d(this),datum:$d(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_BLUR,{event:e,element:$d(this),datum:$d(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(D.Tooltip.HIDE),s.services.events.dispatchEvent(D.Axis.LABEL_BLUR,{event:e,element:$d(this),datum:$d(this).select("text").datum()})),t===P.LEFT||t===P.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;Zp.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 Ly extends tv{constructor(){super(...arguments),this.type="2D-axes",this.renderType=I.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys(P),r=xu(this.getOptions(),"axes");n.forEach((e=>{r[P[e]]&&(t[P[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=P[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===re.DEFAULT?new Dy(this.model,this.services,e):new Iy(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:o,height:a}=Zp.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Zp.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===P.LEFT||n===P.RIGHT)&&(s+=5)),n){case P.TOP:i.top=a+s;break;case P.BOTTOM:i.bottom=a+s;break;case P.LEFT:i.left=o+s;break;case P.RIGHT:i.right=o+s}})),this.services.events.dispatchEvent(D.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(D.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class $y extends tv{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=xu(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===Z.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===Z.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===Z.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==Z.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===H.VERTICAL&&this.drawYGrid(e),t===H.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=yc().domain([0,1]).range(e),this.yScale=yc().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Zp.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Zp.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Zp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,a]=this.yScale.range();this.backdrop.merge(i).attr("x",o).attr("y",a),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=xu(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Zp.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).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=xu(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),o=Zp.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),o.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:o}=Zp.getSVGElementSize(r,{useAttrs:!0}),a=Zp.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",o),s=0===t?"pie":"donut",l=xu(this.getOptions(),s,"alignment");Zp.appendOrSelect(a,"rect.chart-skeleton-area-container").attr("width",i).attr("height",o).attr("fill","none");const c=function(){var e=Vg,t=Gg,n=sd(0),r=null,i=Wg,o=qg,a=Yg,s=null,l=jg(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-lp,p=o.apply(this,arguments)-lp,m=Jf(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>ap)if(m>cp-ap)s.moveTo(h*tp(f),h*ip(f)),s.arc(0,0,h,f,p,!g),d>ap&&(s.moveTo(d*tp(p),d*ip(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,w=p,E=f,_=p,x=m,T=m,S=a.apply(this,arguments)/2,O=S>ap&&(r?+r.apply(this,arguments):op(d*d+h*h)),A=rp(Jf(h-d)/2,+n.apply(this,arguments)),M=A,C=A;if(O>ap){var N=up(O/d*ip(S)),k=up(O/h*ip(S));(x-=2*N)>ap?(E+=N*=g?1:-1,_-=N):(x=0,E=_=(f+p)/2),(T-=2*k)>ap?(b+=k*=g?1:-1,w-=k):(T=0,b=w=(f+p)/2)}var R=h*tp(b),D=h*ip(b),I=d*tp(_),L=d*ip(_);if(A>ap){var $,P=h*tp(w),B=h*ip(w),z=d*tp(E),H=d*ip(E);if(m<sp)if($=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,h=d*l-u*c;if(!(h*h<ap))return[e+(h=(u*(t-o)-d*(e-i))/h)*l,t+h*c]}(R,D,z,H,P,B,I,L)){var F=R-$[0],U=D-$[1],j=P-$[0],V=B-$[1],G=1/ip(function(e){return e>1?0:e<-1?sp:Math.acos(e)}((F*j+U*V)/(op(F*F+U*U)*op(j*j+V*V)))/2),W=op($[0]*$[0]+$[1]*$[1]);M=rp(A,(d-W)/(G-1)),C=rp(A,(h-W)/(G+1))}else M=C=0}T>ap?C>ap?(v=Zg(z,H,R,D,h,C,g),y=Zg(P,B,I,L,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<A?s.arc(v.cx,v.cy,C,ep(v.y01,v.x01),ep(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,C,ep(v.y01,v.x01),ep(v.y11,v.x11),!g),s.arc(0,0,h,ep(v.cy+v.y11,v.cx+v.x11),ep(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,C,ep(y.y11,y.x11),ep(y.y01,y.x01),!g))):(s.moveTo(R,D),s.arc(0,0,h,b,w,!g)):s.moveTo(R,D),d>ap&&x>ap?M>ap?(v=Zg(I,L,P,B,d,-M,g),y=Zg(R,D,z,H,d,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<A?s.arc(v.cx,v.cy,M,ep(v.y01,v.x01),ep(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,M,ep(v.y01,v.x01),ep(v.y11,v.x11),!g),s.arc(0,0,d,ep(v.cy+v.y11,v.cx+v.x11),ep(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,M,ep(y.y11,y.x11),ep(y.y01,y.x01),!g))):s.arc(0,0,d,_,E,g):s.lineTo(I,L)}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)+ +o.apply(this,arguments))/2-sp/2;return[tp(r)*n,ip(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:sd(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:sd(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:sd(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:sd(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:sd(+e),c):a},c.context=function(e){return arguments.length?(s=e??null,c):s},c}().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(-15),d=e+(Math.min(i,o)-2*e)/2,h=Zp.appendOrSelect(a,"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+30;l===j.CENTER?f=i/2:l===j.RIGHT&&(f=i-e-30);const p=e+20;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Zp.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,o=Zp.appendOrSelect(n,"defs").lower(),a=Zp.appendOrSelect(o,"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`;a.html(s),function e(){a.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(qm).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class Py extends tv{constructor(){super(...arguments),this.type="zero-line",this.renderType=I.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),o=r>0&&i<0||r<0&&i>0,a=this.getComponentContainer({isPresentational:!0});if(!o)return void a.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=Tu({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Zp.appendOrSelect(a,"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 By extends $y{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=xu(this.getOptions(),"data","loading"),n=!(xu(this.getOptions(),"grid","x","enabled")||xu(this.getOptions(),"grid","y","enabled")||xu(this.getOptions(),"axes","bottom","visible")||xu(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=Zp.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=Zp.appendOrSelect(e,"svg.chart-skeleton.DAII"),Zp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function zy(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}var Hy={value:function(){}};function Fy(){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 Uy(r)}function Uy(e){this._=e}function jy(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function Vy(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Hy,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Uy.prototype=Fy.prototype={constructor:Uy,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),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=Vy(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Vy(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=jy(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Uy(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const Gy=zy(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Fy},Symbol.toStringTag,{value:"Module"})));var Wy,qy;function Yy(e){return null!=e&&e.length?Bn(e,1):[]}function Zy(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 o=Array(i);++r<i;)o[r]=e[r+t];return o}function Xy(e,t){return null==(e=function(e,t){return t.length<2?e:Dn(e,Zy(t,0,-1))}(e,t=kn(t,e)))||delete e[Rn(eo(t))]}function Ky(e){return Wn(e)?void 0:e}!function(){if(qy)return Wy;qy=1;const e=Gy.dispatch,t=Math.PI/180,n={archimedean:p,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]}}},r=2048;function i(e){return e.text}function o(){return"serif"}function a(){return"normal"}function s(e){return Math.sqrt(e.value)}function l(){return 30*(~~(6*random())-3)}function c(){return 1}function u(e,n,i,o){if(!n.sprite){var a=e.context,s=e.ratio;a.clearRect(0,0,2048/s,r/s);var l=0,c=0,u=0,d=i.length;for(--o;++o<d;){n=i[o],a.save(),a.font=n.style+" "+n.weight+" "+~~((n.size+1)/s)+"px "+n.font;const e=a.measureText(n.text),d=-Math.floor(e.width/2);let y=(e.width+1)*s,b=n.size<<1;if(n.rotate){var h=Math.sin(n.rotate*t),f=Math.cos(n.rotate*t),p=y*f,m=y*h,g=b*f,v=b*h;y=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,b=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else y=y+31>>5<<5;if(b>u&&(u=b),l+y>=2048&&(l=0,c+=u,u=0),c+b>=r)break;a.translate((l+(y>>1))/s,(c+(b>>1))/s),n.rotate&&a.rotate(n.rotate*t),a.fillText(n.text,d,0),n.padding&&(a.lineWidth=2*n.padding,a.strokeText(n.text,d,0)),a.restore(),n.width=y,n.height=b,n.xoff=l,n.yoff=c,n.x1=y>>1,n.y1=b>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,l+=y}for(var y=a.getImageData(0,0,2048/s,r/s).data,b=[];--o>=0;)if((n=i[o]).hasText){for(var w=n.width,E=w>>5,_=n.y1-n.y0,x=0;x<_*E;x++)b[x]=0;if(null==(l=n.xoff))return;c=n.yoff;for(var T=0,S=-1,O=0;O<_;O++){for(x=0;x<w;x++){var A=E*O+(x>>5),M=y[2048*(c+O)+(l+x)<<2]?1<<31-x%32:0;b[A]|=M,T|=M}T?S=O:(n.y0++,_--,O--,c++)}n.y1=n.y0+S,n.sprite=b.slice(0,(n.y1-n.y0)*E)}}}function d(e,t,n){n>>=5;for(var r,i=e.sprite,o=e.width>>5,a=e.x-(o<<4),s=127&a,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(a>>5),d=0;d<c;d++){r=0;for(var h=0;h<=o;h++)if((r<<l|(h<o?(r=i[d*o+h])>>>s:0))&t[u+h])return!0;u+=n}return!1}function h(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 f(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 p(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function m(){return document.createElement("canvas")}function g(e){return"function"==typeof e?e:function(){return e}}Wy=function(){var t=[256,256],v=i,y=o,b=s,w=a,E=a,_=l,x=c,T=p,S=[],O=1/0,A=e("word","end"),M=null,C=Math.random,N={},k=m;function R(e,n,r){t[0],t[1];for(var i,o,a,s=n.x,l=n.y,c=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=T(t),h=C()<.5?1:-1,p=-h;(i=u(p+=h))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=c));)if(n.x=s+o,n.y=l+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||f(n,r))&&!d(n,e,t[0])){for(var m,g=n.sprite,v=n.width>>5,y=t[0]>>5,b=n.x-(v<<4),w=127&b,E=32-w,_=n.y1-n.y0,x=(n.y+n.y0)*y+(b>>5),S=0;S<_;S++){m=0;for(var O=0;O<=v;O++)e[x+O]|=m<<E|(O<v?(m=g[S*v+O])>>>w:0);x+=y}return!0}return!1}return N.canvas=function(e){return arguments.length?(k=g(e),N):k},N.start=function(){var e=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=r/n,t.fillStyle=t.strokeStyle="red",{context:t,ratio:n}}(k()),n=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((t[0]>>5)*t[1]),i=null,o=S.length,a=-1,s=[],l=S.map((function(e,t){return e.text=v.call(this,e,t),e.font=y.call(this,e,t),e.style=w.call(this,e,t),e.weight=E.call(this,e,t),e.rotate=_.call(this,e,t),e.size=~~b.call(this,e,t),e.padding=x.call(this,e,t),e})).sort((function(e,t){return t.size-e.size}));return M&&clearInterval(M),M=setInterval(c,0),c(),N;function c(){for(var r=Date.now();Date.now()-r<O&&++a<o&&M;){var c=l[a];c.x=t[0]*(C()+.5)>>1,c.y=t[1]*(C()+.5)>>1,u(e,c,l,a),c.hasText&&R(n,c,i)&&(s.push(c),A.call("word",N,c),i?h(i,c):i=[{x:c.x+c.x0,y:c.y+c.y0},{x:c.x+c.x1,y:c.y+c.y1}],c.x-=t[0]>>1,c.y-=t[1]>>1)}a>=o&&(N.stop(),A.call("end",N,s,i))}},N.stop=function(){M&&(clearInterval(M),M=null);for(const e of S)delete e.sprite;return N},N.timeInterval=function(e){return arguments.length?(O=e??1/0,N):O},N.words=function(e){return arguments.length?(S=e,N):S},N.size=function(e){return arguments.length?(t=[+e[0],+e[1]],N):t},N.font=function(e){return arguments.length?(y=g(e),N):y},N.fontStyle=function(e){return arguments.length?(w=g(e),N):w},N.fontWeight=function(e){return arguments.length?(E=g(e),N):E},N.rotate=function(e){return arguments.length?(_=g(e),N):_},N.text=function(e){return arguments.length?(v=g(e),N):v},N.spiral=function(e){return arguments.length?(T=n[e]||e,N):T},N.fontSize=function(e){return arguments.length?(b=g(e),N):b},N.padding=function(e){return arguments.length?(x=g(e),N):x},N.random=function(e){return arguments.length?(C=e,N):C},N.on=function(){var e=A.on.apply(A,arguments);return e===A?N:e},N}}();var Qy=function(e){return bt(kt(e,void 0,Yy),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ue(t,(function(t){return t=kn(t,e),r||(r=t.length>1),t})),Ct(e,ar(e),n),r&&(n=ai(n,7,Ky));for(var i=t.length;i--;)Xy(n,t[i]);return n}));function Jy(e){return Math.log(e)}function eb(e){return Math.exp(e)}function tb(e){return-Math.log(-e)}function nb(e){return-Math.exp(-e)}function rb(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ib(e){return(t,n)=>-e(-t,n)}function ob(){const e=function(e){const t=e(Jy,eb),n=t.domain;let r,i,o=10;function a(){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)}(o),i=function(e){return 10===e?rb:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=ib(r),i=ib(i),e(tb,nb)):e(Jy,eb),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),h=r(s);const f=null==e?10:+e;let p=[];if(!(o%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),a>0){for(;d<=h;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}2*p.length<f&&(p=_o(a,s,f))}else p=_o(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===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Zl(n)).precision&&(n.trim=!0),n=tc(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(Bd(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(mc()).domain([1,10]);return e.copy=()=>pc(e,ob()).base(e.base()),oc.apply(e,arguments),e}function ab(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 sb(e){this._context=e}function lb(e){return new sb(e)}function cb(e){this._context=e}function ub(e){return new cb(e)}function db(e){this._context=e}function hb(e){return new db(e)}function fb(e,t){this._basis=new sb(e),this._beta=t}sb.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:ab(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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},cb.prototype={areaStart:fp,areaEnd:fp,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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},db.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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fb.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],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pb=function e(t){function n(e){return 1===t?new sb(e):new fb(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function mb(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 gb(e,t){this._context=e,this._k=(1-t)/6}gb.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:mb(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:mb(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 vb=function e(t){function n(e){return new gb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function yb(e,t){this._context=e,this._k=(1-t)/6}yb.prototype={areaStart:fp,areaEnd:fp,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:mb(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 bb=function e(t){function n(e){return new yb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function wb(e,t){this._context=e,this._k=(1-t)/6}wb.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:mb(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 Eb=function e(t){function n(e){return new wb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function _b(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>ap){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>ap){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);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function xb(e,t){this._context=e,this._alpha=t}xb.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:_b(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 Tb=function e(t){function n(e){return t?new xb(e,t):new gb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Sb(e,t){this._context=e,this._alpha=t}Sb.prototype={areaStart:fp,areaEnd:fp,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:_b(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 Ob=function e(t){function n(e){return t?new Sb(e,t):new yb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ab(e,t){this._context=e,this._alpha=t}Ab.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:_b(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 Mb=function e(t){function n(e){return t?new Ab(e,t):new wb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Cb(e){return e<0?-1:1}function Nb(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Cb(o)+Cb(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function kb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rb(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Db(e){this._context=e}function Ib(e){this._context=new Lb(e)}function Lb(e){this._context=e}function $b(e){return new Db(e)}function Pb(e){return new Ib(e)}function Bb(e){this._context=e}function zb(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Hb(e){return new Bb(e)}function Fb(e,t){this._context=e,this._t=t}function Ub(e){return new Fb(e,.5)}function jb(e){return new Fb(e,0)}function Vb(e){return new Fb(e,1)}Db.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:Rb(this,this._t0,kb(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,Rb(this,kb(this,n=Nb(this,e,t)),n);break;default:Rb(this,this._t0,n=Nb(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Ib.prototype=Object.create(Db.prototype)).point=function(e,t){Db.prototype.point.call(this,t,e)},Lb.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Bb.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=zb(e),i=zb(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Fb.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}};class Gb extends Yp{zoomIn(e,t,n){let r,i,o;const a=n||Oc;e&&(r=e.x,i=e.y,o=2);const{width:s,height:l}=Zp.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(a.duration).ease(a.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${o}) translate(${-r},${-i})`),this.services.events.dispatchEvent(D.CanvasZoom.CANVAS_ZOOM_IN,{element:$d(e)})}zoomOut(e,t){const n=t||Oc;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(D.CanvasZoom.CANVAS_ZOOM_OUT)}}class Wb extends Yp{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 qb extends Yp{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 Yb extends Yp{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(D.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(xu(Ic,t,"duration")||Ic.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Zb(e,t){const n=+ye(e)-+ye(t);return n<0?-1:n>0?1:n}function Xb(e,t,n){const r=ye(e,void 0);if(isNaN(t))return pe(e,NaN);if(!t)return r;const i=r.getDate(),o=pe(e,r.getTime());return o.setMonth(r.getMonth()+t+1,0),i>=o.getDate()?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function Kb(e,t,n){return Xb(e,12*t)}function Qb(e,t,n){return Kb(e,-t)}function Jb(e,t,n){const[r,i,o]=me(0,e,e,t),a=Zb(i,o),s=Math.abs(function(e,t){const[n,r]=me(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,o));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=Zb(i,o)===-a;(function(e){const t=ye(e,void 0);return+function(e){const t=ye(e,void 0);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=ye(e,void 0),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)})(r)&&1===s&&1===Zb(r,o)&&(l=!1);const c=a*(s-+l);return 0===c?0:c}function ew(e,t,n){return Xb(e,-t)}function tw(e,t){const 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 nw(e,t,n){const r=ye(e,void 0);return isNaN(t)?pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function rw(e,t,n){return nw(e,-t)}function iw(e){return e=>{const t=(0,Math.trunc)(e);return 0===t?0:t}}function ow(e,t,n){return pe(e,+ye(e)+t)}function aw(e,t,n){return ow(e,t*he)}function sw(e,t,n){return aw(e,-t)}function lw(e,t){return+ye(e)-+ye(t)}function cw(e,t,n){const r=lw(e,t)/de;return iw()(r)}function uw(e,t,n){const r=ye(e,void 0);return r.setTime(r.getTime()+t*de),r}function dw(e,t,n){return uw(e,-t)}function hw(e,t,n){const r=lw(e,t)/1e3;return iw()(r)}function fw(e,t,n){return ow(e,1e3*t)}function pw(e,t,n){return fw(e,-t)}class mw extends Yp{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=xu(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=xu(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==e?o=e[r]:t&&t.length>0&&(o=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return xu(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===P.BOTTOM||e===P.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(P).map((e=>P[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!==P.LEFT&&this.rangeAxisPosition!==P.RIGHT||this.domainAxisPosition!==P.BOTTOM&&this.domainAxisPosition!==P.TOP?this.orientation=H.HORIZONTAL:this.orientation=H.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),o=xu(i,"axes");(null!=(e=o[P.LEFT])&&e.correspondingDatasets&&o[P.RIGHT]||null!=(t=o[P.RIGHT])&&t.correspondingDatasets&&o[P.LEFT]||null!=(n=o[P.TOP])&&n.correspondingDatasets&&o[P.BOTTOM]||null!=(r=o[P.BOTTOM])&&r.correspondingDatasets&&o[P.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=xu(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]===F.LINEAR||this.scaleTypes[e]===F.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=[P.BOTTOM,P.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[P.LEFT,P.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(),o=xu(i,"axes")[n],{mapsTo:a}=o,s=null!==xu(r,a)?r[a]:r;let l;switch(t){case F.LABELS:l=e(s)+e.step()/2;break;case F.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(),o=xu(i,"axes")[n],{mapsTo:a}=o,s=void 0!==e[a]?e[a]:e;return[r(null!==xu(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==xu(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 xu(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return xu(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=xu(n,"axes",e);return r.scaleType===F.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return function(e,t){const[n,r]=me(0,e,t),i=Zb(n,r),o=Math.abs(function(e,t){const[n,r]=me(0,e,t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=i*(o-+(Zb(n,r)===-i));return 0===a?0:a}(r,n)>1?[Qb(n,t),Kb(r,t)]:Jb(r,n)>1?[ew(n,t),Xb(r,t)]:function(e,t){const[n,r]=me(0,e,t),i=tw(n,r),o=Math.abs(Mu(n,r));n.setDate(n.getDate()-i*o);const a=i*(o-+(tw(n,r)===-i));return 0===a?0:a}(r,n)>1?[rw(n,t),nw(r,t)]:function(e,t){const[n,r]=me(0,e,t),i=(+n-+r)/he;return iw()(i)}(r,n)>1?[sw(n,t),aw(r,t)]:cw(r,n)>30?[dw(n,30*t),uw(r,30*t)]:cw(r,n)>1?[dw(n,t),uw(r,t)]:hw(r,n)>15?[pw(n,15*t),fw(r,15*t)]:hw(r,n)>1?[pw(n,t),fw(r,t)]:[n,r]}(t,xu(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,o=t<=0&&t+i>0?0:t+i;let a=e>=0&&e-i<0?0:e-i;if(r===F.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,o]}(t,.1,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=xu(e,"axes"),n=this.isDualAxes();return null===xu(t,P.LEFT)&&null!==xu(t,P.RIGHT)||!0===xu(t,P.RIGHT,"main")||n&&xu(t,P.LEFT,"correspondingDatasets")?{primary:P.RIGHT,secondary:P.LEFT}:{primary:P.LEFT,secondary:P.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=xu(e,"axes"),n=this.isDualAxes();return null===xu(t,P.BOTTOM)&&null!==xu(t,P.TOP)||!0===xu(t,P.TOP,"main")||n&&xu(t,P.BOTTOM,"correspondingDatasets")?{primary:P.TOP,secondary:P.BOTTOM}:{primary:P.BOTTOM,secondary:P.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=xu(n,"axes",e.primary),i=xu(n,"axes",t.primary),o=r.scaleType||F.LINEAR,a=i.scaleType||F.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,(!(a===F.LABELS||a===F.TIME)&&o===F.LABELS||o===F.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=xu(t,"axes",e),r=xu(t,"bounds"),{includeZero:i}=n,o=xu(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,So(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 a=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:c,thresholds:u}=n,{reference:d,compareTo:h}=Tc;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return so(a.map((e=>e[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return a.map((e=>`${e[d]}/${e[h]}`));if(o===F.TIME)p=a.map((e=>+new Date(e[l])));else if(r&&t.axes)p=[],a.forEach((e=>{p.push(e[l]),e[r.upperBoundMapsTo]&&p.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&p.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),r=a.filter((t=>!m.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(Qy(t,"sharedStackKey")).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),p=[...Yy(i),...r.map((e=>e[l]))]}else p=[],a.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(p.push(t[0]),p.push(t[1])):(s&&p.push(Math.max(e[l],e[s])),p.push(t))}));return o!==F.TIME&&o!==F.LOG&&i&&p.push(0),u&&u.length>0&&u.forEach((e=>{const t=xu(e,"value");null!==t&&p.push(t)})),f=po(p),f=this.extendsDomain(e,f),f}createScale(e){const t=this.model.getOptions(),n=xu(t,"axes",e);if(!n)return null;const r=xu(n,"scaleType")||F.LINEAR;let i;return this.scaleTypes[e]=r,i=r===F.TIME?Qf():r===F.LOG?ob().base(n.base||10):r===F.LABELS||r===F.LABELS_RATIO?Pd():yc(),i.domain(this.getScaleDomain(e)),i}getDomainLowerBound(e){let t,n=0;return t=this.getOrientation()===H.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===xu(this.model.getOptions(),"axes",e,"includeZero")&&t[0]>0&&t[1]>0&&(n=t[0]),n}getHighestDomainThreshold(){const e=xu(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)===F.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=xu(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 gw extends Yp{constructor(){super(...arguments),this.curveTypes={curveLinear:hp,curveLinearClosed:mp,curveBasis:lb,curveBasisClosed:ub,curveBasisOpen:hb,curveBundle:pb,curveCardinal:vb,curveCardinalClosed:bb,curveCardinalOpen:Eb,curveCatmullRom:Tb,curveCatmullRomClosed:Ob,curveCatmullRomOpen:Mb,curveMonotoneX:$b,curveMonotoneY:Pb,curveNatural:Hb,curveStep:Ub,curveStepAfter:Vb,curveStepBefore:jb}}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 vw extends Yp{isZoomBarEnabled(){if(!this.services.cartesianScales||!xu(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=xu(this.model.getOptions(),"axes",e,"scaleType");return e===P.BOTTOM&&t===F.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(),o=xu(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,po(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(D.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return xu(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),o=xu(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(o.length>0)return o}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=Lc.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const o=i(n[0]),a=i(n[1]);if(a-o<r+1)return;const s=i.range(),l=a-o,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=o+c,d=a-c;u>=d&&(u=o+l/2-r/2,d=a-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]),o=n.range(),a=(o[1]-o[0])/2*(e/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[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())<xu(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 xu(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return xu(this.model.getOptions(),"zoomBar",e,"locked")}}var yw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function bw(e){return yw.test(e)}var ww="\\ud800-\\udfff",Ew="["+ww+"]",_w="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",xw="\\ud83c[\\udffb-\\udfff]",Tw="[^"+ww+"]",Sw="(?:\\ud83c[\\udde6-\\uddff]){2}",Ow="[\\ud800-\\udbff][\\udc00-\\udfff]",Aw="(?:"+_w+"|"+xw+")?",Mw="[\\ufe0e\\ufe0f]?",Cw=Mw+Aw+"(?:\\u200d(?:"+[Tw,Sw,Ow].join("|")+")"+Mw+Aw+")*",Nw="(?:"+[Tw+_w+"?",_w,Sw,Ow,Ew].join("|")+")",kw=RegExp(xw+"(?="+xw+")|"+Nw+Cw,"g");var Rw=function(e){var t=bw(e=Nn(e))?function(e){return bw(e)?function(e){return e.match(kw)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return Zy(e,1,n=void 0===n?r:n)}(t).join(""):e.slice(1);return n.toUpperCase()+r};Sm((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return Rw(Nn(e).toLowerCase())}(t):t)}));class Dw{constructor(e,t){this.components=[],this.services={canvasZoom:Gb,domUtils:Zp,events:Wb,files:qb,gradientUtils:Xp,transitions:Yb},this.model=new xd(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(D.Model.UPDATE,(e=>{const t=!!xu(e,"detail","animate");this.update(t)})),this.model.setData(t.data),this.services.events.addEventListener(D.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(D.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=xu(n,"toolbar","enabled"),i={id:"legend",components:[new cy(this.model,this.services)],growth:q.PREFERRED},o=xu(n,"canvasZoom","enabled");o&&!0===o&&e.push(new dy(this.model,this.services));const a=!!this.model.getOptions().title,s={id:"title",components:[new ly(this.model,this.services)],growth:q.STRETCH},l={id:"toolbar",components:[new ry(this.model,this.services)],growth:q.PREFERRED},c={id:"header",components:[new oy(this.model,this.services,[s,...r?[l]:[]],{direction:W.ROW,alignItems:Y.CENTER})],growth:q.PREFERRED},u={id:"graph-frame",components:e,growth:q.STRETCH,renderType:xu(t,"graphFrameRenderType")||I.SVG},d=!0!==xu(t,"excludeLegend")&&!1!==n.legend.enabled;let h=W.COLUMN;if(d){const e=xu(n,"legend","position");"left"===e?(h=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===e?(h=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===e&&(h=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new ay(this.model,this.services)],growth:q.PREFERRED},p={id:"full-frame",components:[new oy(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:q.STRETCH},m=[];if(a||r){m.push(c);const e={id:"spacer",components:[new ay(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};m.push(e)}return m.push(p),[new vy(this.model,this.services),new sy(this.model,this.services),new oy(this.model,this.services,m,{direction:W.COLUMN})]}}class Iw extends Dw{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:mw,curves:gw,zoom:vw}),this.model=new Td(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=xu(n,"zoomBar",P.TOP,"enabled"),i=xu(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),a=xu(n,"axes",o,"scaleType"),s=r&&o===P.BOTTOM&&a===F.TIME,l=this.services.zoom.isZoomBarLocked(P.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new ly(this.model,this.services)],growth:q.STRETCH},d={id:"toolbar",components:[new ry(this.model,this.services)],growth:q.PREFERRED},h={id:"header",components:[new oy(this.model,this.services,[u,...i?[d]:[]],{direction:W.ROW,alignItems:Y.CENTER})],growth:q.PREFERRED},f={id:"legend",components:[new cy(this.model,this.services)],growth:q.PREFERRED};s&&!l&&e.push(new uy(this.model,this.services),new by(this.model,this.services)),e.push(new Ey(this.model,this.services)),e.push(new _y(this.model,this.services));const p={id:"graph-frame",components:e,growth:q.STRETCH,renderType:I.SVG},m=!1!==xu(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const e=xu(this.model.getOptions(),"legend","position");e===U.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new ay(this.model,this.services)],growth:q.PREFERRED},y={id:"full-frame",components:[new oy(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:q.STRETCH},b={id:"zoom-bar",components:[new wy(this.model,this.services)],growth:q.PREFERRED,renderType:I.SVG},w=[];if(c||i){w.push(h);const e={id:"spacer",components:[new ay(this.model,this.services,i?{size:15}:void 0)],growth:q.PREFERRED};w.push(e)}return s&&w.push(b),w.push(y),[new xy(this.model,this.services),new sy(this.model,this.services),new oy(this.model,this.services,w,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class Lw extends Iw{constructor(e,t){super(e,t),this.model.setOptions(function(e,t){var n;const r=ci(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://charts.carbondesignsystem.com/"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===F.TIME?n.mapsTo="date":e===F.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return _u(r,t),no(r,t)}(bu.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new Ly(this.model,this.services),new Cy(this.model,this.services),new ky(this.model,this.services),new Ny(this.model,this.services),new Ry(this.model,this.services,{handleThresholds:!0}),new By(this.model,this.services),new Py(this.model,this.services)];return this.getAxisChartComponents(e)}}class $w extends r.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",r.createRef())}createChart(e,t,n){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(e){var t,n;this.props.data!==e.data&&(null==(t=this.chart)||t.model.setData(this.props.data)),this.props.options!==e.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return r.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class Pw extends $w{createChart(e,t,n){return new Lw(e,{data:t,options:n})}}var Bw;Bw||(Bw=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}({exports:{}}))}}]);
|
|
2
|
+
(globalThis.webpackChunk_openmrs_esm_patient_vitals_app=globalThis.webpackChunk_openmrs_esm_patient_vitals_app||[]).push([[3368],{9247:(e,t,n)=>{"use strict";function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{A:()=>p});var s=["width","height","viewBox"],l=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(9067),d=n.n(u),h=n(1343),f=n.n(h);const p=f().forwardRef((function(e,t){let{className:n,children:r,tabIndex:i,xmlns:u="http://www.w3.org/2000/svg",preserveAspectRatio:d="xMidYMid meet",...h}=e;const{tabindex:p,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,i=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=a(e,s),d=u.tabindex,h=a(u,l),f=o(o(o({},c),h),{},{width:t,height:n,viewBox:i});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}({...h,tabindex:i}),g=m;return n&&(g.className=n),null!=p&&(g.tabIndex="number"==typeof p?p:Number(i)),t&&(g.ref=t),u&&(g.xmlns=u),d&&(g.preserveAspectRatio=d),f().createElement("svg",g,r)}));p.displayName="Icon",p.propTypes={"aria-hidden":d().oneOfType([d().bool,d().oneOf(["true","false"])]),"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().oneOfType([d().number,d().string]),viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string}},5848:(e,t,n)=>{"use strict";n.d(t,{Do:()=>E,OM:()=>v,Qp:()=>w,j0:()=>b,on:()=>y});var r,i,o,a,s,l,c,u,d,h,f,p=n(1343),m=n.n(p),g=n(9247);const v=m().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return m().createElement(g.A,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=m().createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),n)})),y=m().forwardRef((function(e,t){let{children:n,size:r=16,...a}=e;return m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...a},i||(i=m().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"})),o||(o=m().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)})),b=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},a||(a=m().createElement("path",{d:"M4,2H2V28a2,2,0,0,0,2,2H30V28H4Z"})),s||(s=m().createElement("path",{d:"M30,9H23v2h3.59L19,18.59l-4.29-4.3a1,1,0,0,0-1.42,0L6,21.59,7.41,23,14,16.41l4.29,4.3a1,1,0,0,0,1.42,0L28,12.41V16h2Z"})),n)})),w=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},l||(l=m().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?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},c||(c=m().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?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},u||(u=m().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):m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},d||(d=m().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)})),E=m().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},h||(h=m().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):m().createElement(g.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},f||(f=m().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)}))},4389:(e,t,n)=>{"use strict";n.d(t,{NA:()=>l,XI:()=>c});var r,i,o=n(1343),a=n.n(o),s=n(9247);const l=a().forwardRef((function(e,t){let{children:n,size:i=16,...o}=e;return a().createElement(s.A,{width:i,height:i,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},r||(r=a().createElement("path",{d:"M8 15H24V17H8z"})),n)})),c=a().forwardRef((function(e,t){let{children:n,size:r=16,...o}=e;return a().createElement(s.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...o},i||(i=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)}))},5951:(e,t,n)=>{"use strict";n.d(t,{BF:()=>x,N5:()=>E,OR:()=>_});var r,i,o,a,s,l,c,u,d,h,f,p,m,g,v,y=n(1343),b=n.n(y),w=n(9247);const E=b().forwardRef((function(e,t){let{children:n,size:s=16,...l}=e;return 16===s||"16"===s||"16px"===s?b().createElement(w.A,{width:s,height:s,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...l},r||(r=b().createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M8,14c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S11.3,14,8,14z"})),i||(i=b().createElement("path",{d:"M7.5 4H8.5V9H7.5zM8 10.2c-.4 0-.8.3-.8.8s.3.8.8.8c.4 0 .8-.3.8-.8S8.4 10.2 8 10.2z"})),n):b().createElement(w.A,{width:s,height:s,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...l},o||(o=b().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"})),a||(a=b().createElement("path",{d:"M15 8H17V19H15zM16 22a1.5 1.5 0 101.5 1.5A1.5 1.5 0 0016 22z"})),n)})),_=b().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},s||(s=b().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"})),l||(l=b().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"})),c||(c=b().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)})),x=b().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},u||(u=b().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"})),d||(d=b().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?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},h||(h=b().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"})),f||(f=b().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?b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},p||(p=b().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"})),m||(m=b().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):b().createElement(w.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},g||(g=b().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"})),v||(v=b().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)}))},4698:(e,t,n)=>{"use strict";n.d(t,{$nd:()=>ze,Te$:()=>Fe,k_N:()=>He,VPZ:()=>ut,Tps:()=>Ke,bQt:()=>vo,OOb:()=>et,lVW:()=>tt,lRv:()=>ot,aMY:()=>Vn,OuH:()=>Gt,jeF:()=>wn,Q7x:()=>Nn,Rzj:()=>En,fI1:()=>at,BJc:()=>Fn,ozo:()=>vr,O7s:()=>mr,KpK:()=>br,T2N:()=>wr,XIK:()=>Fr,BFY:()=>Yr,nA6:()=>Zr,K3K:()=>Jr,ndF:()=>oi,A0N:()=>hi,Hjg:()=>fi,jGn:()=>fr,vwO:()=>Tr,fs1:()=>Sr});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_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_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?r.enableV12TileRadioIcons=!0:r.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?r.enableV12Overflowmenu=!0:r.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?r.enableTreeviewControllable=!0:r.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?r.enableV12StructuredListVisibleIcons=!0:r.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?r.enableExperimentalFocusWrapWithoutSentinels=!0:r.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?r.enableDialogElement=!0:r.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?r.enableV12DynamicFloatingStyles=!0:r.enableV12DynamicFloatingStyles=!1}catch(e){r.enableCssCustomProperties=!1,r.enableCssGrid=!1,r.enableV11Release=!0,r.enableExperimentalTileContrast=!1,r.enableV12TileDefaultIcons=!1,r.enableV12TileRadioIcons=!1,r.enableV12Overflowmenu=!1,r.enableTreeviewControllable=!1,r.enableV12StructuredListVisibleIcons=!1,r.enableExperimentalFocusWrapWithoutSentinels=!1,r.enableDialogElement=!1,r.enableV12DynamicFloatingStyles=!1}var i=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:r.enableCssCustomProperties},{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-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:r.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:r.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:r.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:r.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:r.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:r.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:r.enableV12DynamicFloatingStyles}];function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,l(r.key),r)}}function s(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,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||c(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 l(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function c(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.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)?o(e,t):void 0}}for(var u=function(){return e=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])}))},t=[{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){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=c(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}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 i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=s(t.value,2),i=r[0],o=r[1];this.flags.has(i)||this.flags.set(i,o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),d=new u(void 0),h=0;h<i.length;h++){var f=i[h];d.add(f.name,f.enabled)}function p(){return d.enabled.apply(d,arguments)}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(null,arguments)}!function(){d.merge.apply(d,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var v=n(9067),y=n.n(v),b=n(1343),w=n.t(b,2),E=n.n(b),_=n(3373),x=n.n(_);const T={};function S(e,t,n){return function(r,i,o){if(void 0!==r[i]){if(!T[o]||!T[o][i]){T[o]={...T[o],[i]:!0};const e=r[i];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];return e(r,i,o,...s)}}}const O="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,A=e=>(0,b.useCallback)((t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e),M=E().createContext("cds");function C(){return E().useContext(M)}function N(e,t,n){const r=(0,b.useRef)(null);(0,b.useEffect)((()=>{r.current=n}),[n]),(0,b.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 k(e,t){const n=(0,b.useRef)(null);(0,b.useEffect)((()=>{n.current=t}),[t]),(0,b.useEffect)((()=>{function t(e){n.current&&n.current(e)}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}}),[e])}function R(e){return!("undefined"==typeof window)&&(e instanceof Element||e instanceof(t=e,(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window).Element);var t,n}n(1085);var D=n(3144),I=n(793),L="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;function $(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!$(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(!("_owner"===n&&e.$$typeof||$(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function P(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B(e,t){const n=P(e);return Math.round(t*n)/n}function z(e){const t=b.useRef(e);return L((()=>{t.current=e})),t}const H=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,I.UE)({element:n.current,padding:r}).fn(t):{}:n?(0,I.UE)({element:n,padding:r}).fn(t):{};var i}}),F=(e,t)=>({...(0,I.UU)(e),options:[e,t]}),U=(e,t)=>({...(0,I.jD)(e),options:[e,t]}),j=(e,t)=>({...H(e),options:[e,t]});const V={...w},G=V.useInsertionEffect||(e=>e());var W="undefined"!=typeof document?b.useLayoutEffect:b.useEffect;let q=!1,Y=0;const Z=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Y++,X=V.useId||function(){const[e,t]=b.useState((()=>q?Z():void 0));return W((()=>{null==e&&t(Z())}),[]),b.useEffect((()=>{q=!0}),[]),e};const K=b.createContext(null),Q=b.createContext(null);function J(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=X(),o=b.useRef({}),[a]=b.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),s=null!=((null==(f=b.useContext(K))?void 0:f.id)||null),[l,c]=b.useState(r.reference),u=function(e){const t=b.useRef((()=>{}));return G((()=>{t.current=e})),b.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),d=b.useMemo((()=>({setPositionReference:c})),[]),h=b.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);var f;return b.useMemo((()=>({dataRef:o,open:t,onOpenChange:u,elements:h,events:a,floatingId:i,refs:d})),[t,u,h,a,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=b.useState(null),[s,l]=b.useState(null),c=(null==i?void 0:i.domReference)||o,u=b.useRef(null),d=b.useContext(Q);W((()=>{c&&(u.current=c)}),[c]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=b.useState(r);$(h,r)||f(r);const[p,m]=b.useState(null),[g,v]=b.useState(null),y=b.useCallback((e=>{e!==x.current&&(x.current=e,m(e))}),[]),w=b.useCallback((e=>{e!==T.current&&(T.current=e,v(e))}),[]),E=o||p,_=a||g,x=b.useRef(null),T=b.useRef(null),S=b.useRef(u),O=null!=l,A=z(l),M=z(i),C=z(c),N=b.useCallback((()=>{if(!x.current||!T.current)return;const e={placement:t,strategy:n,middleware:h};M.current&&(e.platform=M.current),(0,I.rD)(x.current,T.current,e).then((e=>{const t={...e,isPositioned:!1!==C.current};k.current&&!$(S.current,t)&&(S.current=t,D.flushSync((()=>{d(t)})))}))}),[h,t,n,M,C]);L((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const k=b.useRef(!1);L((()=>(k.current=!0,()=>{k.current=!1})),[]),L((()=>{if(E&&(x.current=E),_&&(T.current=_),E&&_){if(A.current)return A.current(E,_,N);N()}}),[E,_,N,A,O]);const R=b.useMemo((()=>({reference:x,floating:T,setReference:y,setFloating:w})),[y,w]),H=b.useMemo((()=>({reference:E,floating:_})),[E,_]),F=b.useMemo((()=>{const e={position:n,left:0,top:0};if(!H.floating)return e;const t=B(H.floating,u.x),r=B(H.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...P(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,H.floating,u.x,u.y]);return b.useMemo((()=>({...u,update:N,refs:R,elements:H,floatingStyles:F})),[u,N,R,H,F])}({...e,elements:{...i,...s&&{reference:s}}}),f=b.useCallback((e=>{const t=R(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),p=b.useCallback((e=>{(R(e)||null===e)&&(u.current=e,a(e)),(R(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!R(e))&&h.refs.setReference(e)}),[h.refs]),m=b.useMemo((()=>({...h.refs,setReference:p,setPositionReference:f,domReference:u})),[h.refs,p,f]),g=b.useMemo((()=>({...h.elements,domReference:c})),[h.elements,c]),v=b.useMemo((()=>({...h,...r,refs:m,elements:g,nodeId:t})),[h,m,g,t,r]);return W((()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),b.useMemo((()=>({...h,context:v,refs:m,elements:g})),[h,m,g,v])}const ee={};function te(e,t){return function(t,n,r){if(void 0!==t[n]){ee[r]&&ee[r][n]||(ee[r]={...ee[r],[n]:!0});for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e(t,n,r,...o)}}}const ne=(0,b.createContext)(d);function re(e){return(0,b.useContext)(ne).enabled(e)}y().node,te(y().objectOf(y().bool)),y().bool,y().bool,y().bool,y().bool,y().bool,y().bool,y().bool;const ie=E().createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),oe=E().forwardRef((function(e,t){let{isTabTip:n,align:r=(n?"bottom-start":"bottom"),as:i="span",autoAlign:o=!1,autoAlignBoundary:a,caret:s=!n,className:l,children:c,dropShadow:u=!0,highContrast:d=!1,onRequestClose:h,open:f,alignmentAxisOffset:p,...m}=e;const v=C(),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(null),T=re("enable-v12-dynamic-floating-styles")||o;let S=function(e){switch(e){case"top-left":return"top-start";case"top-right":return"top-end";case"bottom-left":return"bottom-start";case"bottom-right":return"bottom-end";case"left-bottom":return"left-end";case"left-top":return"left-start";case"right-bottom":return"right-end";case"right-top":return"right-start";default:return e}}(r);k("blur",(()=>{f&&h?.()})),k("click",(e=>{f&&!_?.current?.contains(e.target)&&h?.()}));const M=E().Children.toArray(c).some((e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label")))?7:6,N=(0,b.useRef)({offset:10,caretHeight:M});O((()=>{if(s&&_.current){const e=window.getComputedStyle(_.current,null),t=e.getPropertyValue("--cds-popover-offset"),n=e.getPropertyValue("--cds-popover-caret-height");t&&(N.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(N.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}}));const{refs:R,floatingStyles:D,placement:L,middlewareData:$}=J(T?{placement:S,strategy:"fixed",middleware:[(P=n?0:{alignmentAxis:p,mainAxis:N?.current?.offset},{...(0,I.cY)(P),options:[P,undefined]}),o&&F({fallbackPlacements:S.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:a}),j({element:w}),o&&U()],whileElementsMounted:I.ll}:{});var P;const B=(0,b.useMemo)((()=>({floating:y,setFloating:R.setFloating,caretRef:w,autoAlign:o})),[R.setFloating,o]);n&&(["bottom-start","bottom-end"].includes(S)||(S="bottom-start")),(0,b.useEffect)((()=>{if(T){const e={...D,visibility:$.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach((t=>{R.floating.current&&(R.floating.current.style[t]=e[t])})),s&&$&&$.arrow&&w?.current){const{x:e,y:t}=$.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[L.split("-")[0]];w.current.style.left=null!=e?`${e}px`:"",w.current.style.top=null!=t?`${t}px`:"",w.current.style.right="",w.current.style.bottom="",n&&(w.current.style[n]=-N?.current?.caretHeight+"px")}}}),[D,R.floating,T,$,L,s]);const z=A([t,_]),H=o&&L!==S?L:S,V=x()({[`${v}--popover-container`]:!0,[`${v}--popover--caret`]:s,[`${v}--popover--drop-shadow`]:u,[`${v}--popover--high-contrast`]:d,[`${v}--popover--open`]:f,[`${v}--popover--auto-align ${v}--autoalign`]:T,[`${v}--popover--${H}`]:!0,[`${v}--popover--tab-tip`]:n},l),G=E().Children.map(c,(e=>{const t=e,r=t?.type?.displayName,i="button"===t?.type,o=T&&r&&["ToggletipButton"].includes(r),a=T&&!["ToggletipContent","PopoverContent"].includes(r);if(E().isValidElement(t)&&(i||o||a)){const e=t?.props?.className,r=(t?.props).ref,i=x()(`${v}--popover--tab-tip__button`,e);return E().cloneElement(t,{className:n&&"button"===t?.type?i:e||"",ref:e=>{(T&&"PopoverContent"!==t?.type?.displayName||T&&"ToggletipButton"===t?.type?.displayName)&&R.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return t})),W=i;return E().createElement(ie.Provider,{value:B},E().createElement(W,g({},m,{className:V,ref:z}),T||n?G:c))}));function ae(e,t){let{className:n,children:r,...i}=e;const o=C(),{setFloating:a,caretRef:s,autoAlign:l}=E().useContext(ie),c=A([a,t]),u=re("enable-v12-dynamic-floating-styles")||l;return E().createElement("span",g({},i,{className:`${o}--popover`}),E().createElement("span",{className:x()(`${o}--popover-content`,n),ref:c},r,u&&E().createElement("span",{className:x()({[`${o}--popover-caret`]:!0,[`${o}--popover--auto-align`]:!0}),ref:s})),!u&&E().createElement("span",{className:x()({[`${o}--popover-caret`]:!0}),ref:s}))}oe.propTypes={align:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),as:y().oneOfType([y().string,y().elementType]),autoAlign:y().bool,autoAlignBoundary:y().oneOfType([y().oneOf(["clippingAncestors"]),y().elementType,y().arrayOf(y().elementType),y().exact({x:y().number.isRequired,y:y().number.isRequired,width:y().number.isRequired,height:y().number.isRequired})]),caret:y().bool,children:y().node,className:y().string,dropShadow:y().bool,highContrast:y().bool,isTabTip:y().bool,onRequestClose:y().func,open:y().bool.isRequired};const se=E().forwardRef(ae);se.displayName="PopoverContent",se.propTypes={children:y().node,className:y().string};const le={key:"Tab",which:9,keyCode:9,code:"Tab"},ce={key:"Enter",which:13,keyCode:13,code:"Enter"},ue={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},de={key:" ",which:32,keyCode:32,code:"Space"},he={key:"End",which:35,keyCode:35,code:"Numpad1"},fe={key:"Home",which:36,keyCode:36,code:"Numpad7"},pe={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},me={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},ge={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},ve={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},ye={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},be=(e,t)=>{for(let n=0;n<t.length;n++)if(we(e,t[n]))return!0;return!1},we=(e,t)=>{let{key:n,which:r,keyCode:i,code:o}=t;return"string"==typeof e?e===n:"number"==typeof e?e===r||e===i:e.key&&Array.isArray(n)?n.includes(e.key):e.key===n||e.which===r||e.keyCode===i||e.code===o};function Ee(){let e=0;return function(){return++e}}const _e=!("undefined"==typeof window||!window.document||!window.document.createElement),xe=E().createContext(null);function Te(){return E().useContext(xe)}const Se={...E()},Oe=Ee(),Ae=_e?b.useLayoutEffect:b.useEffect;let Me=!1;const Ce=Se.useId?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=Te();return`${t?`${t}-`:""}${e}-${Se.useId()}`}:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";const t=Te(),[n,r]=(0,b.useState)((()=>Me?`${t?`${t}-`:""}${e}-${Oe()}`:null));return Ae((()=>{null===n&&r(`${t?`${t}-`:""}${e}-${Oe()}`)}),[Oe]),(0,b.useEffect)((()=>{!1===Me&&(Me=!0)}),[]),n};function Ne(e){if(!e||!e.childNodes)return null;if(function(e){if(void 0===e.tabIndex||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;default:return!0}}(e))return e;for(const t of e.childNodes){const e=Ne(t);if(e)return e}return null}const ke=new Set(["mouseup","touchend","touchcancel"]),Re=E().forwardRef(((e,t)=>{let{as:n,align:r="top",className:i,children:o,label:a,description:s,enterDelayMs:l=100,leaveDelayMs:c=300,defaultOpen:u=!1,closeOnActivation:d=!1,dropShadow:h=!1,highContrast:f=!0,...p}=e;(0,b.useRef)(null);const[m,v]=function(e){const[t,n]=(0,b.useState)(e),r=(0,b.useRef)(null),i=(0,b.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,b.useEffect)((()=>()=>{window.clearTimeout(r.current??void 0)}),[]),[t,i]}(u),[y,w]=(0,b.useState)(!1),[_,T]=(0,b.useState)(!1),[S,A]=(0,b.useState)(!1),M=Ce("tooltip"),N=C(),k=E().Children.only(o),R={onFocus:()=>!_&&v(!0),onBlur:()=>{v(!1),T(!1)},onClick:()=>d&&v(!1),onMouseEnter:I,onMouseLeave:L,onMouseDown:function(){T(!0),$()},onMouseMove:function(e){1===e.buttons?w(!0):w(!1)},onTouchStart:$};a?R["aria-labelledby"]=M:R["aria-describedby"]=M;const D=(0,b.useCallback)((e=>{m&&we(e,ue)&&(e.stopPropagation(),v(!1)),m&&d&&(we(e,ce)||we(e,de))&&v(!1)}),[d,m,v]);function I(){p?.onMouseEnter||(A(!0),v(!0,l))}function L(){A(!1),y||v(!1,c)}function $(){w(!0)}O((()=>{if(m)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){we(e,ue)&&D(e)}}),[m,D]);const P=(0,b.useCallback)((()=>{w(!1),S||v(!1,c)}),[S,c,v]);return(0,b.useEffect)((()=>(y&&ke.forEach((e=>{document.addEventListener(e,P)})),()=>{ke.forEach((e=>{document.removeEventListener(e,P)}))})),[y,P]),E().createElement(oe,g({as:n,ref:t},p,{align:r,className:x()(`${N}--tooltip`,i),dropShadow:h,highContrast:f,onKeyDown:D,onMouseLeave:L,open:m}),E().createElement("div",{className:`${N}--tooltip-trigger__wrapper`},void 0!==k?E().cloneElement(k,{...R,...function(e){const t=Object.keys(R).filter((e=>e.startsWith("on"))),n={};return t.forEach((t=>{n[t]=n=>{R[t](n),e?.[t]&&e?.[t](n)}})),n}(k.props)}):null),E().createElement(se,{"aria-hidden":m?"false":"true",className:`${N}--tooltip-content`,id:M,onMouseEnter:I,role:"tooltip"},a||s))}));Re.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:y().node,className:y().string,closeOnActivation:y().bool,defaultOpen:y().bool,description:y().node,dropShadow:y().bool,enterDelayMs:y().number,highContrast:y().bool,label:y().node,leaveDelayMs:y().number};const De=E().forwardRef((function(e,t){let{as:n,children:r,className:i,dangerDescription:o="danger",disabled:a=!1,hasIconOnly:s=!1,href:l,iconDescription:c,isExpressive:u=!1,isSelected:d,kind:h="primary",onBlur:f,onClick:p,onFocus:m,onMouseEnter:g,onMouseLeave:v,renderIcon:y,size:b,tabIndex:w,type:_="button",...T}=e;const S=C(),O={tabIndex:w,className:x()(i,{[`${S}--btn`]:!0,[`${S}--btn--sm`]:"sm"===b&&!u,[`${S}--btn--md`]:"md"===b&&!u,[`${S}--btn--lg`]:"lg"===b&&!u,[`${S}--btn--xl`]:"xl"===b,[`${S}--btn--2xl`]:"2xl"===b,[`${S}--layout--size-${b}`]:b,[`${S}--btn--${h}`]:h,[`${S}--btn--disabled`]:a,[`${S}--btn--expressive`]:u,[`${S}--btn--icon-only`]:s,[`${S}--btn--selected`]:s&&d&&"ghost"===h}),ref:t},A=y?E().createElement(y,{"aria-label":c,className:`${S}--btn__icon`,"aria-hidden":"true"}):null,M=["danger","danger--tertiary","danger--ghost"];let N="button";const k=Ce("danger-description"),{"aria-pressed":R,"aria-describedby":D}=T;let I={disabled:a,type:_,"aria-describedby":M.includes(h)?k:D||void 0,"aria-pressed":R??(s&&"ghost"===h?d:void 0)};const L={href:l};let $=null;return M.includes(h)&&($=E().createElement("span",{id:k,className:`${S}--visually-hidden`},o)),n?(N=n,I={...I,...L}):l&&!a&&(N="a",I=L),E().createElement(N,{onMouseEnter:g,onMouseLeave:v,onFocus:m,onBlur:f,onClick:p,...T,...O,...I},$,r,A)})),Ie=E().forwardRef((function(e,t){let{className:n,count:r,...i}=e;const o=C(),a=x()(`${o}--badge-indicator`,n,{[`${o}--badge-indicator--count`]:r}),s=r&&r>999?"999+":r;return E().createElement("div",g({className:a,ref:t},i),s)}));Ie.propTypes={className:y().string,count:y().number,id:y().string};const Le=["primary","secondary","ghost","tertiary"],$e=E().forwardRef((function(e,t){let{align:n,autoAlign:r=!1,badgeCount:i,children:o,className:a,closeOnActivation:s=!0,defaultOpen:l=!1,disabled:c,dropShadow:u=!1,enterDelayMs:d=100,highContrast:h=!0,kind:f,label:p,leaveDelayMs:m=100,wrapperClasses:v,size:y,isSelected:b,...w}=e;const _=C(),T=x()(v,`${_}--icon-tooltip`,{[`${_}--icon-tooltip--disabled`]:c});!i||"ghost"===f&&"lg"===y||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const S=Ce("badge-indicator");return E().createElement(Re,{align:n,autoAlign:r,closeOnActivation:s,className:T,defaultOpen:l,dropShadow:u,enterDelayMs:d,highContrast:h,label:p,leaveDelayMs:m},E().createElement(De,g({},w,{disabled:c,kind:f,ref:t,size:y,isSelected:b,hasIconOnly:!0,className:a,"aria-describedby":i&&S}),o,!c&&void 0!==i&&E().createElement(Ie,{id:S,count:i>0?i:void 0})))}));$e.propTypes={align:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),autoAlign:y().bool,badgeCount:y().number,href:y().string,children:y().node,className:y().string,closeOnActivation:y().bool,defaultOpen:y().bool,dropShadow:y().bool,disabled:y().bool,enterDelayMs:y().number,isSelected:y().bool,highContrast:y().bool,kind:y().oneOf(Le),label:y().node.isRequired,leaveDelayMs:y().number,rel:y().string,size:y().oneOf(["sm","md","lg"]),target:y().string,wrapperClasses:y().string};const Pe=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)}},Be=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],ze=E().forwardRef(((e,t)=>{const n=(0,b.useRef)(null),{as:r,autoAlign:i=!1,children:o,hasIconOnly:a=!1,tooltipHighContrast:s=!0,tooltipDropShadow:l=!1,iconDescription:c,kind:u="primary",onBlur:d,onClick:h,onFocus:f,onMouseEnter:p,onMouseLeave:m,renderIcon:v,size:y,tooltipAlignment:w="center",tooltipPosition:_="top",...x}=e,T=e=>{e.target===n.current&&e.preventDefault()},S=v?E().createElement(v,null):null;if(function(e){return!0===e}(a)){let e;return"top"!==_&&"bottom"!==_||("center"===w&&(e=_),"end"===w&&(e=`${_}-end`),"start"===w&&(e=`${_}-start`)),"right"!==_&&"left"!==_||(e=_),E().createElement($e,g({},x,{ref:t,as:r,align:e,label:c,kind:u,size:y,highContrast:s,dropShadow:l,onMouseEnter:p,onMouseLeave:m,onFocus:f,onBlur:d,autoAlign:i,onClick:Pe([h,T]),renderIcon:S?null:v}),S??o)}{const{tooltipAlignment:n,...r}=e;return E().createElement(De,g({ref:t},r))}}));ze.displayName="Button",ze.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),autoAlign:y().bool,children:y().node,className:y().string,dangerDescription:y().string,disabled:y().bool,hasIconOnly:y().bool,href:y().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:y().bool,isSelected:y().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,i=r?Le:Be;return void 0===e[t]||i.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${i.join(", ")}.`)},onBlur:y().func,onClick:y().func,onFocus:y().func,onMouseEnter:y().func,onMouseLeave:y().func,rel:y().string,renderIcon:y().oneOfType([y().func,y().object]),role:y().string,size:y().oneOf(["sm","md","lg","xl","2xl"]),tabIndex:y().number,target:y().string,tooltipAlignment:y().oneOf(["start","center","end"]),tooltipDropShadow:y().bool,tooltipHighContrast:y().bool,tooltipPosition:y().oneOf(["top","right","bottom","left"]),type:y().oneOf(["button","reset","submit"])};const He=e=>{let{className:t,small:n=!1,href:r,size:i="lg",...o}=e;const a=C(),s={className:x()(t,{[`${a}--skeleton`]:!0,[`${a}--btn`]:!0,[`${a}--btn--sm`]:n||"sm"===i,[`${a}--btn--md`]:"md"===i,[`${a}--btn--lg`]:"lg"===i,[`${a}--btn--xl`]:"xl"===i,[`${a}--btn--2xl`]:"2xl"===i}),...o},l=E().createElement("div",s),c=E().createElement("a",g({},s,{href:r,role:"button"}));return r?c:l};He.propTypes={className:y().string,href:y().string,size:y().oneOf(["sm","md","lg","xl","2xl"]),small:y().bool};const Fe=E().forwardRef((function(e,t){let{children:n,className:r,stacked:i,...o}=e;const a=C(),s=x()(r,`${a}--btn-set`,{[`${a}--btn-set--stacked`]:i});return E().createElement("div",g({},o,{className:s,ref:t}),n)}));Fe.displayName="ButtonSet",Fe.propTypes={children:y().node,className:y().string,stacked:y().bool};const Ue=e=>{const t=t=>E().createElement(e,t),n=e.displayName||e.name;return t.displayName=`ClassWrapper(${n})`,t},je=["xs","sm","md","lg","xl","2xl"],Ve=["condensed","normal"];E().forwardRef((function(e,t){let{as:n="div",children:r,className:i,density:o,size:a,...s}=e;const l=C(),c=x()(i,`${l}--layout`,{[`${l}--layout--size-${a}`]:a&&je.includes(a),[`${l}--layout--density-${o}`]:o&&Ve.includes(o)});return E().createElement(n,g({},s,{ref:t,className:c}),r)})).propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node,className:y().string,density:y().oneOf(Ve),size:y().oneOf(je)};const Ge=E().forwardRef((function(e,t){let{as:n="div",children:r,className:i,density:o,size:a,...s}=e;const l=C(),c=x()(i,Object.entries({size:a,density:o}).map((e=>{let[t,n]=e;return{[`${l}--layout-constraint--${t}__default-${n?.default}`]:n?.default,[`${l}--layout-constraint--${t}__min-${n?.min}`]:n?.min,[`${l}--layout-constraint--${t}__max-${n?.max}`]:n?.max}})));return E().createElement(n,g({},s,{ref:t,className:c}),r)}));Ge.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node,className:y().string,density:y().shape({min:y().oneOf(Ve),default:y().oneOf(Ve),max:y().oneOf(Ve)}),size:y().shape({min:y().oneOf(je),default:y().oneOf(je),max:y().oneOf(je)})};const We="undefined"!=typeof Node?Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS:0,qe="undefined"!=typeof Node?Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY:0,Ye="\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",Ze=()=>{};class Xe extends E().Component{constructor(){super(...arguments),m(this,"_switchRefs",[]),m(this,"state",{selectedIndex:void 0}),m(this,"handleItemRef",(e=>t=>{this._switchRefs[e]=t})),m(this,"handleChildChange",(e=>{const{selectionMode:t="automatic"}=this.props,{selectedIndex:n}=this.state,{index:r}=e,{key:i}=e;if(be(e,[ge,pe])){const n=((e,t,n)=>we(e,ge)?(t+1)%n:we(e,pe)?(t+n-1)%n:void 0)(i,r,this.props.children?.length),o=E().Children.toArray(this.props.children);if("manual"===t){const e=this._switchRefs[n];e&&e.focus()}else this.setState({selectedIndex:n},(()=>{if("number"!=typeof this.state.selectedIndex)return;const t=o[this.state.selectedIndex],n=this._switchRefs[this.state.selectedIndex];n&&n.focus(),this.props.onChange({...e,index:this.state.selectedIndex,name:t.props.name,text:t.props.text})}))}else n!==r&&this.setState({selectedIndex:r},(()=>{const t=this._switchRefs[r];t&&t.focus(),this.props.onChange(e)}))}))}static getDerivedStateFromProps(e,t){let{selectedIndex:n=0}=e;const{prevSelectedIndex:r}=t;return r===n?null:{selectedIndex:n,prevSelectedIndex:n}}render(){const e=this.context,{children:t,className:n,light:r,selectedIndex:i=0,selectionMode:o="automatic",size:a,onChange:s=Ze,...l}=this.props,c=E().Children?.map(t,(e=>"IconSwitch"===e.type.displayName))?.every((e=>!0===e)),u=x()(`${e}--content-switcher`,n,{[`${e}--content-switcher--light`]:r,[`${e}--content-switcher--${a}`]:a,[`${e}--layout--size-${a}`]:a,[`${e}--content-switcher--icon-only`]:c});return E().createElement(Ge,g({size:{default:"md",min:"sm",max:"lg"}},l,{className:u,role:"tablist",onChange:void 0}),t&&E().Children.toArray(t).map(((e,t)=>E().cloneElement(e,{index:t,onClick:Pe([this.handleChildChange,e.props.onClick]),onKeyDown:this.handleChildChange,selected:t===this.state.selectedIndex,ref:this.handleItemRef(t),size:a}))))}}m(Xe,"propTypes",{children:y().node,className:y().string,light:te(y().bool),onChange:y().func.isRequired,selectedIndex:y().number,selectionMode:y().oneOf(["automatic","manual"]),size:y().oneOf(["sm","md","lg"])}),m(Xe,"contextType",M);const Ke=Ue(Xe);var Qe,Je;const et=e=>{let{headers:t,rowCount:n=5,columnCount:r=5,zebra:i=!1,compact:o=!1,className:a,showHeader:s=!0,showToolbar:l=!0,...c}=e;const u=C(),d=x()(a,{[`${u}--skeleton`]:!0,[`${u}--data-table`]:!0,[`${u}--data-table--zebra`]:i,[`${u}--data-table--compact`]:o}),h=n,f=Array(h),p=Array.from({length:r},((e,t)=>t));for(let e=0;e<h;e++)f[e]=E().createElement("tr",{key:e},p.map((e=>E().createElement("td",{key:e},Qe||(Qe=E().createElement("span",null))))));return E().createElement("div",{className:`${u}--skeleton ${u}--data-table-container`},s?E().createElement("div",{className:`${u}--data-table-header`},E().createElement("div",{className:`${u}--data-table-header__title`}),E().createElement("div",{className:`${u}--data-table-header__description`})):null,l?E().createElement("section",{"aria-label":"data table toolbar",className:`${u}--table-toolbar`},E().createElement("div",{className:`${u}--toolbar-content`},E().createElement("span",{className:`${u}--skeleton ${u}--btn ${u}--btn--sm`}))):null,E().createElement("table",g({className:d},c),E().createElement("thead",null,E().createElement("tr",null,p.map((e=>E().createElement("th",{key:e},t?E().createElement("div",{className:"cds--table-header-label"},t[e]?.header):Je||(Je=E().createElement("span",null))))))),E().createElement("tbody",null,f)))};function tt(e){let{className:t,children:n,...r}=e;const i=C(),o=x()(`${i}--form`,t);return E().createElement("form",g({className:o},r),n)}et.propTypes={className:y().string,columnCount:y().number,compact:y().bool,headers:y().arrayOf(y().shape({header:y().node.isRequired}).isRequired),rowCount:y().number,showHeader:y().bool,showToolbar:y().bool,zebra:y().bool},tt.propTypes={children:y().node,className:y().string};const nt=(0,b.createContext)({direction:"auto",getTextDirection:{current:void 0}}),rt=(0,b.forwardRef)(((e,t)=>{let{as:n,children:r,dir:i="auto",...o}=e;const a=(0,b.useContext)(nt),s={},l=n??"span",c={...a};if(a){const{direction:e,getTextDirection:t}=a;if(t&&t.current){const n=it(r),i=t.current(n);e!==i?(s.dir=i,c.direction=i):"auto"===e&&(s.dir=i)}else e!==i?(s.dir=i,c.direction=i):"auto"===e&&(s.dir=i)}else s.dir=i,c.direction=i;return E().createElement(nt.Provider,{value:c},E().createElement(l,g({ref:t},o,s),r))}));rt.propTypes={as:y().oneOfType([y().func,y().string,y().elementType]),children:y().node.isRequired,dir:y().oneOf(["ltr","rtl","auto"])};const it=e=>{if("string"==typeof e)return e;const t=b.Children.map(e,(e=>"string"==typeof e?e:null))?.filter((e=>null!==e));return 1===t?.length?t[0]:t};function ot(e){let{className:t,children:n,id:r,...i}=e;const o=C(),a=x()(`${o}--label`,`${o}--label--no-margin`,t);return E().createElement(rt,g({as:"label",htmlFor:r,className:a},i),n)}function at(e){let{as:t="div",condensed:n=!1,narrow:r=!1,className:i,children:o,...a}=e;const s=C(),l=x()(i,{[`${s}--row`]:!0,[`${s}--row--condensed`]:n,[`${s}--row--narrow`]:r}),c=t;return E().createElement(c,g({className:l},a),o)}ot.propTypes={children:y().node,className:y().string,id:y().string},at.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,condensed:y().bool,narrow:y().bool};const st=b.createContext({mode:"flexbox",subgrid:!1}),lt=e=>{let{children:t,mode:n,subgrid:r=!1}=e;const i=b.useMemo((()=>({mode:n,subgrid:r})),[n,r]);return b.createElement(st.Provider,{value:i},t)};lt.propTypes={children:y().node,mode:y().oneOf(["flexbox","css-grid"]).isRequired,subgrid:y().bool};const ct=()=>b.useContext(st),ut=E().forwardRef((function(e,t){let{as:n,children:r,className:i,sm:o,md:a,lg:s,xlg:l,max:c,...u}=e;const{mode:d}=ct(),h=C(),f=n||"div";if("css-grid"===d)return E().createElement(ft,g({as:f,className:i,sm:o,md:a,lg:s,xlg:l,max:c},u),r);const p=function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(null==i)continue;const o=pt[r];if(!0!==i)if("number"!=typeof i){if("object"==typeof i){const{span:e,offset:r}=i;"number"==typeof e&&n.push(`${t}--col-${o}-${e}`),!0===e&&n.push(`${t}--col-${o}`),"number"==typeof r&&n.push(`${t}--offset-${o}-${r}`)}}else n.push(`${t}--col-${o}-${i}`);else n.push(`${t}--col-${o}`)}return n.join(" ")}([o,a,s,l,c],h),m=x()(i,p,{[`${h}--col`]:0===p.length});return E().createElement(f,g({className:m,ref:t},u),r)})),dt=y().oneOf(["25%","50%","75%","100%"]),ht=p("enable-css-grid")?y().oneOfType([y().bool,y().number,y().shape({span:y().oneOfType([y().number,dt]),offset:y().number,start:y().number,end:y().number}),dt]):y().oneOfType([y().bool,y().number,y().shape({span:y().number,offset:y().number})]);function ft(e){let{as:t="div",children:n,className:r,sm:i,md:o,lg:a,xlg:s,max:l,span:c,...u}=e;const d=C(),h=function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(null==i)continue;const o=pt[r];if(!0!==i)if("string"!=typeof i)if("number"!=typeof i){if("object"==typeof i){const{span:e,offset:r,start:a,end:s}=i;if("number"==typeof r&&n.push(`${t}--${o}:col-start-${r>0?r+1:"auto"}`),"number"==typeof a&&n.push(`${t}--${o}:col-start-${a||"auto"}`),"number"==typeof s&&n.push(`${t}--${o}:col-end-${s}`),"number"==typeof e)n.push(`${t}--${o}:col-span-${e}`);else if("string"==typeof e){n.push(`${t}--${o}:col-span-${e.slice(0,-1)}`);continue}}}else n.push(`${t}--${o}:col-span-${i}`);else n.push(`${t}--${o}:col-span-${i.replace("%","")}`);else n.push(`${t}--${o}:col-span-auto`)}return n.join(" ")}([i,o,a,s,l],d),f=function(e,t){const n=[];if("number"==typeof e)n.push(`${t}--col-span-${e}`);else if("string"==typeof e)n.push(`${t}--col-span-${e.slice(0,-1)}`);else if("object"==typeof e){const{span:r,start:i,end:o}=e;null!=r&&n.push(`${t}--col-span-${r}`),null!=i&&n.push(`${t}--col-start-${i}`),null!=o&&n.push(`${t}--col-end-${o}`)}return n.join("")}(c,d),p=x()(r,h,f,{[`${d}--css-grid-column`]:!0});return E().createElement(t,g({className:p},u),n)}ut.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,lg:ht,max:ht,md:ht,sm:ht,span:y().oneOfType([y().number,dt]),xlg:ht},ft.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,lg:ht,max:ht,md:ht,sm:ht,span:y().oneOfType([y().number,dt,y().shape({span:y().oneOfType([y().number,dt]),start:y().number,end:y().number})]),xlg:ht};const pt=["sm","md","lg","xlg","max"];var mt,gt,vt,yt,bt,wt,Et,_t,xt=n(9247);const Tt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},mt||(mt=E().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"})),gt||(gt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},vt||(vt=E().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"})),yt||(yt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},bt||(bt=E().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"})),wt||(wt=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Et||(Et=E().createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),_t||(_t=E().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)}));var St,Ot,At,Mt,Ct,Nt,kt,Rt,Dt,It,Lt,$t,Pt,Bt,zt;const Ht=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},St||(St=E().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"})),Ot||(Ot=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...i},At||(At=E().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"})),Mt||(Mt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...i},Ct||(Ct=E().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"})),Nt||(Nt=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},kt||(kt=E().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"})),Rt||(Rt=E().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)})),Ft=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},Dt||(Dt=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},It||(It=E().createElement("path",{d:"M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),n):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Lt||(Lt=E().createElement("path",{d:"M10 16L20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),n)})),Ut=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return"glyph"===r||"glyph"===r||"glyphpx"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...i},$t||($t=E().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?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Pt||(Pt=E().createElement("path",{d:"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),n):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Bt||(Bt=E().createElement("path",{d:"M22 16L12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),n)})),jt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},zt||(zt=E().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)}));function Vt(e){let{active:t=!0,className:n,withOverlay:r=!0,small:i=!1,description:o="loading",...a}=e;const s=C(),l=x()(n,{[`${s}--loading`]:!0,[`${s}--loading--small`]:i,[`${s}--loading--stop`]:!t}),c=x()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!t}),u=E().createElement("div",g({},a,{"aria-atomic":"true","aria-live":t?"assertive":"off",className:l}),E().createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100"},E().createElement("title",null,o),i?E().createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,E().createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:i?"42":"44"})));return r?E().createElement("div",{className:c},u):u}Vt.propTypes={active:y().bool,className:y().string,description:y().string,id:te(y().string),small:y().bool,withOverlay:y().bool};const Gt=e=>{let{className:t,status:n="active",iconDescription:r,description:i,onSuccess:o,successDelay:a=1500,...s}=e;const l=C(),c=x()(`${l}--inline-loading`,t),u=(0,b.useRef)(null);(0,b.useEffect)((()=>("finished"===n&&(u.current=setTimeout((()=>{o&&o()}),a)),()=>{u.current&&(clearTimeout(u.current),u.current=null)})),[n,o,a]);const d=i&&E().createElement("div",{className:`${l}--inline-loading__text`},i),h=(()=>{let e=r||n;return"error"===n?E().createElement(Tt,{className:`${l}--inline-loading--error`},E().createElement("title",null,e)):"finished"===n?E().createElement(Ht,{className:`${l}--inline-loading__checkmark-container`},E().createElement("title",null,e)):"inactive"===n||"active"===n?(r||(e="active"===n?"loading":"not loading"),E().createElement(Vt,{small:!0,description:e,withOverlay:!1,active:"active"===n})):void 0})(),f=h&&E().createElement("div",{className:`${l}--inline-loading__animation`},h);return E().createElement("div",g({className:c},s,{"aria-live":s["aria-live"]??"assertive"}),f,d)};Gt.propTypes={className:y().string,description:y().node,iconDescription:y().string,onSuccess:y().func,status:y().oneOf(["inactive","active","finished","error"]),successDelay:y().number};var Wt,qt,Yt,Zt,Xt=n(5951);const Kt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Wt||(Wt=E().createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),qt||(qt=E().createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),n)})),Qt=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Yt||(Yt=E().createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Zt||(Zt=E().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,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),n)}));var Jt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),en="undefined"==typeof Element,tn=en?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nn=!en&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},rn=function e(t,n){var r;void 0===n&&(n=!0);var i=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},on=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!rn(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:a,candidates:l})}else{tn.call(a,Jt)&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!rn(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},an=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},sn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!an(e)?0:e.tabIndex},ln=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},cn=function(e){return"INPUT"===e.tagName},un=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},dn=function(e,t){return!(t.disabled||rn(t)||function(e){return cn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=tn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(tn.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return un(e)}else{if("function"==typeof r){for(var o=e;e;){var a=e.parentElement,s=nn(e);if(a&&!a.shadowRoot&&!0===r(a))return un(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,r,i,o=e&&nn(e),a=null===(t=o)||void 0===t?void 0:t.host,s=!1;if(o&&o!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=o=nn(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!tn.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},hn=function(e,t){return!(function(e){return function(e){return cn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||nn(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)}(t)||sn(t)<0||!dn(e,t))},fn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pn=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scopeParent,a=o?t.scopeParent:t,s=function(e,t){var n=sn(e);return n<0&&t&&!an(e)?0:n}(a,o),l=o?e(t.candidates):a;0===s?o?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:s,item:t,isScope:o,content:l})})),r.sort(ln).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},mn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?on([e],t.includeContainer,{filter:hn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:fn}):function(e,t,n){if(rn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Jt));return t&&tn.call(e,Jt)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,hn.bind(null,t)),pn(n)};function gn(e){let{children:t,className:n,onClick:r,inline:i,...o}=e;const a=C(),s=x()(n,{[`${a}--actionable-notification__action-button`]:!0});return E().createElement(ze,g({className:s,kind:i?"ghost":"tertiary",onClick:r,size:"sm"},o),t)}function vn(e){let{"aria-label":t="close notification",ariaLabel:n,className:r,type:i="button",renderIcon:o=jt,name:a,notificationType:s="toast",...l}=e;const c=C(),u=x()(r,{[`${c}--${s}-notification__close-button`]:s}),d=x()({[`${c}--${s}-notification__close-icon`]:s});return E().createElement("button",g({},l,{type:i,"aria-label":n||t,title:n||t,className:u}),o&&E().createElement(o,{className:d,name:a}))}gn.propTypes={children:y().node,className:y().string,inline:y().bool,onClick:y().func},vn.propTypes={"aria-label":y().string,ariaLabel:te(y().string),className:y().string,name:y().string,notificationType:y().oneOf(["toast","inline","actionable"]),renderIcon:y().oneOfType([y().func,y().object]),type:y().string};const yn={error:Tt,success:Ht,warning:Xt.BF,"warning-alt":Xt.OR,info:Kt,"info-square":Qt};function bn(e){let{iconDescription:t,kind:n,notificationType:r}=e;const i=C(),o=yn[n];return o?E().createElement(o,{className:`${i}--${r}-notification__icon`,size:20},E().createElement("title",null,t)):null}function wn(e){let{"aria-label":t,children:n,title:r,subtitle:i,role:o="status",onClose:a,onCloseButtonClick:s=Ze,statusIconDescription:l,className:c,kind:u="error",lowContrast:d,hideCloseButton:h=!1,...f}=e;const[p,m]=(0,b.useState)(!0),v=C(),y=x()(c,{[`${v}--inline-notification`]:!0,[`${v}--inline-notification--low-contrast`]:d,[`${v}--inline-notification--${u}`]:u,[`${v}--inline-notification--hide-close-button`]:h}),w=(0,b.useRef)(null),_=(0,b.useRef)(null);return p?E().createElement("div",g({ref:_},f,{role:o,className:y}),E().createElement("div",{className:`${v}--inline-notification__details`},E().createElement(bn,{notificationType:"inline",kind:u,iconDescription:l||`${u} icon`}),E().createElement("div",{ref:w,className:`${v}--inline-notification__text-wrapper`},r&&E().createElement(rt,{as:"div",className:`${v}--inline-notification__title`},r),i&&E().createElement(rt,{as:"div",className:`${v}--inline-notification__subtitle`},i),n)),!h&&E().createElement(vn,{notificationType:"inline",onClick:function(e){s(e),a&&!1===a(e)||m(!1)},"aria-label":t})):null}function En(e){let{hideLabel:t,className:n,size:r="md",...i}=e;const o=C();return E().createElement("div",g({className:x()(`${o}--form-item`,n)},i),!t&&E().createElement("span",{className:`${o}--label ${o}--skeleton`}),E().createElement("div",{className:`${o}--number ${o}--skeleton ${o}--number--${r}`}))}bn.propTypes={iconDescription:y().string.isRequired,kind:y().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:y().oneOf(["inline","toast"]).isRequired},y().string,te(y().string),y().string,y().node,y().string,y().bool,y().oneOf(["error","info","info-square","success","warning","warning-alt"]),y().bool,y().func,y().func,y().oneOf(["alert","log","status"]),y().string,y().string,y().number,y().string,wn.propTypes={"aria-label":y().string,children:y().node,className:y().string,hideCloseButton:y().bool,kind:y().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:y().bool,onClose:y().func,onCloseButtonClick:y().func,role:y().oneOf(["alert","log","status"]),statusIconDescription:y().string,subtitle:y().string,title:y().string},y().string,y().string,te(y().string),y().node,y().string,y().bool,te(y().bool),y().bool,y().bool,y().oneOf(["error","info","info-square","success","warning","warning-alt"]),y().bool,y().func,y().func,y().func,y().string,y().string,y().node,y().string,y().string,y().node,y().string,S(y().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],(e=>({error:"warning",success:"info"}[e]))),y().bool,y().func,y().string,y().node,y().string,y().string,En.propTypes={className:y().string,hideLabel:y().bool,size:y().oneOf(["sm","md","lg"])};var _n=n(4389),xn=n(5848);const Tn=(0,b.createContext)({isFluid:!1});var Sn,On;const An="increment.number",Mn="decrement.number",Cn={[An]:"Increment number",[Mn]:"Decrement number"},Nn=E().forwardRef((function(e,t){const{allowEmpty:n=!1,className:r,decorator:i,disabled:o=!1,disableWheel:a=!1,defaultValue:s=0,helperText:l="",hideLabel:c=!1,hideSteppers:u,iconDescription:d,id:h,label:f,invalid:p=!1,invalidText:m,light:v,max:y,min:w,onChange:_,onClick:T,onKeyUp:S,readOnly:O,size:M="md",slug:N,step:k=1,translateWithId:R=e=>Cn[e],warn:D=!1,warnText:I="",value:L,...$}=e,P=C(),{isFluid:B}=(0,b.useContext)(Tn),[z,H]=(0,b.useState)(!1),[F,U]=(0,b.useState)((()=>void 0!==L?L:void 0!==s?s:n?"":0)),[j,V]=(0,b.useState)(L),G=(0,b.useRef)(null),W=A([t,G]),q=x()({[`${P}--number`]:!0,[`${P}--number--helpertext`]:!0,[`${P}--number--readonly`]:O,[`${P}--number--light`]:v,[`${P}--number--nolabel`]:c,[`${P}--number--nosteppers`]:u,[`${P}--number--${M}`]:M}),Y=function(e){let{allowEmpty:t,invalid:n,value:r,max:i,min:o}=e;return!n&&(""===r?t:!(r>i||r<o))}({allowEmpty:n,invalid:p,value:F,max:y,min:w}),Z=(e=>{let{id:t,readOnly:n,disabled:r,invalid:i,invalidText:o,warn:a,warnText:s}=e;const l=C(),c={disabled:!n&&r,invalid:!n&&i,invalidId:`${t}-error-msg`,warn:!n&&!i&&a,warnId:`${t}-warn-msg`,validation:null,icon:null,helperId:`${t}-helper-text`};return c.invalid?(c.icon=Xt.BF,c.validation=E().createElement(rt,{as:"div",className:`${l}--form-requirement`,id:c.invalidId},o)):c.warn&&(c.icon=Xt.OR,c.validation=E().createElement(rt,{as:"div",className:`${l}--form-requirement`,id:c.warnId},s)),c})({id:h,readOnly:O,disabled:o,invalid:!Y,invalidText:m,warn:D,warnText:I}),[X,K]=[R("increment.number"),R("decrement.number")],Q=x()(`${P}--number__input-wrapper`,{[`${P}--number__input-wrapper--warning`]:Z.warn,[`${P}--number__input-wrapper--slug`]:N,[`${P}--number__input-wrapper--decorator`]:i}),J=x()({[`${P}--number__invalid`]:Z.invalid||Z.warn,[`${P}--number__invalid--warning`]:Z.warn});let ee;L!==j&&(U(L),V(L)),Z.invalid&&(ee=Z.invalidId),Z.warn&&(ee=Z.warnId),Z.validation||(ee=l?Z.helperId:void 0);const te=e=>{"type"in e.target&&"button"===e.target.type?H(!1):H("focus"===e.type)},ne=x()(`${P}--form-item`,{[r]:!!r,[`${P}--number-input--fluid--invalid`]:B&&Z.invalid,[`${P}--number-input--fluid--focus`]:B&&z,[`${P}--number-input--fluid--disabled`]:B&&o}),re=Z.icon,ie=e=>{const t=e.toString().split(".");return t[1]?t[1].length:0},oe=(e,t)=>{if(G.current){const r=Number(G.current.value),i="up"===t?r+k:r-k,o=Math.max(ie(r),ie(k)),a=parseFloat(i.toFixed(o)),s=void 0!==w&&void 0!==y?Math.min(Math.max(a,w),y):a,l={value:n&&""===G.current.value&&0===k?"":s,direction:t};U(l.value),_&&_(e,l),T&&T(e,l)}};let ae,se=E().isValidElement(N??i)?N??i:null;return se&&"AILabel"===se.type?.displayName&&(se=E().cloneElement(se,{size:"mini"})),se&&"AILabel"===se.type?.displayName&&(ae=se.props.revertActive),(0,b.useEffect)((()=>{!ae&&N&&s&&U(s)}),[s,ae,N]),E().createElement("div",{className:ne,onFocus:B?te:void 0,onBlur:B?te:void 0},E().createElement("div",{className:q,"data-invalid":!!Z.invalid||void 0},E().createElement(kn,{disabled:Z.disabled,hideLabel:c,id:h,label:f}),E().createElement("div",{className:Q},E().createElement("input",g({},$,{"data-invalid":!!Z.invalid||void 0,"aria-invalid":Z.invalid,"aria-describedby":ee,"aria-readonly":O,disabled:Z.disabled,ref:W,id:h,max:y,min:w,onClick:T,onChange:function(e){if(o)return;const t={value:n&&""===e.target.value?"":Number(e.target.value),direction:F<e.target.value?"up":"down"};U(t.value),_&&_(e,t)},onKeyUp:S,onFocus:e=>{a&&e.target.addEventListener("wheel",Dn),$.onFocus&&$.onFocus(e)},onBlur:e=>{a&&e.target.removeEventListener("wheel",Dn),$.onBlur&&$.onBlur(e)},pattern:"[0-9]*",readOnly:O,step:k,type:"number",value:F})),N?se:i?E().createElement("div",{className:`${P}--number__input-inner-wrapper--decorator`},se):"",re?E().createElement(re,{className:J}):null,!u&&E().createElement("div",{className:`${P}--number__controls`},E().createElement("button",{"aria-label":K||d,className:`${P}--number__control-btn down-icon`,disabled:o||O,onClick:e=>oe(e,"down"),tabIndex:-1,title:K||d,type:"button"},Sn||(Sn=E().createElement(_n.NA,{className:"down-icon"}))),E().createElement("div",{className:`${P}--number__rule-divider`}),E().createElement("button",{"aria-label":X||d,className:`${P}--number__control-btn up-icon`,disabled:o||O,onClick:e=>oe(e,"up"),tabIndex:-1,title:X||d,type:"button"},On||(On=E().createElement(xn.OM,{className:"up-icon"}))),E().createElement("div",{className:`${P}--number__rule-divider`}))),B&&E().createElement("hr",{className:`${P}--number-input__divider`}),Z.validation?Z.validation:E().createElement(Rn,{id:Z.helperId,disabled:o,description:l})))}));Nn.propTypes={allowEmpty:y().bool,className:y().string,decorator:y().node,defaultValue:y().oneOfType([y().number,y().string]),disableWheel:y().bool,disabled:y().bool,helperText:y().node,hideLabel:y().bool,hideSteppers:y().bool,iconDescription:y().string,id:y().string.isRequired,invalid:y().bool,invalidText:y().node,label:y().node,light:te(y().bool),max:y().number,min:y().number,onChange:y().func,onClick:y().func,onKeyUp:y().func,readOnly:y().bool,size:y().oneOf(["sm","md","lg"]),slug:te(y().node),step:y().number,translateWithId:y().func,value:y().oneOfType([y().number,y().string]),warn:y().bool,warnText:y().node};const kn=e=>{let{disabled:t,id:n,hideLabel:r,label:i}=e;const o=C(),a=x()({[`${o}--label`]:!0,[`${o}--label--disabled`]:t,[`${o}--visually-hidden`]:r});return i?E().createElement(rt,{as:"label",htmlFor:n,className:a},i):null};function Rn(e){let{disabled:t,description:n,id:r}=e;const i=C(),o=x()(`${i}--form__helper-text`,{[`${i}--form__helper-text--disabled`]:t});return n?E().createElement(rt,{as:"div",id:r,className:o},n):null}function Dn(e){e.preventDefault()}kn.propTypes={disabled:y().bool,hideLabel:y().bool,id:y().string,label:y().node},Rn.propTypes={description:y().node,disabled:y().bool,id:y().string};var In=16;function Ln(e){return"".concat(e/In,"rem")}Ln(320);var $n={width:Ln(672),columns:8,margin:Ln(16)},Pn={width:Ln(1056),columns:16,margin:Ln(16)};Ln(1312),Ln(16),Ln(1584),Ln(24);function Bn(e){return Ln(8*e)}var zn=[Bn(.25),Bn(.5),Bn(1),Bn(1.5),Bn(2),Bn(3),Bn(4),Bn(5),Bn(6),Bn(8),Bn(10),Bn(12),Bn(20)];Bn(2),Bn(3),Bn(4),Bn(6),Bn(8),Bn(12),Bn(20),Bn(3),Bn(4),Bn(5),Bn(6),Bn(8),Ln(24),Ln(32),Ln(40),Ln(48),Ln(64),Ln(80);const Hn=Array.from({length:zn.length-1}).map(((e,t)=>t+1)),Fn=E().forwardRef((function(e,t){const{as:n="div",children:r,className:i,gap:o,orientation:a="vertical",...s}=e,l=C(),c=x()(i,{[`${l}--stack-${a}`]:!0,[`${l}--stack-scale-${o}`]:"number"==typeof o}),u={...s.style};return"string"==typeof o&&(u[`--${l}-stack-gap`]=o),E().createElement(n,g({},s,{ref:t,className:c,style:u}),r)}));Fn.propTypes={as:y().elementType,children:y().node,className:y().string,gap:y().oneOfType([y().string,y().oneOf(Hn)]),orientation:y().oneOf(["horizontal","vertical"])};const Un=()=>{},jn=E().forwardRef((function(e,t){const{align:n,children:r,className:i,disabled:o,enterDelayMs:a,index:s,leaveDelayMs:l=0,name:c,onClick:u=Un,onKeyDown:d=Un,selected:h=!1,size:f,text:p,...m}=e,v=C(),[y,w]=(0,b.useState)(!1),_=()=>{w(!0)},T=()=>{w(!1)},S=x()(i,`${v}--content-switcher-btn`,{[`${v}--content-switcher--selected`]:h}),O=x()(`${v}--content-switcher-popover__wrapper`,{[`${v}--content-switcher-popover--selected`]:h,[`${v}--content-switcher-popover--disabled`]:o}),A={onClick:e=>{e.preventDefault(),u({index:s,name:c,text:p})},onKeyDown:e=>{const t=e.key||e.which;d({index:s,name:c,text:p,key:t})},className:S,disabled:o,align:n,enterDelayMs:a,leaveDelayMs:l,size:f};return E().createElement($e,g({label:p,type:"button",ref:t,role:"tab",tabIndex:h||y?0:-1,onMouseEnter:_,onMouseLeave:T,onFocus:_,onBlur:T,"aria-selected":h,"aria-label":p,wrapperClasses:O},m,A),r)}));jn.displayName="IconSwitch",jn.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:y().node,className:y().string,disabled:y().bool,enterDelayMs:y().number,index:y().number,leaveDelayMs:y().number,name:y().oneOfType([y().string,y().number]),onClick:y().func,onKeyDown:y().func,selected:y().bool,size:y().oneOf(["sm","md","lg"]),text:y().string};var Vn=jn;const Gn=E().forwardRef(((e,t)=>{let{align:n,as:r,children:i,className:o,condensed:a=!1,fullWidth:s=!1,narrow:l=!1,...c}=e;const u=C(),{subgrid:d}=ct();let h="wide";if(l?h="narrow":a&&(h="condensed"),d)return E().createElement(lt,{mode:"css-grid",subgrid:!0},E().createElement(Wn,g({ref:t,as:r,className:o,mode:h},c),i));const f=x()(o,{[`${u}--css-grid`]:!0,[`${u}--css-grid--condensed`]:"condensed"===h,[`${u}--css-grid--narrow`]:"narrow"===h,[`${u}--css-grid--full-width`]:s,[`${u}--css-grid--start`]:"start"===n,[`${u}--css-grid--end`]:"end"===n}),p=r||"div";return E().createElement(lt,{mode:"css-grid",subgrid:!0},E().createElement(p,g({className:f,ref:t},c),i))}));Gn.propTypes={as:y().oneOfType([y().string,y().elementType]),align:y().oneOf(["start","center","end"]),children:y().node,className:y().string,condensed:y().bool,fullWidth:y().bool,narrow:y().bool};const Wn=E().forwardRef(((e,t)=>{let{as:n,className:r,children:i,mode:o,...a}=e;const s=C(),l=x()(r,{[`${s}--subgrid`]:!0,[`${s}--subgrid--condensed`]:"condensed"===o,[`${s}--subgrid--narrow`]:"narrow"===o,[`${s}--subgrid--wide`]:"wide"===o}),c=n||"div";return E().createElement(c,g({},a,{ref:t,className:l}),i)}));Wn.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,mode:y().oneOf(["wide","narrow","condensed"])};const qn=Gn,Yn=E().forwardRef(((e,t)=>{let{as:n,condensed:r=!1,narrow:i=!1,fullWidth:o=!1,className:a,children:s,...l}=e;const c=C(),u=x()(a,{[`${c}--grid`]:!0,[`${c}--grid--condensed`]:r,[`${c}--grid--narrow`]:i,[`${c}--grid--full-width`]:o}),d=n||"div";return E().createElement(lt,{mode:"flexbox",subgrid:!1},E().createElement(d,g({className:u,ref:t},l),s))}));Yn.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,condensed:y().bool,fullWidth:y().bool,narrow:y().bool};const Zn=Yn;function Xn(e){return re("enable-css-grid")?E().createElement(qn,e):E().createElement(Zn,e)}Xn.propTypes={align:y().oneOf(["start","center","end"]),as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,condensed:y().bool,fullWidth:y().bool,narrow:y().bool};const Kn=Xn;var Qn=n(524);function Jn(e){let{defaultValue:t,name:n="custom",onChange:r,value:i}=e;const[o,a]=(0,b.useState)(i??t),s=(0,b.useRef)(null);function l(e){const t="function"==typeof e?e(o):e;!1===s.current&&a(t),r&&r(t)}return null===s.current&&(s.current=void 0!==i),(0,b.useEffect)((()=>{s.current,s.current}),[n,i]),!0===s.current?[i,l]:[o,l]}function er(e){let{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:o=500}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=(0,b.useRef)(t),s=(0,b.useRef)(n),l=(0,b.useRef)(r),c=(0,b.useRef)(i),[u,d]=(0,b.useState)(!1),[h,f]=(0,b.useState)(!1),p=(0,b.useRef)({longPress:!1});(0,b.useEffect)((()=>{a.current=t}),[t]),(0,b.useEffect)((()=>{s.current=n}),[n]),(0,b.useEffect)((()=>{l.current=r}),[r]),(0,b.useEffect)((()=>{c.current=i}),[i]),(0,b.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 o(){d(!1),f(!1),l.current?.(),p.current.longPress=!1}function c(){f(!1),d(!1),a.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",o),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",o),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}}),[e]),(0,b.useEffect)((()=>{if(u){const e=setTimeout((()=>{d(!1),f(!0)}),o);return()=>{clearTimeout(e)}}}),[u,o]),(0,b.useEffect)((()=>{if(h)return p.current.longPress=!0,c.current?.()}),[h])}const tr=e=>{const[t,n]=(0,b.useState)((()=>!!_e&&window.matchMedia(e).matches));return(0,b.useEffect)((()=>{const t=e=>{n(e.matches)},r=window.matchMedia(e);return r.addEventListener("change",t),n(r.matches),()=>{r.removeEventListener("change",t)}}),[e]),t};function nr(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:i=!1,trailing:o=!0,maxWait:a}=n,s=Array(2);let l;i&&(s[0]="leading"),o&&(s[1]="trailing");let c=null;const u=function(e,t,{signal:n,edges:r}={}){let i,o=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout((()=>{c=null,s&&l(),h()}),t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},h=()=>{d(),i=void 0,o=null},f=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==c;u(),a&&t&&l()};return f.schedule=u,f.cancel=h,f.flush=()=>{d(),l()},n?.addEventListener("abort",h,{once:!0}),f}((function(...t){l=e.apply(this,t),c=null}),t,{signal:r,edges:s}),d=function(...t){if(null!=a)if(null===c)c=Date.now();else if(Date.now()-c>=a)return l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l;return u.apply(this,t),l};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}var rr,ir,or;const ar=64,sr=E().createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),lr=E().createContext({index:0,hasSecondaryLabel:!1}),cr=`(min-width: ${Pn.width})`,ur=`(max-width: ${$n.width})`,dr=E().createContext(0);function hr(e){let{children:t,defaultSelectedIndex:n=0,onChange:r,selectedIndex:i,dismissable:o,onTabCloseRequest:a}=e;const s=Ce("ccs"),[l,c]=(0,b.useState)(n),[u,d]=Jn({value:i,defaultValue:n,onChange:e=>r?.({selectedIndex:e})}),h={baseId:s,activeIndex:l,defaultSelectedIndex:n,dismissable:o,onTabCloseRequest:a,setActiveIndex:c,selectedIndex:u,setSelectedIndex:d};return E().createElement(sr.Provider,{value:h},t)}function fr(e){let{children:t,height:n,defaultSelectedIndex:r=0,onChange:i,selectedIndex:o,...a}=e;const[s,l]=Jn({value:o,defaultValue:r,onChange:e=>i?.({selectedIndex:e})}),c={...a,selectedIndex:s,onChange:e=>{let{selectedIndex:t}=e;return l(t)}};return tr(ur)?E().createElement(hr,c,t):E().createElement(Kn,{style:{height:n}},E().createElement(hr,c,t))}function pr(e){let{activation:t="automatic","aria-label":n,children:r,className:i,contained:o=!1,fullWidth:a=!1,iconSize:s,leftOverflowButtonProps:l,light:c,rightOverflowButtonProps:u,scrollDebounceWait:d=200,scrollIntoView:h,...f}=e;const{activeIndex:p,selectedIndex:m,setSelectedIndex:v,setActiveIndex:y,dismissable:w}=E().useContext(sr),_=C(),T=(0,b.useRef)(null),S=(0,b.useRef)(null),A=(0,b.useRef)(null),[M,N]=(0,b.useState)(!1),[k,R]=(0,b.useState)(0);let D=!1;o&&(D=E().Children.toArray(r).some((e=>(0,Qn.isElement)(e)&&!!e.props.secondaryLabel)));const I=tr(cr),L=a&&o&&I&&E().Children.toArray(r).length<9,$=x()(`${_}--tabs`,{[`${_}--tabs--contained`]:o,[`${_}--tabs--light`]:c,[`${_}--tabs__icon--default`]:"default"===s,[`${_}--tabs__icon--lg`]:"lg"===s,[`${_}--layout--size-lg`]:"lg"===s,[`${_}--tabs--tall`]:D,[`${_}--tabs--full-width`]:L,[`${_}--tabs--dismissable`]:w},i),P=44,[B,z]=(0,b.useState)(!!T.current&&k+P+T.current.clientWidth<T.current.scrollWidth),H=!!T.current&&M&&k>0,F=x()(`${_}--tab--overflow-nav-button`,`${_}--tab--overflow-nav-button--previous`,{[`${_}--tab--overflow-nav-button--hidden`]:!H}),U=x()(`${_}--tab--overflow-nav-button`,`${_}--tab--overflow-nav-button--next`,{[`${_}--tab--overflow-nav-button--hidden`]:!B}),j=(0,b.useRef)([]),V=(0,b.useCallback)((()=>nr((e=>{R(e.target.scrollLeft)}),d)),[d]);function G(e){if(M&&T.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=T.current.scrollLeft+P,o=T.current.scrollLeft+T.current.clientWidth-P;n<i&&R(n-P),r>o&&R(r+P-T.current.clientWidth)}}return(0,b.useEffect)((()=>{const e=j.current[m];h&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}),[]),(0,b.useEffect)((()=>{z(!!T.current&&k+P+T.current.clientWidth+1<T.current.scrollWidth),w&&T.current&&N(T.current.scrollWidth>T.current.clientWidth)}),[k,r,w,M]),(0,b.useEffect)((()=>{if(j.current[m]?.disabled){const e=j.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];v(j.current.indexOf(t))}}}),[]),O((()=>{T.current&&N(T.current.scrollWidth>T.current.clientWidth+1);const e=nr((function(){T.current&&N(T.current.scrollWidth>T.current.clientWidth+1)}),200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}}),[]),O((()=>{null!==k&&T.current&&(T.current.scrollLeft=k)}),[k]),O((()=>{G("manual"===t?j.current[p]:j.current[m])}),[t,p]),O((()=>{G(j.current[m])}),[m,M,r]),er(S,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.max(k-T.current.scrollWidth/j.current.length*1.5,0))},onLongPress:()=>gr(T,"backward",R)}),er(A,{onPress(e){let{longPress:t}=e;!t&&T.current&&R(Math.min(k+T.current.scrollWidth/j.current.length*1.5,T.current.scrollWidth-T.current.clientWidth))},onLongPress:()=>gr(T,"forward",R)}),E().createElement("div",{className:$},E().createElement("button",g({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:S,className:F,type:"button"},l),rr||(rr=E().createElement(Ft,null))),E().createElement("div",g({},f,{"aria-label":n,ref:T,role:"tablist",className:`${_}--tab--list`,onScroll:V,onKeyDown:function(e){if(be(e,[ge,pe,fe,he])){e.preventDefault();const n=j.current.filter((e=>null!==e)).filter((e=>!e.disabled)),r=n.indexOf(j.current["automatic"===t?m:p]),i=j.current.indexOf(n[function(e,t,n){switch(!0){case we(e,ge):return(n+1)%t;case we(e,pe):return(t+n-1)%t;case we(e,fe):return 0;case we(e,he):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?v(i):"manual"===t&&y(i),j.current[i]?.focus()}},onBlur:function(e){let{relatedTarget:n}=e;T.current?.contains(n)||"manual"===t&&y(m)}}),E().Children.map(r,((e,t)=>(0,Qn.isElement)(e)?E().createElement(lr.Provider,{value:{index:t,hasSecondaryLabel:D,contained:o}},E().cloneElement(e,{ref:e=>{j.current[t]=e}})):null))),E().createElement("button",g({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:A,className:U,type:"button"},u),ir||(ir=E().createElement(Ut,null))))}function mr(e){let{activation:t="automatic","aria-label":n,children:r,className:i,scrollIntoView:o,...a}=e;const{activeIndex:s,selectedIndex:l,setSelectedIndex:c,setActiveIndex:u}=E().useContext(sr),d=C(),h=(0,b.useRef)(null),[f,p]=(0,b.useState)(!1),[m,v]=(0,b.useState)(!1),y=tr(ur),w=x()(`${d}--tabs`,`${d}--tabs--vertical`,`${d}--tabs--contained`,i),_=(0,b.useRef)([]);return(0,b.useEffect)((()=>{if(_.current[l]?.disabled){const e=_.current.filter((e=>!e.disabled));if(e.length>0){const t=e[0];c(_.current.indexOf(t))}}}),[]),(0,b.useEffect)((()=>{function e(){const e=h.current?.offsetHeight,t=h.current?.getBoundingClientRect().top,n=_.current[l]?.getBoundingClientRect().top,r=ar/2;t&&e&&(n-r<t||n-t+ar+r>e)&&h.current.scrollTo({top:(l-1)*ar,behavior:"smooth"})}return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[l,o]),(0,b.useEffect)((()=>{const e=h.current;if(!e)return;const t=()=>{const t=ar/2;p(e.scrollTop+e.clientHeight+t<=e.scrollHeight),v(e.scrollTop>t)},n=new ResizeObserver((()=>t()));return n.observe(e),e.addEventListener("scroll",t),()=>{n.disconnect(),e.removeEventListener("scroll",t)}})),y?E().createElement(pr,g({},a,{"aria-label":n,contained:!0}),r):E().createElement("div",{className:w},m&&E().createElement("div",{className:`${d}--tab--list-gradient_top`}),E().createElement("div",g({},a,{"aria-label":n,ref:h,role:"tablist",className:`${d}--tab--list`,onKeyDown:function(e){if(be(e,[ve,me,fe,he])){e.preventDefault();const n=_.current.filter((e=>null!==e)).filter((e=>!e.disabled)),r=n.indexOf(_.current["automatic"===t?l:s]),i=_.current.indexOf(n[function(e,t,n){switch(!0){case we(e,ve):return(n+1)%t;case we(e,me):return(t+n-1)%t;case we(e,fe):return 0;case we(e,he):return t-1;default:return n}}(e,n.length,r)]);"automatic"===t?c(i):"manual"===t&&u(i),_.current[i]?.focus()}},onBlur:function(e){let{relatedTarget:n}=e;h.current?.contains(n)||"manual"===t&&u(l)}}),E().Children.map(r,((e,t)=>(0,Qn.isElement)(e)?E().createElement(lr.Provider,{value:{index:t,hasSecondaryLabel:!1}},E().cloneElement(e,{ref:e=>{_.current[t]=e}})):null))),f&&E().createElement("div",{className:`${d}--tab--list-gradient_bottom`}))}function gr(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let a=null;return a=requestAnimationFrame((function e(){r&&(r.scrollLeft=r.scrollLeft+o,a=requestAnimationFrame(e))})),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),a&&cancelAnimationFrame(a)}}hr.propTypes={children:y().node,defaultSelectedIndex:y().number,dismissable:y().bool,onChange:y().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:y().number},fr.propTypes={children:y().node,defaultSelectedIndex:y().number,height:y().string,onChange:y().func,selectedIndex:y().number},pr.propTypes={activation:y().oneOf(["automatic","manual"]),"aria-label":y().string,children:y().node,className:y().string,contained:y().bool,fullWidth:y().bool,iconSize:y().oneOf(["default","lg"]),leftOverflowButtonProps:y().object,light:te(y().bool),rightOverflowButtonProps:y().object,scrollDebounceWait:y().number,scrollIntoView:y().bool},mr.propTypes={activation:y().oneOf(["automatic","manual"]),"aria-label":y().string,children:y().node,className:y().string};const vr=(0,b.forwardRef)((function(e,t){let{as:n="button",children:r,className:i,disabled:o,onClick:a,onKeyDown:s,secondaryLabel:l,renderIcon:c,...u}=e;const d=C(),{selectedIndex:h,setSelectedIndex:f,baseId:p,dismissable:m,onTabCloseRequest:v}=E().useContext(sr),{index:y,hasSecondaryLabel:w,contained:_}=E().useContext(lr),{badgeIndicator:T}=E().useContext(yr)||{},S=(0,b.useRef)(null),M=(0,b.useRef)(null),k=A([t,M]),[R,D]=(0,b.useState)(!1),I=`${p}-tab-${y}`,L=`${p}-tabpanel-${y}`,[$,P]=(0,b.useState)(!1),B=x()(`${d}--tabs__nav-item`,`${d}--tabs__nav-link`,{[`${d}--tabs__nav-item--selected`]:h===y,[`${d}--tabs__nav-item--disabled`]:o,[`${d}--tabs__nav-item--hover-off`]:R},i),z=n;N(S,"mouseover",(e=>{_&&M.current&&(e.stopPropagation(),D(!0),M.current.classList.add(`${d}--tabs__nav-item--hover-off`))})),N(S,"mouseleave",(()=>{_&&M.current&&(M.current.classList.remove(`${d}--tabs__nav-item--hover-off`),D(!1))})),O((()=>{function e(){const e=document.getElementById(`${I}`)||M.current;if(e?.closest(`.${d}--tabs--vertical`)){const n=e?.getElementsByClassName(`${d}--tabs__nav-item-label`)[0];P((t=n).offsetHeight<t.scrollHeight),t.offsetHeight,t.scrollHeight}var t}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[d,I]);const H=e=>{if(e.stopPropagation(),v?.(y),M.current&&M.current.parentElement){const e=Array.from(M.current.parentElement.childNodes).filter((e=>{const t=e;return t.classList.contains(`${d}--tabs__nav-link`)&&!t.classList.contains(`${d}--tabs__nav-item--disabled`)})).length;if(M.current&&y+1!==e)M.current.focus();else{const t=2*(e-2);M.current.parentElement.childNodes[t]?.focus()}}},F=e=>{m&&we(e,ye)&&H(e),s?.(e)},U=E().createElement("div",{className:x()({[`${d}--tabs__nav-item--close`]:m,[`${d}--tabs__nav-item--close--hidden`]:!m})},E().createElement("button",{type:"button",tabIndex:h===y&&m?0:-1,"aria-disabled":o,"aria-hidden":h===y&&m?"false":"true",disabled:o,className:x()({[`${d}--tabs__nav-item--close-icon`]:m,[`${d}--visually-hidden`]:!m,[`${d}--tabs__nav-item--close-icon--selected`]:h===y,[`${d}--tabs__nav-item--close-icon--disabled`]:o}),onClick:H,title:`Remove ${"string"==typeof r?r:""} tab`,ref:S},E().createElement(jt,{"aria-hidden":h===y&&m?"false":"true","aria-label":`Press delete to remove ${"string"==typeof r?r:""} tab`}))),j=c??m;return $?E().createElement(Re,{label:r,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},E().createElement(z,g({},u,{"aria-controls":L,"aria-disabled":o,"aria-selected":h===y,ref:k,id:I,role:"tab",className:B,disabled:o,title:r,onClick:e=>{o||(f(y),a?.(e))},onKeyDown:F,tabIndex:h===y?"0":"-1",type:"button"}),E().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},E().createElement(rt,{className:`${d}--tabs__nav-item-label`},r)),w&&l&&E().createElement(rt,{as:"div",className:`${d}--tabs__nav-item-secondary-label`,title:l},l))):E().createElement(E().Fragment,null,E().createElement(z,g({},u,{"aria-controls":L,"aria-disabled":o,"aria-selected":h===y,ref:k,id:I,role:"tab",className:B,disabled:o,onClick:e=>{o||(f(y),a?.(e))},onKeyDown:F,tabIndex:h===y?"0":"-1",type:"button"}),E().createElement("div",{className:`${d}--tabs__nav-item-label-wrapper`},m&&c&&E().createElement("div",{className:`${d}--tabs__nav-item--icon-left`},E().createElement(c,{size:16})),E().createElement(rt,{className:`${d}--tabs__nav-item-label`},r),!m&&c&&E().createElement("div",{className:x()(`${d}--tabs__nav-item--icon`,{[`${d}--visually-hidden`]:!j})},!m&&c&&E().createElement(c,{size:16}))),w&&l&&E().createElement(rt,{as:"div",className:`${d}--tabs__nav-item-secondary-label`,title:l},l),!o&&T&&(or||(or=E().createElement(Ie,null)))),U)}));vr.propTypes={as:y().oneOfType([y().string,y().elementType]),children:y().node,className:y().string,disabled:y().bool,onClick:y().func,onKeyDown:y().func,renderButton:y().func,renderIcon:y().oneOfType([y().func,y().object]),secondaryLabel:y().string};const yr=(0,b.createContext)(!1);E().forwardRef((function(e,t){let{badgeIndicator:n,children:r,className:i,defaultOpen:o=!1,enterDelayMs:a,leaveDelayMs:s,label:l,...c}=e;const u=C(),d=(0,b.useMemo)((()=>({badgeIndicator:n})),[n]),h=E().isValidElement(r)&&20===r.props?.size,f=x()(`${u}--tabs__nav-item--icon-only`,i,{[`${u}--tabs__nav-item--icon-only__20`]:h});return E().createElement(yr.Provider,{value:d},E().createElement(Re,{align:"bottom",defaultOpen:o,className:`${u}--icon-tooltip`,enterDelayMs:a,label:l,leaveDelayMs:s},E().createElement(vr,g({className:f,ref:t},c),r)))})).propTypes={badgeIndicator:y().bool,children:y().node,className:y().string,defaultOpen:y().bool,enterDelayMs:y().number,label:y().node.isRequired,leaveDelayMs:y().number};const br=E().forwardRef((function(e,t){let{children:n,className:r,...i}=e;const o=C(),a=(0,b.useRef)(null),s=A([t,a]),[l,c]=(0,b.useState)(0),[u,d]=(0,b.useState)(!1),{selectedIndex:h,baseId:f}=E().useContext(sr),p=E().useContext(dr),m=`${f}-tabpanel-${p}`,v=`${f}-tab-${p}`,y=x()(`${o}--tab-content`,r,{[`${o}--tab-content--interactive`]:u});return(0,b.useEffect)((()=>{a.current&&Ne(a.current)&&(d(!0),c(-1))}),[]),(0,b.useEffect)((()=>{const e=a.current;if(!e)return;const t=new MutationObserver((function(){Ne(e)?(d(!0),c(-1)):(d(!1),c(0))}));return t.observe(e,{childList:!0,subtree:!0}),()=>t.disconnect()}),[]),E().createElement("div",g({},i,{"aria-labelledby":v,id:m,className:y,ref:s,role:"tabpanel",tabIndex:l,hidden:h!==p}),n)}));function wr(e){let{children:t}=e;const n=C(),r=(0,b.useRef)([]),i=(0,b.useRef)([]);return O((()=>{const e=r.current[0]?.previousElementSibling,t=e?.classList.contains(`${n}--tabs--vertical`),o=e?.parentElement?.style.height;if(t&&!o){i.current=r.current.map((e=>e?.hidden||!1)),r.current.forEach((e=>{e&&(e.hidden=!1)}));const t=r.current.map((e=>e?.offsetHeight||0)),n=Math.max(...t);e.style.height=n+"px",r.current.forEach(((e,t)=>{e&&(e.hidden=i.current[t])}))}})),E().createElement(E().Fragment,null,E().Children.map(t,((e,t)=>(0,Qn.isElement)(e)?E().createElement(dr.Provider,{value:t},E().cloneElement(e,{ref:e=>{r.current[t]=e}})):null)))}br.propTypes={children:y().node,className:y().string},wr.propTypes={children:y().node};const Er=e=>{let{align:t="bottom",autoAlign:n,className:r,children:i,definition:o,defaultOpen:a=!1,id:s,openOnHover:l,tooltipText:c,triggerClassName:u,...d}=e;const[h,f]=(0,b.useState)(a),p=C(),m=function(e){const t=Ce();return e??t}(s);return E().createElement(oe,{align:t,className:r,autoAlign:n,dropShadow:!1,highContrast:!0,onMouseLeave:()=>{f(!1)},onMouseEnter:()=>{l&&f(!0)},onFocus:()=>{f(!0)},open:h},E().createElement("button",g({},d,{className:x()(`${p}--definition-term`,u),"aria-controls":m,"aria-expanded":h,onBlur:()=>{f(!1)},onMouseDown:e=>{0===e.button&&f(!h)},onKeyDown:function(e){h&&we(e,ue)&&(e.stopPropagation(),f(!1))},type:"button"}),i),E().createElement(se,{className:`${p}--definition-tooltip`,id:m},c??o))};var _r;Er.propTypes={align:y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),autoAlign:y().bool,children:y().node.isRequired,className:y().string,defaultOpen:y().bool,definition:y().node.isRequired,id:y().string,openOnHover:y().bool,tooltipText:te(y().node),triggerClassName:y().string};const xr={red:"Red",magenta:"Magenta",purple:"Purple",blue:"Blue",cyan:"Cyan",teal:"Teal",green:"Green",gray:"Gray","cool-gray":"Cool-Gray","warm-gray":"Warm-Gray","high-contrast":"High-Contrast",outline:"Outline"},Tr=E().forwardRef(((e,t)=>{let{children:n,className:r,decorator:i,id:o,type:a,filter:s,renderIcon:l,title:c="Clear filter",disabled:u,onClose:d,size:h,as:f,slug:p,...m}=e;const v=C(),y=(0,b.useRef)(),w=function(e){const t=b.useRef(void 0),n=b.useCallback((t=>{const n=e.map((e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}}));return()=>{n.forEach((e=>null==e?void 0:e()))}}),e);return b.useMemo((()=>e.every((e=>null==e))?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))}),e)}([t,y]),_=o||`tag-${Ce()}`,[T,S]=(0,b.useState)(!1);(0,b.useLayoutEffect)((()=>{const e=y.current?.getElementsByClassName(`${v}--tag__label`)[0];var t;S(!!(t=e)&&t?.offsetWidth<t?.scrollWidth)}),[v,y]);const O=[`${v}--tag--selectable`,`${v}--tag--filter`,`${v}--tag--operational`].some((e=>r?.includes(e))),A=x()(`${v}--tag`,r,{[`${v}--tag--disabled`]:u,[`${v}--tag--filter`]:s,[`${v}--tag--${h}`]:h,[`${v}--layout--size-${h}`]:h,[`${v}--tag--${a}`]:a,[`${v}--tag--interactive`]:m.onClick&&!O&&T}),M=void 0!==a&&a in Object.keys(xr)?xr[a]:"",N=e=>{d&&(e.stopPropagation(),d(e))};let k=E().isValidElement(p??i)?p??i:null;if(k&&"AILabel"===k.type?.displayName&&!O&&(k=E().cloneElement(k,{size:"sm",kind:"inline"})),s){const e=f??"div";return E().createElement(e,g({className:A,id:_},m),l&&"sm"!==h?E().createElement("div",{className:`${v}--tag__custom-icon`},E().createElement(l,null)):"",E().createElement(rt,{title:"string"==typeof n?n:void 0,className:`${v}--tag__label`},null!=n?n:M),k,E().createElement("button",{type:"button",className:`${v}--tag__close-icon`,onClick:N,disabled:u,"aria-label":c,title:c},_r||(_r=E().createElement(jt,null))))}const R=f??(m.onClick||r?.includes(`${v}--tag--operational`)?"button":"div"),D=x()({[`${v}--tag__label`]:!O});return E().createElement(R,g({ref:w,disabled:u,className:A,id:_,type:"button"===R?"button":void 0},m),l&&"sm"!==h?E().createElement("div",{className:`${v}--tag__custom-icon`},E().createElement(l,null)):"",T&&!O?E().createElement(Er,{openOnHover:!1,definition:null!=n?n:M,className:`${v}--definition--tooltip--tag`},E().createElement(rt,{title:null!=n&&"string"==typeof n?n:M,className:D},null!=n?n:M)):E().createElement(rt,{title:null!=n&&"string"==typeof n?n:M,className:D},null!=n?n:M),p?k:i?E().createElement("div",{className:`${v}--tag__decorator`},k):"")}));Tr.propTypes={as:y().elementType,children:y().node,className:y().string,decorator:y().node,disabled:y().bool,filter:te(y().bool),id:y().string,onClose:te(y().func),renderIcon:y().oneOfType([y().func,y().object]),size:y().oneOf(Object.keys({sm:"sm",md:"md",lg:"lg"})),slug:te(y().node),title:te(y().string),type:y().oneOf(Object.keys(xr))};const Sr=E().forwardRef(((e,t)=>{const{className:n,decorator:r,disabled:i=!1,id:o,labelText:a,hideLabel:s,onChange:l=Ze,onClick:c=Ze,onKeyDown:u=Ze,invalid:d=!1,invalidText:h="",helperText:f="",light:p,placeholder:m="",enableCounter:v=!1,maxCount:y,counterMode:w="character",warn:_=!1,warnText:T="",rows:S=4,slug:M,...N}=e,k=C(),{isFluid:R}=(0,b.useContext)(Tn),{defaultValue:D,value:I}=N,L=Ce(),$=(0,b.useRef)(null),P=A([t,$]);function B(){const e=(D||I||$.current?.value||"").toString();return"character"===w?e.length:e.match(/\w+/g)?.length||0}const[z,H]=(0,b.useState)(B());(0,b.useEffect)((()=>{H(B())}),[I,D,w]),O((()=>{N.cols&&$.current?($.current.style.width="",$.current.style.resize="none"):$.current&&($.current.style.width="100%")}),[N.cols]);const F={id:o,onKeyDown:e=>{if(!i&&v&&"word"===w){const t=e.which;(y&&z>=y&&32===t||y&&z>=y&&13===t)&&e.preventDefault()}!i&&u&&u(e)},onPaste:e=>{if(!i&&"word"===w&&v&&void 0!==y&&null!==$.current){const t=$.current.value.match(/\w+/g)||[],n=e.clipboardData.getData("Text").match(/\w+/g)||[];if(t.length+n.length>y){e.preventDefault();const r=t.concat(n).slice(0,y);setTimeout((()=>{H(y)}),0),$.current.value=r.join(" ")}}},onChange:e=>{if(!i){if("character"==w)e?.persist?.(),setTimeout((()=>{H(e.target?.value?.length)}),0);else if("word"==w){if(!e.target.value)return void setTimeout((()=>{H(0)}),0);if(v&&void 0!==y&&null!==$.current){const t=e.target?.value?.match(/\w+/g);t&&t.length<=y?($.current.removeAttribute("maxLength"),setTimeout((()=>{H(t.length)}),0)):t&&t.length>y&&setTimeout((()=>{H(t.length)}),0)}}l&&l(e)}},onClick:e=>{!i&&c&&c(e)}},U=x()(`${k}--form-item`,n),j=x()(`${k}--text-area__wrapper`,{[`${k}--text-area__wrapper--cols`]:N.cols,[`${k}--text-area__wrapper--readonly`]:N.readOnly,[`${k}--text-area__wrapper--warn`]:_,[`${k}--text-area__wrapper--slug`]:M,[`${k}--text-area__wrapper--decorator`]:r}),V=x()(`${k}--label`,{[`${k}--visually-hidden`]:s&&!R,[`${k}--label--disabled`]:i}),G=x()(`${k}--text-area`,{[`${k}--text-area--light`]:p,[`${k}--text-area--invalid`]:d,[`${k}--text-area--warn`]:_}),W=x()(`${k}--label`,{[`${k}--label--disabled`]:i,[`${k}--text-area__label-counter`]:!0}),q=x()(`${k}--form__helper-text`,{[`${k}--form__helper-text--disabled`]:i}),Y=a?E().createElement(rt,{as:"label",htmlFor:o,className:V},a):null,Z=v&&y&&("character"===w||"word"===w)?E().createElement(rt,{as:"div",className:W},`${z}/${y}`):null,X=f?`text-area-helper-text-${L}`:void 0,K=f?E().createElement(rt,{as:"div",id:X,className:q},f):null,Q=o+"-error-msg",J=d?E().createElement(rt,{as:"div",role:"alert",className:`${k}--form-requirement`,id:Q},h,R&&E().createElement(Xt.BF,{className:`${k}--text-area__invalid-icon`})):null,ee=_?E().createElement(rt,{as:"div",role:"alert",className:`${k}--form-requirement`},T,R&&E().createElement(Xt.OR,{className:`${k}--text-area__invalid-icon ${k}--text-area__invalid-icon--warning`})):null;let te;d?te=Q:d||_||R||!f||(te=X),v&&"character"==w&&(F.maxLength=y);const ne=(0,b.useRef)(null),[re,ie]=(0,b.useState)(""),oe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"characters";const r=t-e;return r<=10&&r>0?`${r} ${1===r?n.slice(0,-1):n} left.`:r<=0?`Maximum ${n} reached.`:null}(z,y,"word"===w?"words":void 0);(0,b.useEffect)((()=>{if(oe&&oe!==re){const e=ne.current;if(e){e.textContent="";const t=setTimeout((()=>{e&&(e.textContent=oe,ie(oe))}),"word"===w?2e3:1e3);return()=>{t&&clearTimeout(t)}}}}),[oe,re,w]);const ae=E().createElement("textarea",g({},N,F,{placeholder:m,"aria-readonly":!!N.readOnly,className:G,"aria-invalid":d,"aria-describedby":te,disabled:i,rows:S,readOnly:N.readOnly,ref:P}));let se=E().isValidElement(M??r)?M??r:null;return se&&"AILabel"===se.type?.displayName&&(se=E().cloneElement(se,{size:"mini"})),E().createElement("div",{className:U},E().createElement("div",{className:`${k}--text-area__label-wrapper`},Y,Z),E().createElement("div",{className:j,"data-invalid":d||null},d&&!R&&E().createElement(Xt.BF,{className:`${k}--text-area__invalid-icon`}),_&&!d&&!R&&E().createElement(Xt.OR,{className:`${k}--text-area__invalid-icon ${k}--text-area__invalid-icon--warning`}),ae,M?se:r?E().createElement("div",{className:`${k}--text-area__inner-wrapper--decorator`},se):"",E().createElement("span",{className:`${k}--text-area__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:ne},oe),R&&E().createElement("hr",{className:`${k}--text-area__divider`}),R&&d?J:null,R&&_&&!d?ee:null),d||_||R?null:K,d&&!R?J:null,!_||d||R?null:ee)}));Sr.displayName="TextArea",Sr.propTypes={className:y().string,cols:y().number,counterMode:y().oneOf(["character","word"]),decorator:y().node,defaultValue:y().oneOfType([y().string,y().number]),disabled:y().bool,enableCounter:y().bool,helperText:y().node,hideLabel:y().bool,id:y().string,invalid:y().bool,invalidText:y().node,labelText:y().node.isRequired,light:te(y().bool),maxCount:y().number,onChange:y().func,onClick:y().func,onKeyDown:y().func,placeholder:y().string,readOnly:y().bool,rows:y().number,slug:te(y().node),value:y().oneOfType([y().string,y().number]),warn:y().bool,warnText:y().node};var Or=n(9772),Ar=n.n(Or);const Mr={NONE:"NONE",DESC:"DESC",ASC:"ASC"},Cr=(e,t)=>`${e}:${t}`,Nr=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?kr(e,t,n):"object"==typeof e&&"object"==typeof t&&"string"==typeof e.props?.children&&"string"==typeof t.props?.children?kr(e.props.children,t.props.children,n):kr(""+e,""+t,n)},kr=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})},Rr=(e,t,n)=>{let{sortDirection:r,sortStates:i,locale:o}=n;return r===i.ASC?Nr(e,t,o):Nr(t,e,o)},Dr=Mr.NONE,Ir=(e,t,n)=>{let{key:r}=n;const{sortDirection:i,sortHeaderKey:o}=t,a=(s=i,r===o?"NONE"===s?Mr.ASC:"ASC"===s?Mr.DESC:Mr.NONE:Mr.ASC);var s;return Lr(e,t,r,a)},Lr=(e,t,n,r)=>{const{rowIds:i,cellsById:o,initialRowOrder:a}=t,{locale:s,sortRow:l}=e,c=r!==Mr.NONE?(e=>{let{rowIds:t,cellsById:n,sortDirection:r,key:i,locale:o="en",sortRow:a=Rr}=e;return t.slice().sort(((e,t)=>{const s=n[Cr(e,i)],l=n[Cr(t,i)];return a(s&&s.value,l&&l.value,{key:i,sortDirection:r,locale:o,sortStates:Mr,compare:Nr,rowIds:[e,t]})}))})({rowIds:i,cellsById:o,sortDirection:r,key:n,locale:s,sortRow:l}):a;return{sortHeaderKey:n,sortDirection:r,rowIds:c}};var $r=(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),o={},a={};return e.forEach(((e,n)=>{i[n]=e.id;const{id:s,isSelected:l=!1,isExpanded:c=!1,disabled:u=!1}=e;o[s]={id:s,isSelected:l,isExpanded:c,disabled:u,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(o[e.id].isSelected=r[e.id].isSelected,o[e.id].isExpanded=r[e.id].isExpanded),t.forEach(((t,n)=>{let{key:r,slug:i,decorator:s}=t;const l=Cr(e.id,r);a[l]={id:l,value:e[r],isEditable:!1,isEditing:!1,isValid:!0,errors:null,hasAILabelHeader:!(!i&&"AILabel"!==s?.type?.displayName),info:{header:r}},o[e.id].cells[n]=l}))})),{rowIds:i,rowsById:o,cellsById:a}}(e.rows,e.headers,t),o={rowIds:n,rowsById:r,cellsById:i,sortDirection:t.sortDirection||Dr,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=Lr(e,o,t.sortHeaderKey,t.sortDirection);o.rowIds=n}return o.isExpandedAll=o.rowIds.every((e=>!0===o.rowsById[e].isExpanded)),o},Pr=(e,t,n)=>e.map((e=>({...t[e],cells:t[e].cells.map((e=>n[e]))})));const Br=e=>{let{rowIds:t,headers:n,cellsById:r,inputValue:i,getCellId:o}=e;return t.filter((e=>n.some((t=>{let{key:n}=t;const a=o(e,n);return"boolean"!=typeof r[a].value&&(""+r[a].value).toLowerCase().includes(i.toLowerCase())}))))},zr=(0,b.createContext)({titleId:void 0,descriptionId:void 0}),Hr=(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 o=n.letterSpacing?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(i+=Number(o[0])*(e.textContent?.length??0));const a=n.paddingLeft?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(i+=Number(a[0]));const s=n.paddingLeft?.split("px");return s&&s.length&&!isNaN(Number(s[0]))&&(i+=Number(s[0])),i>e.getBoundingClientRect().width},Fr=e=>{let{className:t,children:n,useZebraStyles:r,size:i="lg",isSortable:o=!1,useStaticWidth:a,stickyHeader:s,overflowMenuOnHover:l=!0,experimentalAutoAlign:c=!1,tabIndex:u,...d}=e;const{titleId:h,descriptionId:f}=(0,b.useContext)(zr),p=C(),[m,v]=(0,b.useState)(!1),y=(0,b.useRef)(null),w=x()(`${p}--data-table`,t,{[`${p}--data-table--${i}`]:i,[`${p}--data-table--sort`]:o,[`${p}--data-table--zebra`]:r,[`${p}--data-table--static`]:a,[`${p}--data-table--sticky-header`]:s,[`${p}--data-table--visible-overflow-menu`]:!l}),_=(0,b.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?y.current?.classList.add(`${p}--data-table--top-aligned-body`):y.current?.classList.remove(`${p}--data-table--top-aligned-body`)}),[p]),T=(0,b.useCallback)((function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?y.current?.classList.add(`${p}--data-table--top-aligned-header`):y.current?.classList.remove(`${p}--data-table--top-aligned-header`)}),[p]),S=(0,b.useCallback)((()=>{if(c){const e=document.createElement("canvas").getContext("2d");if(y.current&&e){const t=Array.from(y.current.querySelectorAll("td")).some((t=>Hr(t,e))),n=Array.from(y.current.querySelectorAll("th")).some((t=>{const n=t.querySelector(`.${p}--table-header-label`);return n&&Hr(n,e)}));_(t),T(n)}}else _(!1),T(!1)}),[c,_,T,p]);k("resize",nr(S,100));const A=(0,b.useCallback)((()=>{const e=y?.current?.parentNode,t=y?.current?.firstChild;v(t?.scrollWidth>e?.clientWidth)}),[]);k("resize",nr(A,100)),O((()=>{A()}),[A]),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then((()=>{S()})),O((()=>{S()}),[S,i]);const M=E().createElement("div",{className:`${p}--data-table-content`,tabIndex:u??(m?0:void 0)},E().createElement("table",g({"aria-labelledby":h,"aria-describedby":f},d,{className:w,ref:y}),n));return s?E().createElement("section",{className:`${p}--data-table_inner-container`},M):M};Fr.propTypes={children:y().node,className:y().string,experimentalAutoAlign:y().bool,isSortable:y().bool,overflowMenuOnHover:y().bool,size:y().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:y().bool,useStaticWidth:y().bool,useZebraStyles:y().bool,tabIndex:y().number};const Ur=e=>{let{name:t,className:n,type:r}=e;function i(e){let{className:t,...i}=e;const o=C(),a=x()("function"==typeof n?n(o):n,t);return E().createElement(r,{...i,className:a||void 0})}return i.displayName=t,i.propTypes={className:y().string},i},jr=Ur({name:"TableActionList",type:"div",className:e=>`${e}--action-list`}),Vr=e=>{let{renderIcon:t=xn.on,iconDescription:n="Add",...r}=e;return E().createElement(ze,g({renderIcon:t,iconDescription:n},r))};Vr.propTypes={hasIconOnly:y().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:y().oneOfType([y().func,y().object])};const Gr={"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"},Wr=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?Gr[e]:"carbon.table.batch.selectAll"===e?`${Gr[e]} (${n})`:`${t} ${Gr[e]}`},qr=e=>{let{className:t,children:n,shouldShowBatchActions:r,totalSelected:i,totalCount:o,onCancel:a,onSelectAll:s,translateWithId:l=Wr,...c}=e;const[u,d]=E().useState(!1),h=C(),f=x()({[`${h}--batch-actions`]:!0,[`${h}--batch-actions--active`]:r},t),p=x()(`${h}--batch-summary`,{[`${h}--batch-summary__scroll`]:u});return E().createElement("div",g({onScroll:()=>{d(!u)},"aria-hidden":!r,className:f},c),E().createElement("div",{className:p},E().createElement("p",{className:`${h}--batch-summary__para`},E().createElement(rt,null,l(i>1||0===i?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:i}))),s&&E().createElement(E().Fragment,null,E().createElement("span",{className:`${h}--batch-summary__divider`},"|"),E().createElement(ze,{onClick:s,tabIndex:r?0:-1},l("carbon.table.batch.selectAll",{totalCount:o})))),E().createElement(jr,null,n,E().createElement(ze,{className:`${h}--batch-summary__cancel`,tabIndex:r?0:-1,onClick:a},l("carbon.table.batch.cancel"))))};qr.translationKeys=["carbon.table.batch.cancel","carbon.table.batch.items.selected","carbon.table.batch.item.selected","carbon.table.batch.selectAll"],qr.propTypes={children:y().node,className:y().string,onCancel:y().func.isRequired,onSelectAll:y().func,shouldShowBatchActions:y().bool,totalCount:y().number,totalSelected:y().number.isRequired,translateWithId:y().func};const Yr=e=>{let{children:t,className:n,...r}=e;return E().createElement("tbody",g({"aria-live":r["aria-live"]??"polite",className:n},r),t)};Yr.propTypes={"aria-live":y().oneOf(["polite","assertive","off"]),children:y().node,className:y().string};const Zr=E().forwardRef(((e,t)=>{let{children:n,className:r,hasAILabelHeader:i,colSpan:o,...a}=e;const s=C(),l=x()(r,{[`${s}--table-cell--column-slug`]:i});return E().createElement("td",g({className:l||void 0,ref:t,colSpan:o},a),n)}));Zr.displayName="TableCell";const Xr=E().createContext(1),Kr=E().forwardRef((function(e,t){let{as:n="section",level:r,...i}=e;const o=E().useContext(Xr),a=r??o+1,s=n;return E().createElement(Xr.Provider,{value:Math.min(a,6)},E().createElement(s,g({ref:t},i)))}));Kr.propTypes={as:y().elementType,children:y().node,className:y().string,level:y().number};const Qr=E().forwardRef((function(e,t){const n=`h${E().useContext(Xr)}`;return E().createElement(n,g({ref:t},e))}));Qr.propTypes={children:y().node,className:y().string};const Jr=e=>{let{className:t,children:n,title:r,description:i,stickyHeader:o,useStaticWidth:a,...s}=e;const l=Ce("tc"),c=`${l}-title`,u=`${l}-description`,d=C(),h=x()(t,`${d}--data-table-container`,{[`${d}--data-table--max-width`]:o,[`${d}--data-table-container--static`]:a}),f=(0,b.useMemo)((()=>({titleId:r?c:void 0,descriptionId:i?u:void 0})),[r,i,c,u]);return E().createElement(zr.Provider,{value:f},E().createElement(Kr,g({},s,{className:h}),(r||i)&&E().createElement("div",{className:`${d}--data-table-header`},r&&E().createElement(Qr,{className:`${d}--data-table-header__title`,id:c},r),i&&E().createElement("p",{className:`${d}--data-table-header__description`,id:u},i)),n))};Jr.propTypes={children:y().node,className:y().string,description:y().node,stickyHeader:y().bool,title:y().node,useStaticWidth:y().bool};const ei=e=>{let{className:t,decorator:n}=e;const r=C(),i=x()({...t&&{[t]:!0},[`${r}--table-column-decorator`]:!0,[`${r}--table-column-decorator--active`]:n});let o=E().isValidElement(n)?n:null;return o&&"AILabel"===o.type?.displayName&&(o=E().cloneElement(o,{size:"mini"})),E().createElement("td",{className:i},o)};function ti(e,t){return function(e,n,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return t(e,n,r,...o)}}ei.displayName="TableDecoratorRow",ei.propTypes={className:y().string,decorator:y().node};const ni=e=>{let{"aria-controls":t,"aria-label":n,ariaLabel:r,className:i,enableExpando:o,enableToggle:a,id:s="expand",isExpanded:l,onExpand:c,expandIconDescription:u,children:d,...h}=e;const f=C(),p=x()(`${f}--table-expand`,i),m=l?"collapsed":void 0;return E().createElement("th",g({scope:"col",className:p,"data-previous-value":m,id:s},h),o||a?E().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:c,title:u,"aria-label":r||n,"aria-expanded":l,"aria-controls":t},E().createElement(Ut,{className:`${f}--table-expand__svg`,"aria-label":u})):null,d)};ni.propTypes={"aria-controls":y().string,"aria-label":y().string,ariaLabel:y().string,children:y().node,className:y().string,enableExpando:te(y().bool),enableToggle:y().bool,expandIconDescription:y().string,id:y().string,isExpanded:ti(0,y().bool),onExpand:y().oneOfType([ti(0,y().func),ti(0,y().func)])};const ri=E().forwardRef(((e,t)=>{let{"aria-controls":n,"aria-label":r,ariaLabel:i,className:o,children:a,isExpanded:s,onExpand:l,expandIconDescription:c,isSelected:u,expandHeader:d="expand",...h}=e;const f=C();let p;const m=E().Children.toArray(a).map((e=>{if("TableSlugRow"===e.type?.displayName||"TableDecoratorRow"===e.type?.displayName)return(e.props.slug||"AILabel"===e.props.decorator?.type.displayName)&&(p=!0),e})),v=E().Children.toArray(a).map((e=>{if("TableSlugRow"!==e.type?.displayName&&"TableDecoratorRow"!==e.type?.displayName)return e})),y=x()({[`${f}--parent-row`]:!0,[`${f}--expandable-row`]:s,[`${f}--data-table--selected`]:u,[`${f}--data-table--slug-row ${f}--data-table--ai-label-row`]:p},o),b=s?"collapsed":void 0;return E().createElement("tr",g({},h,{ref:t,className:y,"data-parent-row":!0}),m,E().createElement(Zr,{className:`${f}--table-expand`,"data-previous-value":b,headers:d},E().createElement("button",{type:"button",className:`${f}--table-expand__button`,onClick:l,title:c,"aria-label":i||r,"aria-expanded":s,"aria-controls":n},E().createElement(Ut,{className:`${f}--table-expand__svg`,"aria-label":c}))),v)}));ri.propTypes={"aria-controls":y().string,"aria-label":y().string,ariaLabel:y().string,children:y().node,className:y().string,expandHeader:y().string,expandIconDescription:y().string,isExpanded:y().bool,isSelected:y().bool,onExpand:y().func.isRequired},ri.displayName="TableExpandRow";const ii=e=>{let{className:t,children:n,colSpan:r,...i}=e;const o=(0,b.useRef)(null),a=C(),s=x()(`${a}--expandable-row`,t),l=e=>{if(o&&o.current&&o.current.previousElementSibling){const t=o.current.previousElementSibling;"enter"===e?t.classList.add(`${a}--expandable-row--hover`):t.classList.remove(`${a}--expandable-row--hover`)}};return E().createElement("tr",g({ref:o,onMouseEnter:()=>l("enter"),onMouseLeave:()=>l("leave")},i,{className:s,"data-child-row":!0}),E().createElement(Zr,{colSpan:r},E().createElement("div",{className:`${a}--child-row-inner-container`},n)))};ii.propTypes={children:y().node,className:y().string,colSpan:y().number.isRequired};const oi=Ur({name:"TableHead",type:"thead"});var ai;const si=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},ai||(ai=E().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)})),li="col",ci={buttonDescription:"carbon.table.header.icon.description"},ui=(e,t)=>t&&e===ci.buttonDescription?t.isSortHeader&&Mr?t.sortDirection===Mr.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===Mr.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`:"",di={[Mr.NONE]:"none",[Mr.ASC]:"ascending",[Mr.DESC]:"descending"},hi=E().forwardRef((function(e,t){let{className:n,children:r,colSpan:i,decorator:o,isSortable:a=!1,isSortHeader:s,onClick:l,scope:c=li,sortDirection:u,translateWithId:d=ui,slug:h,id:f,...p}=e;const m=C(),v=Ce("table-sort"),y=(0,b.useRef)(null);let w,_=E().isValidElement(h??o)?h??o:null;_&&"AILabel"===_.type?.displayName&&(w=!0,_=E().cloneElement(_,{size:"mini",ref:y}));const T=x()({[`${m}--table-header-label`]:!0,[`${m}--table-header-label--slug ${m}--table-header-label--ai-label`]:w,[`${m}--table-header-label--decorator`]:o});if(!a)return E().createElement("th",g({},p,{id:f,className:n,scope:c,colSpan:i,ref:t}),r?E().createElement("div",{className:T},r,E().createElement("div",{className:`${m}--table-header-label--decorator-inner`},_)):null);const S=x()(n,{[`${m}--table-sort`]:!0,[`${m}--table-sort--active`]:s&&u!==Mr.NONE,[`${m}--table-sort--descending`]:s&&u===Mr.DESC}),O=s&&u?di[u]:"none",A=d&&d("carbon.table.header.icon.description",{header:r,sortDirection:u,isSortHeader:s,sortStates:Mr}),M=x()(n,`${m}--table-sort__header`,{[`${m}--table-sort__header--ai-label`]:w,[`${m}--table-sort__header--decorator`]:o});return E().createElement("th",{id:f,"aria-sort":O,className:M,colSpan:i,ref:t,scope:c},E().createElement("div",{className:`${m}--table-sort__description`,id:v},A),E().createElement("button",g({type:"button","aria-describedby":v,className:S,onClick:e=>{if(!(w&&y.current&&y.current.contains(e.target)))return l?l(e):void 0}},p),E().createElement("span",{className:`${m}--table-sort__flex`},E().createElement("div",{className:`${m}--table-header-label`},r),E().createElement(xn.Do,{size:20,className:`${m}--table-sort__icon`}),E().createElement(si,{size:20,className:`${m}--table-sort__icon-unsorted`}),E().createElement("div",{className:`${m}--table-header-label--decorator-inner`},_))))}));hi.propTypes={children:y().node,className:y().string,colSpan:y().number,id:y().string,isSortHeader:y().bool,isSortable:y().bool,onClick:y().func,scope:y().string,sortDirection:y().oneOf(Object.values(Mr)),translateWithId:y().func},hi.translationKeys=Object.values(ci),hi.displayName="TableHeader";const fi=E().forwardRef(((e,t)=>{const n=C();let r;e?.children&&E().Children.toArray(e.children).map((e=>{"TableSlugRow"!==e.type?.displayName&&"TableDecoratorRow"!==e.type?.displayName||(e.props.slug||"AILabel"===e.props.decorator?.type.displayName)&&(r=!0)}));const i=x()(e.className,{[`${n}--data-table--selected`]:e.isSelected,[`${n}--data-table--slug-row ${n}--data-table--ai-label-row`]:r}),{ariaLabel:o,"aria-label":a,"aria-controls":s,onExpand:l,isExpanded:c,isSelected:u,...d}=e;return i&&(d.className=i),E().createElement("tr",g({ref:t},d))}));fi.propTypes={className:y().string,isSelected:y().bool};const pi=E().forwardRef((function(e,t){const{"aria-label":n,ariaLabel:r,checked:i=!1,disabled:o,id:a,indeterminate:s,name:l,onChange:c=()=>{},onClick:u,onKeyDown:d,title:h}=e,f=C(),p=(0,b.useRef)(null),m=A([p,t]),g={checked:i,className:`${f}--checkbox`,disabled:o,id:a,name:l,onClick:u?function(e){s&&(e.target.checked=!1),u?.(e)}:u,onChange:e=>{c(e.target.checked,a,e)},onKeyDown:d,ref:m,type:"checkbox"};return s&&(g.checked=!1),(0,b.useEffect)((()=>{p?.current&&(p.current.indeterminate=s||!1)}),[s]),E().createElement("div",{className:`${f}--checkbox--inline`},E().createElement("input",g),E().createElement("label",{htmlFor:a,className:`${f}--checkbox-label`,title:h,onClick:e=>{e.stopPropagation()}},E().createElement("span",{className:`${f}--visually-hidden`},r||n)))}));pi.propTypes={"aria-label":y().string.isRequired,ariaLabel:te(y().string.isRequired),checked:y().bool,disabled:y().bool,id:y().string.isRequired,indeterminate:y().bool,name:y().string.isRequired,onChange:y().func,onClick:y().func,onKeyDown:y().func,title:y().string};const mi=e=>{let{ariaLabel:t="Select all rows in the table","aria-label":n,checked:r,id:i,indeterminate:o,name:a,onSelect:s,disabled:l,className:c}=e;const u=C();return E().createElement("th",{"aria-live":"off",scope:"col",className:x()(`${u}--table-column-checkbox`,c)},E().createElement(pi,{"aria-label":n||t,checked:r,id:i,indeterminate:o,name:a,onClick:s,disabled:l}))};mi.propTypes={"aria-label":y().string,ariaLabel:te(y().string),checked:y().bool,className:y().string,disabled:y().bool,id:y().string.isRequired,indeterminate:y().bool,name:y().string.isRequired,onSelect:y().func.isRequired};var gi=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 vi=E().forwardRef(((e,t)=>{const{className:n,decorator:r,disabled:i,hideLabel:o,id:a,labelPosition:s="right",labelText:l="",name:c,onChange:u=()=>{},value:d="",slug:h,required:f,...p}=e,m=C(),v=Ce("radio-button"),y=a||v,w=x()(`${m}--radio-button__label-text`,{[`${m}--visually-hidden`]:o}),_=x()(n,`${m}--radio-button-wrapper`,{[`${m}--radio-button-wrapper--label-${s}`]:"right"!==s,[`${m}--radio-button-wrapper--slug`]:h,[`${m}--radio-button-wrapper--decorator`]:r}),T=(0,b.useRef)(null);let S=E().isValidElement(h??r)?h??r:null;if(S&&"AILabel"===S.type?.displayName){const e="inline"===S.props?.kind?"md":"mini";S=E().cloneElement(S,{size:e})}return E().createElement("div",{className:_},E().createElement("input",g({},p,{type:"radio",className:`${m}--radio-button`,onChange:function(e){u(d,c,e)},id:y,ref:gi(T,t),disabled:i,value:d,name:c,required:f})),E().createElement("label",{htmlFor:y,className:`${m}--radio-button__label`},E().createElement("span",{className:`${m}--radio-button__appearance`}),l&&E().createElement(rt,{className:w},l,h?S:r?E().createElement("div",{className:`${m}--radio-button-wrapper-inner--decorator`},S):"")))}));vi.displayName="RadioButton",vi.propTypes={checked:y().bool,className:y().string,decorator:y().node,defaultChecked:y().bool,disabled:y().bool,hideLabel:y().bool,id:y().string,labelPosition:y().oneOf(["right","left"]),labelText:y().node.isRequired,name:y().string,onChange:y().func,onClick:y().func,required:y().bool,slug:te(y().node),value:y().oneOfType([y().string,y().number])};const yi=e=>{let{ariaLabel:t,"aria-label":n,checked:r,id:i,name:o,onSelect:a,onChange:s,disabled:l,radio:c,className:u}=e;const d=C(),h=Ce(),f=s?(e,t,n)=>{s(!!e,t||"",n)}:void 0,p=s?(e,t,n)=>{s(e,t,n)}:void 0,m={id:i,name:o||h,onClick:a,checked:r,disabled:l},v=n||t||"",y=x()(`${d}--table-column-checkbox`,{...u&&{[u]:!0},[`${d}--table-column-radio`]:c});return E().createElement("td",{className:y,"aria-live":"off"},c?E().createElement(vi,g({},m,{labelText:v,onChange:f,hideLabel:!0})):E().createElement(pi,g({},m,{"aria-label":v,onChange:p})))};yi.propTypes={"aria-label":y().string,ariaLabel:te(y().string),checked:y().bool,className:y().string,disabled:y().bool,id:y().string.isRequired,name:y().string.isRequired,onChange:y().func,onSelect:y().func.isRequired,radio:y().bool};const bi={},wi=e=>{let{className:t,slug:n}=e;(0,b.useEffect)((()=>{var e;(e="TableSlugRow")&&(bi[e]||(bi[e]=!0))}),[]);const r=C(),i=x()({...t&&{[t]:!0},[`${r}--table-column-slug`]:!0,[`${r}--table-column-slug--active`]:n});let o;return n&&(o=E().cloneElement(n,{size:"mini"})),E().createElement("td",{className:i},o)};wi.displayName="TableSlugRow",wi.propTypes={className:y().string,slug:y().node};const Ei=e=>{let{"aria-label":t="data table toolbar",ariaLabel:n,children:r,size:i,...o}=e;const a=C(),s=x()({[`${a}--table-toolbar`]:!0,[`${a}--table-toolbar--${i}`]:i});return E().createElement("section",g({"aria-label":n||t},o,{className:s}),r)};Ei.propTypes={"aria-label":y().string,ariaLabel:te(y().string),children:y().node,size:y().oneOf(["sm","lg"])};const _i=E().forwardRef((function(e,t){let{className:n,closeMenu:r,disabled:i=!1,handleOverflowMenuItemFocus:o,hasDivider:a=!1,href:s,isDelete:l=!1,index:c,itemText:u="Provide itemText",onClick:d=()=>{},onKeyDown:h=()=>{},requireTitle:f,title:p,wrapperClassName:m,...v}=e;const y=C(),b=x()(`${y}--overflow-menu-options__btn`,n),w=x()(`${y}--overflow-menu-options__option`,{[`${y}--overflow-menu--divider`]:a,[`${y}--overflow-menu-options__option--danger`]:l,[`${y}--overflow-menu-options__option--disabled`]:i},m),_=s?"a":"button",T="string"!=typeof u?u:E().createElement("div",{className:`${y}--overflow-menu-options__option-content`},u);return E().createElement(rt,{as:"li",className:w,role:"none"},E().createElement(_,g({className:b,disabled:i,href:s,onClick:function(e){d(e),r&&r()},onKeyDown:e=>{!function(e){we(e,ve)&&o?.({currentIndex:c,direction:1}),we(e,me)&&o?.({currentIndex:c,direction:-1})}(e),h(e)},role:"menuitem",ref:t,tabIndex:-1,title:f?p||u:void 0},v),T))}));_i.propTypes={className:y().string,closeMenu:y().func,disabled:y().bool,handleOverflowMenuItemFocus:y().func,hasDivider:y().bool,href:y().string,index:y().number,isDelete:y().bool,itemText:y().node.isRequired,onBlur:y().func,onClick:y().func,onFocus:y().func,onKeyDown:y().func,onKeyUp:y().func,onMouseDown:y().func,onMouseEnter:y().func,onMouseLeave:y().func,onMouseUp:y().func,requireTitle:y().bool,title:y().string,wrapperClassName:y().string};const xi=E().forwardRef(((e,t)=>{let{children:n,...r}=e;return E().createElement(_i,g({ref:t,itemText:n},r))}));xi.displayName="TableToolbarAction",xi.propTypes={children:y().node,className:y().string,onClick:y().func.isRequired};const Ti=Ur({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`});var Si,Oi,Ai,Mi,Ci,Ni;const ki=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Si||(Si=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Oi||(Oi=E().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)})),Ri=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return 16===r||"16"===r||"16px"===r?E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...i},Ai||(Ai=E().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"})),Mi||(Mi=E().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):E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},Ci||(Ci=E().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"})),Ni||(Ni=E().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)}));var Di;const Ii=E().forwardRef((function(e,t){let{autoComplete:n="off",className:r,closeButtonLabelText:i="Clear search input",defaultValue:o,disabled:a,isExpanded:s=!0,id:l,labelText:c,light:u,onChange:d=()=>{},onClear:h=()=>{},onKeyDown:f,onExpand:p,placeholder:m="Search",renderIcon:v,role:y="searchbox",size:w="md",type:_="text",value:T,...S}=e;const O=!(!T&&!o),M=C(),{isFluid:N}=(0,b.useContext)(Tn),k=(0,b.useRef)(null),R=A([t,k]),D=(0,b.useRef)(null),I=Ce("search-input"),L=l||I,$=`${L}-search`,[P,B]=(0,b.useState)(O||!1),[z,H]=(0,b.useState)(T),F=x()({[`${M}--search`]:!0,[`${M}--search--sm`]:"sm"===w,[`${M}--search--md`]:"md"===w,[`${M}--search--lg`]:"lg"===w,[`${M}--search--light`]:u,[`${M}--search--disabled`]:a,[`${M}--search--fluid`]:N},r),U=x()({[`${M}--search-close`]:!0,[`${M}--search-close--hidden`]:!P||!s});function j(){!T&&k.current&&(k.current.value="");const e=Object.assign({},k.current,{value:""});d({target:e,type:"change"}),h(),B(!1),k.current?.focus()}return T!==z&&(B(!!T),H(T)),E().createElement("div",{role:"search","aria-label":m,className:F},E().createElement("div",{"aria-label":p?"button":void 0,"aria-labelledby":p?$:void 0,role:p?"button":void 0,className:`${M}--search-magnifier`,onClick:p,onKeyDown:function(e){(we(e,ce)||we(e,de))&&(e.stopPropagation(),p&&p(e))},tabIndex:p&&!s?0:-1,ref:D,"aria-expanded":!(!p||!s)||!(p&&!s)&&void 0,"aria-controls":p?L:void 0},E().createElement(Li,{icon:v})),E().createElement("label",{id:$,htmlFor:L,className:`${M}--label`},c),E().createElement("input",g({autoComplete:n,className:`${M}--search-input`,defaultValue:o,disabled:a,role:y,ref:R,id:L,onChange:Pe([d,function(e){B(""!==e.target.value)}]),onKeyDown:Pe([f,function(e){we(e,ue)&&(e.stopPropagation(),k.current?.value?j():p&&s&&D.current?.focus())}]),placeholder:m,type:_,value:T,tabIndex:p&&!s?-1:void 0},S)),E().createElement("button",{"aria-label":i,className:U,disabled:a,onClick:j,title:i,type:"button"},Di||(Di=E().createElement(jt,null))))}));function Li(e){let{icon:t}=e;const n=C();return t?E().createElement(t,{className:`${n}--search-magnifier-icon`}):E().createElement(ki,{className:`${n}--search-magnifier-icon`})}Ii.displayName="Search",Ii.propTypes={autoComplete:y().string,className:y().string,closeButtonLabelText:y().string,defaultValue:y().oneOfType([y().string,y().number]),disabled:y().bool,id:y().string,isExpanded:y().bool,labelText:y().node.isRequired,light:te(y().bool),onChange:y().func,onClear:y().func,onExpand:y().func,onKeyDown:y().func,placeholder:y().string,renderIcon:y().oneOfType([y().func,y().object]),role:y().string,size:y().oneOf(["sm","md","lg"]),type:y().string,value:y().oneOfType([y().string,y().number])},Li.propTypes={icon:y().oneOfType([y().func,y().object])};const $i={"carbon.table.toolbar.search.label":"Filter table","carbon.table.toolbar.search.placeholder":"Filter table"},Pi=e=>$i[e],Bi=e=>{let{className:t,searchContainerClass:n,onChange:r,onClear:i=Ze,translateWithId:o=Pi,placeholder:a,labelText:s,expanded:l,defaultExpanded:c,defaultValue:u,disabled:d,onExpand:h,persistent:f=!1,id:p,onBlur:m,onFocus:v,size:y="lg",tabIndex:w="0",..._}=e;const{current:T}=(0,b.useRef)(void 0!==l),[S,O]=(0,b.useState)(Boolean(c||u)),A=T?l:S,[M,N]=(0,b.useState)(u||""),k=Ce("table-toolbar-search"),[R,D]=(0,b.useState)(null),I=C();(0,b.useEffect)((()=>{R&&(R.current?.querySelector?.("input")?.focus(),D(null))}),[R]),(0,b.useEffect)((()=>{u&&r?.("",u)}),[]);const L=x()(t,{[n]:n,[`${I}--toolbar-search-container-active`]:A,[`${I}--toolbar-search-container-disabled`]:d,[`${I}--toolbar-search-container-expandable`]:!f,[`${I}--toolbar-search-container-persistent`]:f}),$=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!A;d||(T||f||O(t),h&&h(e,t))};return E().createElement(Ii,g({disabled:d,className:L,value:M,id:void 0!==p?p:k,labelText:s||o("carbon.table.toolbar.search.label"),placeholder:a||o("carbon.table.toolbar.search.placeholder"),onChange:e=>{N(e.target.value),r&&r(e,e.target.value)},onClear:i,onFocus:v?e=>v(e,$):e=>$(e,!0),onBlur:m?e=>m(e,$):e=>!M&&$(e,!1),size:y,tabIndex:w},_))};var zi,Hi,Fi;Bi.propTypes={children:y().node,className:y().string,defaultExpanded:y().bool,defaultValue:y().string,disabled:y().bool,expanded:y().bool,id:y().string,labelText:y().string,onBlur:y().func,onChange:y().func,onClear:y().func,onExpand:y().func,onFocus:y().func,persistent:y().bool,placeholder:y().string,searchContainerClass:y().string,size:y().oneOf(["sm","md","lg"]),tabIndex:y().oneOfType([y().number,y().string]),translateWithId:y().func};const Ui=E().forwardRef((function(e,t){let{children:n,size:r=16,...i}=e;return E().createElement(xt.A,{width:r,height:r,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...i},zi||(zi=E().createElement("circle",{cx:"16",cy:"8",r:"2"})),Hi||(Hi=E().createElement("circle",{cx:"16",cy:"16",r:"2"})),Fi||(Fi=E().createElement("circle",{cx:"16",cy:"24",r:"2"})),n)}));function ji(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"enableSelectableItems":return{...e,hasSelectableItems:!0};case"registerItem":return{...e,items:[...e.items,t.payload].filter((e=>null!==e.ref.current))}}}const Vi=(0,b.createContext)({state:{isRoot:!0,hasIcons:!1,hasSelectableItems:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:e=>{}}),Gi=E().createContext({direction:"ltr"}),Wi=(0,b.forwardRef)((function(e,t){let{children:n,className:r,containerRef:i,label:o,menuAlignment:a,mode:s,onClose:l,onOpen:c,open:u,size:d="sm",legacyAutoalign:h="true",target:f=_e&&document.body,x:p=0,y:m=0,...v}=e;const y=C(),w=(0,b.useRef)(null),_=(0,b.useContext)(Vi),T=_.state.isRoot,S=T?d:_.state.size,[O,M]=(0,b.useReducer)(ji,{..._.state,isRoot:!1,size:d,requestCloseRoot:T?H:_.state.requestCloseRoot}),N=(0,b.useMemo)((()=>({state:O,dispatch:M})),[O,M]),k=(0,b.useRef)(null),R=A([t,k]),[I,L]=(0,b.useState)([-1,-1]),$=N.state.items.filter((e=>!e.disabled&&e.ref.current));let P;if(i?.current){const{width:e}=i.current.getBoundingClientRect();P=e}const{direction:B}=(0,b.useContext)(Gi);function z(){w.current&&w.current.focus()}function H(e){/^key/.test(e.type)?window.addEventListener("keyup",z,{once:!0}):"click"===e.type&&k.current?k.current.addEventListener("focusout",z,{once:!0}):z(),l&&l()}function F(e){const t=$.findIndex((e=>e.ref?.current?.contains(document.activeElement)));let n=t;if(-1===t?n=0:e&&(we(e,me)&&(n-=1),we(e,ve)&&(n+=1)),n<0&&(n=$.length-1),n>=$.length&&(n=0),n!==t){const t=$[n];t.ref?.current?.focus(),e?.preventDefault()}}function U(e,t){if(!k.current)return;const{width:n,height:r}=k.current.getBoundingClientRect(),i=T?"vertical":"horizontal",o={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:T?0:4}};if(P&&P<o.x.size&&("bottom"===a||"top"===a)&&(o.x.size=P),P&&("bottom-end"===a||"top-end"===a)&&o.x.anchor>=87&&P<o.x.size){const e=o.x.anchor+o.x.reversedAnchor;o.x.anchor=o.x.anchor+e}const{max:s,size:l,anchor:c,reversedAnchor:u,offset:d}=o[t],h=[s-8-l-c>=0&&c-d,u-l>=0&&u-l+d,s-8-l],f="top"===a||"top-end"===a||"top-start"===a;"number"==typeof h[0]&&f&&h[0]>=0&&!h[1]&&"y"===t?k.current.style.transform="translate(0)":f&&!h[0]&&"y"===t&&(h[0]=c-d);const p=h.find((e=>!1!==e));return p>=8?p:8}function j(e){return null!=e}function V(e){if(Array.isArray(e)){const t=e.filter(j);return 2===t.length?t:void 0}return[e,e]}(0,b.useEffect)((()=>{u&&$.length>0&&F()}),[u,$]),(0,b.useEffect)((()=>{u?function(){if(k.current){if(w.current=document.activeElement,h){const e=function(){const e={x:V(p),y:V(m)};return e.x&&e.y?[U(e.x,"x")??-1,U(e.y,"y")??-1]:[-1,-1]}();"rtl"!==document?.dir&&"rtl"!==B||v?.id?.includes("MenuButton")?(k.current.style.insetInlineStart=`${e[0]}px`,k.current.style.insetInlineEnd="initial"):(k.current.style.insetInlineStart="initial",k.current.style.insetInlineEnd=`${e[0]}px`),k.current.style.insetBlockStart=`${e[1]}px`,L(e)}k.current.focus(),c&&c()}}():L([-1,-1])}),[u]);const G=x()(r,`${y}--menu`,`${y}--menu--${S}`,{[`${y}--menu--box-shadow-top`]:a&&"top"===a.slice(0,3),[`${y}--menu--open`]:u,[`${y}--menu--shown`]:u&&!h||I[0]>=0&&I[1]>=0,[`${y}--menu--with-icons`]:N.state.hasIcons,[`${y}--menu--with-selectable-items`]:N.state.hasSelectableItems,[`${y}--autoalign`]:!h}),W=E().createElement(Vi.Provider,{value:N},E().createElement("ul",g({},v,{className:G,role:"menu",ref:R,"aria-label":o,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(we(e,ue)||!T&&we(e,pe))&&l?H(e):F(e)},onBlur:function(e){u&&l&&T&&!k.current?.contains(e.relatedTarget)&&H(e)}}),n));return f&&T?u&&(0,D.createPortal)(W,f)||null:W}));Wi.propTypes={children:y().node,className:y().string,label:y().string,menuAlignment:y().string,mode:te(y().oneOf(["full","basic"])),onClose:y().func,onOpen:y().func,open:y().bool,size:y().oneOf(["xs","sm","md","lg"]),target:y().object,x:y().oneOfType([y().number,y().arrayOf(y().number)]),y:y().oneOfType([y().number,y().arrayOf(y().number)])};const qi="md",Yi=E().forwardRef((function(e,t){let{autoAlign:n=!1,children:r,className:i,label:o="Options",renderIcon:a=Ui,size:s=qi,menuAlignment:l="bottom-start",tooltipAlignment:c,menuTarget:u,...d}=e;const h=re("enable-v12-dynamic-floating-styles")||n,{refs:f,floatingStyles:p,placement:m,middlewareData:v}=J(h?{placement:l,strategy:"fixed",middleware:[n&&F({fallbackPlacements:l.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]})],whileElementsMounted:I.ll}:{}),y=Ce("overflowmenu"),w=C(),_=(0,b.useRef)(null),{open:T,x:S,y:O,handleClick:A,handleMousedown:M,handleClose:N}=function(e){const[t,n]=(0,b.useState)(!1),[r,i]=(0,b.useState)([[-1,-1],[-1,-1]]);function o(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?o():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:o}=t.getBoundingClientRect();i([[e,r],[n,o]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:o}}(_);(0,b.useEffect)((()=>{h&&Object.keys(p).forEach((e=>{f.floating.current&&(f.floating.current.style[e]=p[e])}))}),[p,h,f.floating,T,m,v]);const k=x()(i,`${w}--overflow-menu__container`,{[`${w}--autoalign`]:h}),R=x()(`${w}--overflow-menu__${l}`),D=x()(`${w}--overflow-menu`,{[`${w}--overflow-menu--open`]:T},s!==qi&&`${w}--overflow-menu--${s}`),L=gi(_,f.setReference);return E().createElement("div",g({},d,{className:k,"aria-owns":T?y:void 0,ref:t}),E().createElement($e,{"aria-controls":T?y:void 0,"aria-haspopup":!0,"aria-expanded":T,className:D,onClick:function(){_.current&&A()},onMouseDown:M,ref:L,label:o,align:c,kind:"ghost"},E().createElement(a,{className:`${w}--overflow-menu__icon`})),E().createElement(Wi,{containerRef:_,ref:f.setFloating,menuAlignment:l,className:R,id:y,size:s,legacyAutoalign:!h,open:T,onClose:N,x:S,y:O,label:o,target:u},r))}));Yi.propTypes={autoAlign:y().bool,children:y().node,className:y().string,label:y().string,menuAlignment:y().oneOf(["top-start","top-end","bottom-start","bottom-end"]),renderIcon:y().oneOfType([y().func,y().object]),size:y().oneOf(["sm","md","lg"]),tooltipAlignment:S(y().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],(e=>({"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"}[e]))),menuTarget:y().instanceOf("undefined"!=typeof Element?Element:Object)},n(8958);class Zi extends E().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(Zi.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 E().cloneElement(this.props.children,{ref:this.handleRef})}}m(Zi,"propTypes",{children:y().element.isRequired,onClickOutside:y().func.isRequired});var Xi=n(6468),Ki=n.n(Xi);const Qi=(()=>{const e=[];let t=!1;const n=()=>{e.forEach((e=>{e()})),t=!1},r=()=>{t||(t=!0,Ki().requestAnimationFrame(n))};return{add:t=>(e.length||Ki().addEventListener("resize",r),(t=>{e.indexOf(t)<0&&e.push(t)})(t),{remove:()=>{const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}})(),Ji="left",eo="top",to="right",no="bottom",ro=e=>{let{children:t,flipped:n,focusTrap:r,menuDirection:i=no,menuOffset:o={top:0,left:0},menuRef:a,onPlace:s,selectorPrimaryFocus:l,styles:c,target:u=()=>document.body,triggerRef:d,updateOrientation:h}=e;const f=(0,b.useContext)(M),[m,g]=(0,b.useState)(void 0),v=(0,b.useRef)(null),y=(0,b.useRef)(null),w=(0,b.useRef)(null),_=(0,b.useRef)(!1),x=(0,b.useCallback)((e=>{const t=v.current;if(!t)return;const r=d.current,a=t.getBoundingClientRect(),s=r?r.getBoundingClientRect():void 0,l="function"==typeof o?o(t,i,r,n):o;if(h&&h({menuSize:a,refPosition:s,direction:i,offset:l,scrollX:Ki().pageXOffset,scrollY:Ki().pageYOffset,container:{rect:u().getBoundingClientRect(),position:getComputedStyle(u()).position}}),a.width>0&&a.height>0||!l){const n=(e=>{let{menuSize:t,refPosition:n,offset:r,direction:i,scrollX:o,scrollY:a,container:s}=e;const{left:l=0,top:c=0,right:u=0,bottom:d=0}=n,h="static"!==s.position?0:o,f="static"!==s.position?0:a,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,w=(l+u)/2,E=(c+d)/2;return{[Ji]:()=>({left:l-g+h-b-m,top:E-v/2+f+y-9-p}),[eo]:()=>({left:w-g/2+h+b-m,top:c-v+f-y-p}),[to]:()=>({left:u+h+b-m,top:E-v/2+f+y+3-p}),[no]:()=>({left:w-g/2+h+b-m,top:d+f+y-p})}[i]()})({menuSize:a,refPosition:s??{left:0,top:0,right:0,bottom:0},offset:l,direction:i,scrollX:Ki().pageXOffset,scrollY:Ki().pageYOffset,container:{rect:u().getBoundingClientRect(),position:getComputedStyle(u()).position}});if(m&&m.left===n.left&&m.top===n.top||g(n),!e){const e=t.getBoundingClientRect();e.width===a.width&&e.height===a.height||x(!0)}}}),[d,o,i,n,u,h,m]),T=e=>{v.current=e,_.current=!!e,a&&a(e),e&&x()};(0,b.useEffect)((()=>{_.current&&m&&v.current&&(v.current.contains(document.activeElement)||(e=>{const t=l?e.querySelector(l):null,n=e.querySelector(Ye),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()})(v.current),"function"==typeof s&&s(v.current),_.current=!1)}),[m,s]),(0,b.useEffect)((()=>{const e=Qi.add((()=>{x()}));return()=>{e.remove()}}),[d,o,i,n,u,h]),(0,b.useEffect)((()=>{x()}),[o,i,n,d,u,h]);const S=e=>{v.current&&y.current&&w.current&&function(e){let{bodyNode:t,startTrapNode:n,endTrapNode:r,currentActiveNode:i,oldActiveNode:o,selectorsFloatingMenus:a}=e;if(t&&i&&o&&!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,a)){const e=o.compareDocumentPosition(i);if(i===n||e&We){const e=[...t.querySelectorAll(Ye)].reverse().find((e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}else if(i===r||e&qe){const e=Array.prototype.find.call(t.querySelectorAll(Ye),(e=>Boolean(e.offsetParent)));e?e.focus():t!==o&&t.focus()}}}({bodyNode:v.current,startTrapNode:y.current,endTrapNode:w.current,currentActiveNode:e.relatedTarget,oldActiveNode:e.target})},O=e=>{we(e,le)&&v.current&&function(e){let{containerNode:t,currentActiveNode:n,event:r}=e;["blur","focusout","focusin","focus"].includes(r.type);const i=mn(t),o=i[0],a=i[i.length-1];n!==a||r.shiftKey||(r.preventDefault(),o.focus()),n===o&&r.shiftKey&&(r.preventDefault(),a.focus())}({containerNode:v.current,currentActiveNode:e.target,event:e})},A=p("enable-experimental-focus-wrap-without-sentinels");if("undefined"!=typeof document){const e=u?u():document.body;return D.createPortal(E().createElement("div",{onBlur:r&&!A?S:void 0,onKeyDown:A?O:void 0},!A&&E().createElement("span",{ref:y,tabIndex:0,role:"link",className:`${f}--visually-hidden`},"Focus sentinel"),(()=>{const e=m,n=e?{left:`${e.left}px`,top:`${e.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return(0,b.cloneElement)(t,{ref:T,style:{...c,...n,position:"absolute",opacity:1}})})(),!A&&E().createElement("span",{ref:w,tabIndex:0,role:"link",className:`${f}--visually-hidden`},"Focus sentinel")),e)}return null},io=Ee(),oo={[eo]:"bottom",[no]:"top"},ao=(e,t,n,r)=>{const i=oo[t],{offsetWidth:o,offsetHeight:a}=e;switch(i){case"top":case"bottom":return{left:(r?-1:1)*(o/2-(n?n.offsetWidth:0)/2),top:0};default:return{left:0,top:0}}},so=(0,b.forwardRef)(((e,t)=>{let{"aria-label":n=null,ariaLabel:r,children:i,className:o,direction:a=no,flipped:s=!1,focusTrap:l=!0,iconClass:c,iconDescription:u="Options",id:d,light:h,menuOffset:f=ao,menuOffsetFlip:p=ao,menuOptionsClass:m,onClick:v=Ze,onClose:y=Ze,onOpen:w=Ze,open:_,renderIcon:T=Ui,selectorPrimaryFocus:S="[data-floating-menu-primary-focus]",size:O="md",...A}=e;const C=(0,b.useContext)(M),[N,k]=(0,b.useState)(_??!1),[R,D]=(0,b.useState)(!1),[I,L]=(0,b.useState)(!1),$=(0,b.useRef)(null),P=(0,b.useRef)(io()),B=(0,b.useRef)(null),z=(0,b.useRef)({}),H=(0,b.useRef)(_),F=(0,b.useRef)(N),U=(0,b.useRef)(null);(0,b.useEffect)((()=>{H.current!==_&&(k(!!_),H.current=_)}),[_]),(0,b.useEffect)((()=>{U.current&&L(!0)}),[]),(0,b.useEffect)((()=>{!N&&F.current&&y(),F.current=N}),[N,y]);const j=(0,b.useCallback)((()=>{U.current&&U.current.focus()}),[]),V=(0,b.useCallback)((e=>{k(!1),e&&e(),y()}),[y]),G=(0,b.useCallback)((()=>{const e=R,t=N;V((()=>{t&&!e&&j()}))}),[R,N,V,j]),W=(0,b.useCallback)((()=>{const e=N;V((()=>{e&&j()}))}),[N,V,j]),q=e=>{let{currentIndex:t,direction:n}=e;const r=b.Children.toArray(i).reduce(((e,t,n)=>((0,b.isValidElement)(t)&&!t.props.disabled&&e.push(n),e)),[]),o=(()=>{const e=r.indexOf(t)+n;switch(e){case-1:return r.length-1;case r.length:return 0;default:return e}})(),a=z.current[r[o]];a?.focus()},Y=`overflow-menu-${P.current}__menu-body`,Z=x()(o,`${C}--overflow-menu`,{[`${C}--overflow-menu--open`]:N,[`${C}--overflow-menu--light`]:h,[`${C}--overflow-menu--${O}`]:O}),X=x()(m,`${C}--overflow-menu-options`,{[`${C}--overflow-menu--flip`]:s,[`${C}--overflow-menu-options--open`]:N,[`${C}--overflow-menu-options--light`]:h,[`${C}--overflow-menu-options--${O}`]:O}),K=x()(`${C}--overflow-menu__icon`,c),Q=b.Children.toArray(i).map(((e,t)=>{if((0,b.isValidElement)(e)){const n=e;return(0,b.cloneElement)(n,{closeMenu:n.props.closeMenu||G,handleOverflowMenuItemFocus:q,ref:e=>{z.current[t]=e},index:t})}return null})),J=E().createElement("ul",{className:X,tabIndex:-1,role:"menu","aria-label":n||r,onKeyDown:e=>{N&&be(e,[me,ge,ve,pe])&&e.preventDefault(),be(e,[ue])&&(W(),e.stopPropagation())},id:Y},Q),ee=E().createElement(ro,{focusTrap:l,triggerRef:U,menuDirection:a,menuOffset:s?p:f,menuRef:e=>{e||(B.current=e),!e&&$.current&&($.current=$.current.release())},flipped:s,target:()=>{const e=U.current;return e instanceof Element&&e.closest("[data-floating-menu-container]")||document.body},onPlace:e=>{if(!e)return;B.current=e;const t="onfocusin"in window,n=t?"focusin":"focus";$.current=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=t.target,r=U.current;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${C}--overflow-menu:first-child, .${C}--overflow-menu-options:first-child`)||G())}),!t),w()},selectorPrimaryFocus:S},(0,b.cloneElement)(J,{"data-floating-menu-direction":a}));return E().createElement(Zi,{onClickOutside:e=>{!N||B.current&&B.current.contains(e.target)||V()}},E().createElement("span",{className:`${C}--overflow-menu__wrapper`,"aria-owns":N?Y:void 0},E().createElement($e,g({},A,{type:"button","aria-haspopup":!0,"aria-expanded":N,"aria-controls":N?Y:void 0,className:Z,onClick:e=>{D(!0),B.current&&B.current.contains(e.target)||(k((e=>!e)),v(e))},id:d,ref:gi(U,t),size:O,label:u,kind:"ghost"}),E().createElement(T,{className:K,"aria-label":u})),N&&I&&ee))}));so.propTypes={"aria-label":y().string,ariaLabel:te(y().string),children:y().node,className:y().string,direction:y().oneOf([eo,no]),flipped:y().bool,focusTrap:y().bool,iconClass:y().string,iconDescription:y().string,id:y().string,light:te(y().bool),menuOffset:y().oneOfType([y().shape({top:y().number.isRequired,left:y().number.isRequired}),y().func]),menuOffsetFlip:y().oneOfType([y().shape({top:y().number.isRequired,left:y().number.isRequired}),y().func]),menuOptionsClass:y().string,onClick:y().func,onClose:y().func,onFocus:y().func,onKeyDown:y().func,onOpen:y().func,open:y().bool,renderIcon:y().oneOfType([y().func,y().object]),selectorPrimaryFocus:y().string,size:y().oneOf(["sm","md","lg"])};const lo=Ue(so),co=e=>re("enable-v12-overflowmenu")?E().createElement(Yi,e):E().createElement(lo,e);co.displayName="OverflowMenu";const uo="Settings",ho=e=>{let{className:t,renderIcon:n=Ri,iconDescription:r=uo,children:i,menuOptionsClass:o,...a}=e;const s=C(),l=x()(t,`${s}--toolbar-action ${s}--overflow-menu`),c=x()(o,`${s}--toolbar-action__menu`);return E().createElement(co,g({"aria-label":r,renderIcon:n,className:l,title:r,iconDescription:r,menuOptionsClass:c,flipped:!0},a),i)};ho.propTypes={children:y().node.isRequired,className:y().string,iconDescription:y().string,menuOptionsClass:y().string,renderIcon:y().oneOfType([y().func,y().object])};const fo=Ee(),po={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"},mo={[po.expandAll]:"Expand all rows",[po.collapseAll]:"Collapse all rows",[po.expandRow]:"Expand current row",[po.collapseRow]:"Collapse current row",[po.selectAll]:"Select all rows",[po.unselectAll]:"Unselect all rows",[po.selectRow]:"Select row",[po.unselectRow]:"Unselect row"},go=e=>mo[e];class vo extends E().Component{constructor(e){var t;super(e),t=this,m(this,"instanceId",void 0),m(this,"getHeaderProps",(e=>{let{header:t,onClick:n,isSortable:r=this.props.isSortable,...i}=e;const{sortDirection:o,sortHeaderKey:a}=this.state;return{...i,key:t.key,sortDirection:o,isSortable:r,isSortHeader:a===t.key,slug:t.slug,decorator:t.decorator,onClick:e=>{const r=Ir(this.props,this.state,{key:t.key});this.setState(r,(()=>{n&&this.handleOnHeaderClick(n,{sortHeaderKey:t.key,sortDirection:r.sortDirection})(e)}))}}})),m(this,"getExpandHeaderProps",(function(){let{onClick:e,onExpand:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i=go}=t.props,{isExpandedAll:o,rowIds:a,rowsById:s}=t.state,l=o||a.every((e=>s[e].isExpanded));return{...r,"aria-label":i(l?po.collapseAll:po.expandAll),"aria-controls":a.map((e=>`expanded-row-${e}`)).join(" "),isExpanded:l,onExpand:Pe([t.handleOnExpandAll,n,e&&t.handleOnExpandHeaderClick(e,{isExpanded:l})])}})),m(this,"handleOnHeaderClick",((e,t)=>n=>e(n,t))),m(this,"handleOnExpandHeaderClick",((e,t)=>n=>e(n,t))),m(this,"getRowProps",(e=>{let{row:t,onClick:n,...r}=e;const{translateWithId:i=go}=this.props,o=t.isExpanded?po.collapseRow:po.expandRow;return{...r,key:t.id,onExpand:Pe([this.handleOnExpandRow(t.id),n]),isExpanded:t.isExpanded,"aria-label":i(o),"aria-controls":`expanded-row-${t.id}`,isSelected:t.isSelected,disabled:t.disabled}})),m(this,"getExpandedRowProps",(e=>{let{row:t,...n}=e;return{...n,id:`expanded-row-${t.id}`}})),m(this,"getSelectionProps",(function(){let{onClick:e,row:n,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{translateWithId:i=go}=t.props;if(n){const o=n.isSelected?po.unselectRow:po.selectRow;return{...r,checked:n.isSelected,onSelect:Pe([t.handleOnSelectRow(n.id),e]),id:`${t.getTablePrefix()}__select-row-${n.id}`,name:`select-row-${t.instanceId}`,"aria-label":i(o),disabled:n.disabled,radio:t.props.radio}}const o=t.state.rowIds.length,a=t.getSelectedRows().length,s=o>0&&a===o,l=o>0&&a>0&&a!==o,c=s||l?po.unselectAll:po.selectAll;return{...r,"aria-label":i(c),checked:s,id:`${t.getTablePrefix()}__select-all`,indeterminate:l,name:`select-all-${t.instanceId}`,onSelect:Pe([t.handleSelectAll,e])}})),m(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}})),m(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}})),m(this,"getTableProps",(()=>{const{useZebraStyles:e,size:t="lg",isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o=!1,experimentalAutoAlign:a}=this.props;return{useZebraStyles:e,size:t,isSortable:n,useStaticWidth:r,stickyHeader:i,overflowMenuOnHover:o,experimentalAutoAlign:a}})),m(this,"getTableContainerProps",(()=>{const{stickyHeader:e,useStaticWidth:t}=this.props;return{stickyHeader:e,useStaticWidth:t}})),m(this,"getCellProps",(e=>{let{cell:t,...n}=e;return{...n,hasAILabelHeader:t.hasAILabelHeader,hasDecoratorHeader:t.hasDecoratorHeader}})),m(this,"getSelectedRows",(()=>this.state.rowIds.filter((e=>{const t=this.state.rowsById[e];return t.isSelected&&!t.disabled})))),m(this,"getFilteredRowIds",(()=>{const{filterRows:e=Br}=this.props,t="string"==typeof this.state.filterInputValue?e({rowIds:this.state.rowIds,headers:this.props.headers,cellsById:this.state.cellsById,inputValue:this.state.filterInputValue,getCellId:Cr}):this.state.rowIds;return 0==t.length?[]:t})),m(this,"getTablePrefix",(()=>`data-table-${this.instanceId}`)),m(this,"setAllSelectedState",((e,t,n)=>{const{rowIds:r}=e,i=r.length!=n.length;return{rowsById:r.reduce(((r,o)=>{const a={...e.rowsById[o]};return a.disabled||i&&!n.includes(o)||(a.isSelected=t),r[o]=a,r}),{})}})),m(this,"handleOnCancel",(()=>{this.setState((e=>({shouldShowBatchActions:!1,...this.setAllSelectedState(e,!1,this.getFilteredRowIds())})))})),m(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)}}))})),m(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}}}}))})),m(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}}}}))})),m(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}})),{})}}))})),m(this,"handleSortBy",(e=>()=>{this.setState((t=>Ir(this.props,t,{key:e})))})),m(this,"handleOnInputValueChange",((e,t)=>{e.target&&this.setState({filterInputValue:e.target.value}),t&&this.setState({filterInputValue:t})})),this.state={...$r(e,{}),isExpandedAll:!1},this.instanceId=fo()}shouldComponentUpdate(e){if(this.props!==e){const t=e.rows.map((e=>e.id)),n=this.props.rows.map((e=>e.id));if(!Ar()(t,n))return this.setState((e=>$r(this.props,e))),!1;const r=e.headers.map((e=>e.key)),i=this.props.headers.map((e=>e.key));if(!Ar()(r,i))return this.setState((e=>$r(this.props,e))),!1;if(!Ar()(e.rows,this.props.rows))return this.setState((e=>$r(this.props,e))),!1}return!0}render(){const{children:e,filterRows:t=Br,headers:n,render:r}=this.props,{filterInputValue:i,rowIds:o,rowsById:a,cellsById:s}=this.state,l="string"==typeof i?t({rowIds:o,headers:n,cellsById:s,inputValue:i,getCellId:Cr}):o,c={rows:Pr(l,a,s),headers:this.props.headers,selectedRows:Pr(this.getSelectedRows(),a,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,getCellProps:this.getCellProps,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}}m(vo,"propTypes",{experimentalAutoAlign:y().bool,filterRows:y().func,headers:y().arrayOf(y().shape({key:y().string.isRequired,header:y().node.isRequired})).isRequired,isSortable:y().bool,locale:y().string,overflowMenuOnHover:y().bool,radio:y().bool,rows:y().arrayOf(y().shape({id:y().string.isRequired,disabled:y().bool,isSelected:y().bool,isExpanded:y().bool})).isRequired,size:y().oneOf(["xs","sm","md","lg","xl"]),sortRow:y().func,stickyHeader:y().bool,translateWithId:y().func,useStaticWidth:y().bool,useZebraStyles:y().bool}),m(vo,"translationKeys",Object.values(po)),m(vo,"Table",void 0),m(vo,"TableActionList",void 0),m(vo,"TableBatchAction",void 0),m(vo,"TableBatchActions",void 0),m(vo,"TableBody",void 0),m(vo,"TableCell",void 0),m(vo,"TableContainer",void 0),m(vo,"TableDecoratorRow",void 0),m(vo,"TableExpandHeader",void 0),m(vo,"TableExpandRow",void 0),m(vo,"TableExpandedRow",void 0),m(vo,"TableHead",void 0),m(vo,"TableHeader",void 0),m(vo,"TableRow",void 0),m(vo,"TableSelectAll",void 0),m(vo,"TableSelectRow",void 0),m(vo,"TableSlugRow",void 0),m(vo,"TableToolbar",void 0),m(vo,"TableToolbarAction",void 0),m(vo,"TableToolbarContent",void 0),m(vo,"TableToolbarSearch",void 0),m(vo,"TableToolbarMenu",void 0),vo.Table=Fr,vo.TableActionList=jr,vo.TableBatchAction=Vr,vo.TableBatchActions=qr,vo.TableBody=Yr,vo.TableCell=Zr,vo.TableContainer=Jr,vo.TableDecoratorRow=ei,vo.TableExpandHeader=ni,vo.TableExpandRow=ri,vo.TableExpandedRow=ii,vo.TableHead=oi,vo.TableHeader=hi,vo.TableRow=fi,vo.TableSelectAll=mi,vo.TableSelectRow=yi,vo.TableSlugRow=wi,vo.TableToolbar=Ei,vo.TableToolbarAction=xi,vo.TableToolbarContent=Ti,vo.TableToolbarSearch=Bi,vo.TableToolbarMenu=ho},279:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:l,days:o,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof y},h=function(e,t,n){return new y(e,n,t.$l)},f=function(e){return t.p(e)+"s"},p=function(e){return e<0},m=function(e){return p(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},v=function(e,t){return e?p(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function p(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return h(e*u[f(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[f(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(c);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/s),e%=s,this.$d.months=m(e/l),e%=l,this.$d.days=m(e/o),e%=o,this.$d.hours=m(e/i),e%=i,this.$d.minutes=m(e/r),e%=r,this.$d.seconds=m(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,"D"),i=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var s=v(a,"S"),l=e.negative||t.negative||r.negative||i.negative||o.negative||s.negative,c=i.format||o.format||s.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+r.format+c+i.format+o.format+s.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[f(e)]},g.get=function(e){var t=this.$ms,n=f(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?m(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[f(t)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return h(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p}(),b=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){var n=i.locale();return h(e,{$l:n},t)},i.isDuration=d;var o=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?b(this,e,1):o.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?b(this,e,-1):a.bind(this)(e,t)}}}()},5602:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},8958:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,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,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},9772:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var s,l,c,u;if(Array.isArray(e)){if((s=e.length)!=a.length)return!1;for(l=s;0!=l--;)if(!o(e[l],a[l]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((s=e.length)!=a.length)return!1;for(l=s;0!=l--;)if(e[l]!==a[l])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((s=(c=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!o(e[c[l]],a[c[l]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},320:(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}},524:(e,t,n)=>{"use strict";e.exports=n(320)},723:function(e,t,n){var r,i;"undefined"!=typeof self&&self,e.exports=(r=n(1343),i=n(3144),function(){"use strict";var e={156:function(e){e.exports=r},111:function(e){e.exports=i},582:function(e,t,n){n.r(t),n.d(t,{__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return T},__asyncValues:function(){return O},__await:function(){return x},__awaiter:function(){return p},__classPrivateFieldGet:function(){return k},__classPrivateFieldIn:function(){return D},__classPrivateFieldSet:function(){return R},__createBinding:function(){return g},__decorate:function(){return s},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return m},__importDefault:function(){return N},__importStar:function(){return C},__makeTemplateObject:function(){return A},__metadata:function(){return f},__param:function(){return l},__propKey:function(){return d},__read:function(){return b},__rest:function(){return a},__runInitializers:function(){return u},__setFunctionName:function(){return h},__spread:function(){return w},__spreadArray:function(){return _},__spreadArrays:function(){return E},__values:function(){return y}});var 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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),h=!1,f=n.length-1;f>=0;f--){var p={};for(var m in r)p[m]="access"===m?{}:r[m];for(var m in r.access)p.access[m]=r.access[m];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[f])("accessor"===l?{get:d.get,set:d.set}:d[c],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===l?i.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),h=!0}function u(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function E(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function _(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function T(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof x?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function S(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:x(e[r](t)),done:!1}:i?i(t):t}:i}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function A(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var M=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&g(t,e,n);return M(t,e),t}function N(e){return e&&e.__esModule?e:{default:e}}function k(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function R(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}t.default={__extends:i,__assign:o,__rest:a,__decorate:s,__param:l,__metadata:f,__awaiter:p,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:b,__spread:w,__spreadArrays:E,__spreadArray:_,__await:x,__asyncGenerator:T,__asyncDelegator:S,__asyncValues:O,__makeTemplateObject:A,__importStar:C,__importDefault:N,__classPrivateFieldGet:k,__classPrivateFieldSet:R,__classPrivateFieldIn:D}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.PrintContextConsumer=void 0;var t=n(582),r=n(156),i=n(111),a=Object.prototype.hasOwnProperty.call(r,"createContext"),s=Object.prototype.hasOwnProperty.call(r,"useMemo")&&Object.prototype.hasOwnProperty.call(r,"useCallback"),l=a?r.createContext({}):null;e.PrintContextConsumer=l?l.Consumer:function(){return null};var c={copyStyles:!0,pageStyle:"\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ",removeAfterPrint:!1,suppressErrors:!1},u=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.startPrint=function(e){var t=n.props,r=t.onAfterPrint,i=t.onPrintError,o=t.print,a=t.documentTitle;setTimeout((function(){var t,s;if(e.contentWindow)if(e.contentWindow.focus(),o)o(e).then((function(){return null==r?void 0:r()})).then((function(){return n.handleRemoveIframe()})).catch((function(e){i?i("print",e):n.logMessages(["An error was thrown by the specified `print` function"])}));else{if(e.contentWindow.print){var l=null!==(s=null===(t=e.contentDocument)||void 0===t?void 0:t.title)&&void 0!==s?s:"",c=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=c,e.contentDocument&&(e.contentDocument.title=l))}else n.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==r||r(),n.handleRemoveIframe()}else n.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},n.triggerPrint=function(e){var t=n.props,r=t.onBeforePrint,i=t.onPrintError;if(r){var o=r();o&&"function"==typeof o.then?o.then((function(){n.startPrint(e)})).catch((function(e){i&&i("onBeforePrint",e)})):n.startPrint(e)}else n.startPrint(e)},n.handleClick=function(){var e=n.props,t=e.onBeforeGetContent,r=e.onPrintError;if(t){var i=t();i&&"function"==typeof i.then?i.then(n.handlePrint).catch((function(e){r&&r("onBeforeGetContent",e)})):n.handlePrint()}else n.handlePrint()},n.handlePrint=function(){var e=n.props,r=e.bodyClass,o=e.content,a=e.copyStyles,s=e.fonts,l=e.pageStyle,c=e.nonce,u=o();if(void 0!==u)if(null!==u){var d=document.createElement("iframe");d.width="".concat(document.documentElement.clientWidth,"px"),d.height="".concat(document.documentElement.clientHeight,"px"),d.style.position="absolute",d.style.top="-".concat(document.documentElement.clientHeight+100,"px"),d.style.left="-".concat(document.documentElement.clientWidth+100,"px"),d.id="printWindow",d.srcdoc="<!DOCTYPE html>";var h=(0,i.findDOMNode)(u);if(h){var f=h.cloneNode(!0),p=f instanceof Text,m=document.querySelectorAll("link[rel='stylesheet']"),g=p?[]:f.querySelectorAll("img"),v=p?[]:f.querySelectorAll("video"),y=s?s.length:0;n.numResourcesToLoad=m.length+g.length+v.length+y,n.resourcesLoaded=[],n.resourcesErrored=[];var b=function(e,r){n.resourcesLoaded.includes(e)?n.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(r?(n.logMessages(t.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],t.__read(r),!1)),n.resourcesErrored.push(e)):n.resourcesLoaded.push(e),n.resourcesLoaded.length+n.resourcesErrored.length===n.numResourcesToLoad&&n.triggerPrint(d))};d.onload=function(){var e,i,o,u;d.onload=null;var m=d.contentDocument||(null===(i=d.contentWindow)||void 0===i?void 0:i.document);if(m){m.body.appendChild(f),s&&((null===(o=d.contentDocument)||void 0===o?void 0:o.fonts)&&(null===(u=d.contentWindow)||void 0===u?void 0:u.FontFace)?s.forEach((function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});d.contentDocument.fonts.add(t),t.loaded.then((function(){b(t)})).catch((function(e){b(t,["Failed loading the font:",t,"Load error:",e])}))})):(s.forEach((function(e){return b(e)})),n.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var y="function"==typeof l?l():l;if("string"!=typeof y)n.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof y,'". Styles from `pageStyle` will not be applied.')]);else{var w=m.createElement("style");c&&(w.setAttribute("nonce",c),m.head.setAttribute("nonce",c)),w.appendChild(m.createTextNode(y)),m.head.appendChild(w)}if(r&&(e=m.body.classList).add.apply(e,t.__spreadArray([],t.__read(r.split(" ")),!1)),!p){for(var E=p?[]:h.querySelectorAll("canvas"),_=m.querySelectorAll("canvas"),x=0;x<E.length;++x){var T=E[x],S=_[x].getContext("2d");S&&S.drawImage(T,0,0)}var O=function(e){var t=g[e],n=t.getAttribute("src");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,n,r,i,o){return b(t,["Error loading <img>",t,"Error",o])},r.src=n}else b(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',t])};for(x=0;x<g.length;x++)O(x);var A=function(e){var t=v[e];t.preload="auto";var n=t.getAttribute("poster");if(n){var r=new Image;r.onload=function(){return b(t)},r.onerror=function(e,r,i,o,a){return b(t,["Error loading video poster",n,"for video",t,"Error:",a])},r.src=n}else t.readyState>=2?b(t):(t.onloadeddata=function(){return b(t)},t.onerror=function(e,n,r,i,o){return b(t,["Error loading video",t,"Error",o])},t.onstalled=function(){return b(t,["Loading video stalled, skipping",t])})};for(x=0;x<v.length;x++)A(x);var M="input",C=h.querySelectorAll(M),N=m.querySelectorAll(M);for(x=0;x<C.length;x++)N[x].value=C[x].value;var k="input[type=checkbox],input[type=radio]",R=h.querySelectorAll(k),D=m.querySelectorAll(k);for(x=0;x<R.length;x++)D[x].checked=R[x].checked;var I="select",L=h.querySelectorAll(I),$=m.querySelectorAll(I);for(x=0;x<L.length;x++)$[x].value=L[x].value}if(a)for(var P=document.querySelectorAll("style, link[rel='stylesheet']"),B=function(e,t){var r=P[e];if("style"===r.tagName.toLowerCase()){var i=m.createElement(r.tagName),o=r.sheet;if(o){var a="";try{for(var s=o.cssRules.length,l=0;l<s;++l)"string"==typeof o.cssRules[l].cssText&&(a+="".concat(o.cssRules[l].cssText,"\r\n"))}catch(e){n.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",r],"warning")}i.setAttribute("id","react-to-print-".concat(e)),c&&i.setAttribute("nonce",c),i.appendChild(m.createTextNode(a)),m.head.appendChild(i)}}else if(r.getAttribute("href"))if(r.hasAttribute("disabled"))n.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",r],"warning"),b(r);else{for(var u=m.createElement(r.tagName),d=(l=0,r.attributes.length);l<d;++l){var h=r.attributes[l];h&&u.setAttribute(h.nodeName,h.nodeValue||"")}u.onload=function(){return b(u)},u.onerror=function(e,t,n,r,i){return b(u,["Failed to load",u,"Error:",i])},c&&u.setAttribute("nonce",c),m.head.appendChild(u)}else n.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",r],"warning"),b(r)},z=(x=0,P.length);x<z;++x)B(x)}0!==n.numResourcesToLoad&&a||n.triggerPrint(d)},n.handleRemoveIframe(!0),document.body.appendChild(d)}else n.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else n.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else n.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},n.handleRemoveIframe=function(e){var t=n.props.removeAfterPrint;if(e||t){var r=document.getElementById("printWindow");r&&document.body.removeChild(r)}},n.logMessages=function(e,t){void 0===t&&(t="error"),n.props.suppressErrors||("error"===t?console.error(e):"warning"===t?console.warn(e):"debug"===t&&console.debug(e))},n}return t.__extends(n,e),n.prototype.render=function(){var e=this.props,t=e.children,n=e.trigger;if(n)return r.cloneElement(n(),{onClick:this.handleClick});if(!l)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var i={handlePrint:this.handleClick};return r.createElement(l.Provider,{value:i},t)},n.defaultProps=c,n}(r.Component);e.default=u,e.useReactToPrint=function(e){if(!s)return e.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var n=r.useMemo((function(){return new u(t.__assign(t.__assign({},c),e))}),[e]);return r.useCallback((function(){return n.handleClick()}),[n])}}(),o}())},3335:(e,t,n)=>{"use strict";var r=n(1343);Symbol.for("react.element"),Symbol.for("react.fragment"),Object.prototype.hasOwnProperty,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},1085:(e,t,n)=>{"use strict";n(3335)},6468: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},1890:(e,t,n)=>{"use strict";n.d(t,{Wh:()=>F,bl:()=>Pw});var r=n(1343),i=Object.defineProperty,o=(e,t,n)=>((e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),a=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(a||{}),s=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(s||{}),l=(e=>(e.UPDATE="model-update",e))(l||{}),c=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(c||{}),u=(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))(u||{}),d=(e=>(e.CHANGE="zoom-domain-change",e))(d||{}),h=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(h||{}),f=(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))(f||{}),p=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(p||{}),m=(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))(m||{}),g=(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))(g||{}),v=(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))(v||{}),y=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(y||{}),b=(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))(b||{}),w=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(w||{}),E=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(E||{}),_=(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))(_||{}),x=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(x||{}),T=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(T||{}),S=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(S||{}),O=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(O||{}),A=(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))(A||{}),M=(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))(M||{}),C=(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))(C||{}),N=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(N||{}),k=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(k||{}),R=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(R||{});const D=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:C,Area:p,Axis:f,Bar:y,Boxplot:b,CanvasZoom:h,Chart:a,Choropleth:R,CirclePack:M,Gauge:v,Heatmap:k,Legend:A,Line:E,Meter:N,Modal:s,Model:l,Pie:g,Radar:_,Scatter:w,Threshold:O,Toolbar:c,Tooltip:S,Tree:x,Treemap:T,WordCloud:m,ZoomBar:u,ZoomDomain:d},Symbol.toStringTag,{value:"Module"}));var I=(e=>(e.HTML="html",e.SVG="svg",e))(I||{}),L=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(L||{}),$=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))($||{}),P=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(P||{}),B=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(B||{}),z=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(z||{}),H=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(H||{}),F=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(F||{}),U=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(U||{}),j=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(j||{}),V=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(V||{}),G=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(G||{}),W=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(W||{}),q=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(q||{}),Y=(e=>(e.CENTER="center",e))(Y||{}),Z=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Z||{}),X=(e=>(e.SEMI="semi",e.FULL="full",e))(X||{}),K=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(K||{}),Q=(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))(Q||{}),J=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(J||{}),ee=(e=>(e.LEFT="left",e.RIGHT="right",e))(ee||{}),te=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(te||{}),ne=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(ne||{}),re=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(re||{}),ie=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(ie||{}),oe=(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))(oe||{});function ae(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function se(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function le(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const ce=6048e5,ue=864e5,de=6e4,he=36e5,fe=Symbol.for("constructDateFrom");function pe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&fe in e?e[fe](t):e instanceof Date?new e.constructor(t):new Date(t)}function me(e,...t){const n=pe.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}let ge={};function ve(){return ge}function ye(e,t){return pe(t||e,e)}function be(e,t){var n,r,i,o;const a=ve(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=ye(e,null==t?void 0:t.in),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const we={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"}},Ee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_e={ordinalNumber:(e,t)=>{const 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:se({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:se({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:se({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:se({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:se({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"})},xe={ordinalNumber:(Se={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Se.matchPattern);if(!n)return null;const r=n[0],i=e.match(Se.parsePattern);if(!i)return null;let o=Se.valueCallback?Se.valueCallback(i[0]):i[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:le({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:le({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:le({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:le({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:le({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"})},Te={code:"en-US",formatDistance:(e,t,n)=>{let r;const i=we[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:{date:ae({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ae({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:ae({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,n,r)=>Ee[e],localize:_e,match:xe,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Se,Oe="object"==typeof global&&global&&global.Object===Object&&global,Ae="object"==typeof self&&self&&self.Object===Object&&self,Me=Oe||Ae||Function("return this")(),Ce=Me.Symbol,Ne=Object.prototype,ke=Ne.hasOwnProperty,Re=Ne.toString,De=Ce?Ce.toStringTag:void 0,Ie=Object.prototype.toString,Le="[object Null]",$e="[object Undefined]",Pe=Ce?Ce.toStringTag:void 0;function Be(e){return null==e?void 0===e?$e:Le:Pe&&Pe in Object(e)?function(e){var t=ke.call(e,De),n=e[De];try{e[De]=void 0;var r=!0}catch{}var i=Re.call(e);return r&&(t?e[De]=n:delete e[De]),i}(e):function(e){return Ie.call(e)}(e)}function ze(e){return null!=e&&"object"==typeof e}var He="[object Symbol]";function Fe(e){return"symbol"==typeof e||ze(e)&&Be(e)==He}function Ue(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}var je=Array.isArray,Ve=Ce?Ce.prototype:void 0,Ge=Ve?Ve.toString:void 0;function We(e){if("string"==typeof e)return e;if(je(e))return Ue(e,We)+"";if(Fe(e))return Ge?Ge.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ye(e){return e}var Ze="[object AsyncFunction]",Xe="[object Function]",Ke="[object GeneratorFunction]",Qe="[object Proxy]";function Je(e){if(!qe(e))return!1;var t=Be(e);return t==Xe||t==Ke||t==Ze||t==Qe}var et=Me["__core-js_shared__"],tt=function(){var e=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),nt=Function.prototype.toString;function rt(e){if(null!=e){try{return nt.call(e)}catch{}try{return e+""}catch{}}return""}var it=/^\[object .+?Constructor\]$/,ot=Function.prototype,at=Object.prototype,st=ot.toString,lt=at.hasOwnProperty,ct=RegExp("^"+st.call(lt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ut(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!qe(e)||function(e){return!!tt&&tt in e}(e))&&(Je(e)?ct:it).test(rt(e))}(n)?n:void 0}var dt=ut(Me,"WeakMap"),ht=Object.create,ft=function(){function e(){}return function(t){if(!qe(t))return{};if(ht)return ht(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function pt(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var mt=Date.now;function gt(e){return function(){return e}}var vt=function(){try{var e=ut(Object,"defineProperty");return e({},"",{}),e}catch{}}(),yt=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:gt(t),writable:!0})}:Ye,bt=function(e){var t=0,n=0;return function(){var r=mt(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(yt);function wt(e){return e!=e}function Et(e,t){return!(null==e||!e.length)&&function(e,t){return t==t?function(e,t){for(var n=-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t):function(e,t){for(var n=e.length,r=-1;++r<n;)if(t(e[r],r,e))return r;return-1}(e,wt)}(e,t)>-1}var _t=9007199254740991,xt=/^(?:0|[1-9]\d*)$/;function Tt(e,t){var n=typeof e;return!!(t=t??_t)&&("number"==n||"symbol"!=n&&xt.test(e))&&e>-1&&e%1==0&&e<t}function St(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ot(e,t){return e===t||e!=e&&t!=t}var At=Object.prototype.hasOwnProperty;function Mt(e,t,n){var r=e[t];(!At.call(e,t)||!Ot(r,n)||void 0===n&&!(t in e))&&St(e,t,n)}function Ct(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;void 0===l&&(l=e[s]),i?St(n,s,l):Mt(n,s,l)}return n}var Nt=Math.max;function kt(e,t,n){return t=Nt(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Nt(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),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)}}function Rt(e,t){return bt(kt(e,t,Ye),e+"")}var Dt=9007199254740991;function It(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Dt}function Lt(e){return null!=e&&It(e.length)&&!Je(e)}var $t=Object.prototype;function Pt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$t)}function Bt(e){return ze(e)&&"[object Arguments]"==Be(e)}var zt=Object.prototype,Ht=zt.hasOwnProperty,Ft=zt.propertyIsEnumerable,Ut=Bt(function(){return arguments}())?Bt:function(e){return ze(e)&&Ht.call(e,"callee")&&!Ft.call(e,"callee")},jt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Vt=jt&&"object"==typeof module&&module&&!module.nodeType&&module,Gt=Vt&&Vt.exports===jt?Me.Buffer:void 0,Wt=(Gt?Gt.isBuffer:void 0)||function(){return!1},qt={};function Yt(e){return function(t){return e(t)}}qt["[object Float32Array]"]=qt["[object Float64Array]"]=qt["[object Int8Array]"]=qt["[object Int16Array]"]=qt["[object Int32Array]"]=qt["[object Uint8Array]"]=qt["[object Uint8ClampedArray]"]=qt["[object Uint16Array]"]=qt["[object Uint32Array]"]=!0,qt["[object Arguments]"]=qt["[object Array]"]=qt["[object ArrayBuffer]"]=qt["[object Boolean]"]=qt["[object DataView]"]=qt["[object Date]"]=qt["[object Error]"]=qt["[object Function]"]=qt["[object Map]"]=qt["[object Number]"]=qt["[object Object]"]=qt["[object RegExp]"]=qt["[object Set]"]=qt["[object String]"]=qt["[object WeakMap]"]=!1;var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Kt=Xt&&Xt.exports===Zt&&Oe.process,Qt=function(){try{return Xt&&Xt.require&&Xt.require("util").types||Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Qt&&Qt.isTypedArray,en=Jt?Yt(Jt):function(e){return ze(e)&&It(e.length)&&!!qt[Be(e)]},tn=Object.prototype.hasOwnProperty;function nn(e,t){var n=je(e),r=!n&&Ut(e),i=!n&&!r&&Wt(e),o=!n&&!r&&!i&&en(e),a=n||r||i||o,s=a?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||tn.call(e,c))&&(!a||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Tt(c,l)))&&s.push(c);return s}function rn(e,t){return function(n){return e(t(n))}}var on=rn(Object.keys,Object),an=Object.prototype.hasOwnProperty;function sn(e){if(!Pt(e))return on(e);var t=[];for(var n in Object(e))an.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ln(e){return Lt(e)?nn(e):sn(e)}var cn=Object.prototype.hasOwnProperty;function un(e){return Lt(e)?nn(e,!0):function(e){if(!qe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Pt(e),n=[];for(var r in e)"constructor"==r&&(t||!cn.call(e,r))||n.push(r);return n}(e)}var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hn=/^\w*$/;function fn(e,t){if(je(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fe(e))||hn.test(e)||!dn.test(e)||null!=t&&e in Object(t)}var pn=ut(Object,"create"),mn=Object.prototype.hasOwnProperty,gn=Object.prototype.hasOwnProperty;function vn(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 yn(e,t){for(var n=e.length;n--;)if(Ot(e[n][0],t))return n;return-1}vn.prototype.clear=function(){this.__data__=pn?pn(null):{},this.size=0},vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},vn.prototype.get=function(e){var t=this.__data__;if(pn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return mn.call(t,e)?t[e]:void 0},vn.prototype.has=function(e){var t=this.__data__;return pn?void 0!==t[e]:gn.call(t,e)},vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pn&&void 0===t?"__lodash_hash_undefined__":t,this};var bn=Array.prototype.splice;function wn(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])}}wn.prototype.clear=function(){this.__data__=[],this.size=0},wn.prototype.delete=function(e){var t=this.__data__,n=yn(t,e);return!(n<0||(n==t.length-1?t.pop():bn.call(t,n,1),--this.size,0))},wn.prototype.get=function(e){var t=this.__data__,n=yn(t,e);return n<0?void 0:t[n][1]},wn.prototype.has=function(e){return yn(this.__data__,e)>-1},wn.prototype.set=function(e,t){var n=this.__data__,r=yn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var En=ut(Me,"Map");function _n(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 xn(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])}}xn.prototype.clear=function(){this.size=0,this.__data__={hash:new vn,map:new(En||wn),string:new vn}},xn.prototype.delete=function(e){var t=_n(this,e).delete(e);return this.size-=t?1:0,t},xn.prototype.get=function(e){return _n(this,e).get(e)},xn.prototype.has=function(e){return _n(this,e).has(e)},xn.prototype.set=function(e,t){var n=_n(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Tn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tn.Cache||xn),n}Tn.Cache=xn;var Sn,On,An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mn=/\\(\\)?/g,Cn=(Sn=Tn((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(An,(function(e,n,r,i){t.push(r?i.replace(Mn,"$1"):n||e)})),t}),(function(e){return 500===On.size&&On.clear(),e})),On=Sn.cache,Sn);function Nn(e){return null==e?"":We(e)}function kn(e,t){return je(e)?e:fn(e,t)?[e]:Cn(Nn(e))}function Rn(e){if("string"==typeof e||Fe(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Dn(e,t){for(var n=0,r=(t=kn(t,e)).length;null!=e&&n<r;)e=e[Rn(t[n++])];return n&&n==r?e:void 0}function In(e,t,n){var r=null==e?void 0:Dn(e,t);return void 0===r?n:r}function Ln(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $n=Ce?Ce.isConcatSpreadable:void 0;function Pn(e){return je(e)||Ut(e)||!!($n&&e&&e[$n])}function Bn(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Pn),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Bn(s,t-1,n,r,i):Ln(i,s):r||(i[i.length]=s)}return i}var zn=rn(Object.getPrototypeOf,Object),Hn="[object Object]",Fn=Function.prototype,Un=Object.prototype,jn=Fn.toString,Vn=Un.hasOwnProperty,Gn=jn.call(Object);function Wn(e){if(!ze(e)||Be(e)!=Hn)return!1;var t=zn(e);if(null===t)return!0;var n=Vn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&jn.call(n)==Gn}function qn(e){var t=this.__data__=new wn(e);this.size=t.size}qn.prototype.clear=function(){this.__data__=new wn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof wn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xn(r)}return n.set(e,t),this.size=n.size,this};var Yn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zn=Yn&&"object"==typeof module&&module&&!module.nodeType&&module,Xn=Zn&&Zn.exports===Yn?Me.Buffer:void 0,Kn=Xn?Xn.allocUnsafe:void 0;function Qn(e,t){if(t)return e.slice();var n=e.length,r=Kn?Kn(n):new e.constructor(n);return e.copy(r),r}function Jn(){return[]}var er=Object.prototype.propertyIsEnumerable,tr=Object.getOwnPropertySymbols,nr=tr?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a)&&(o[i++]=a)}return o}(tr(e),(function(t){return er.call(e,t)})))}:Jn,rr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ln(t,nr(e)),e=zn(e);return t}:Jn;function ir(e,t,n){var r=t(e);return je(e)?r:Ln(r,n(e))}function or(e){return ir(e,ln,nr)}function ar(e){return ir(e,un,rr)}var sr=ut(Me,"DataView"),lr=ut(Me,"Promise"),cr=ut(Me,"Set"),ur="[object Map]",dr="[object Promise]",hr="[object Set]",fr="[object WeakMap]",pr="[object DataView]",mr=rt(sr),gr=rt(En),vr=rt(lr),yr=rt(cr),br=rt(dt),wr=Be;(sr&&wr(new sr(new ArrayBuffer(1)))!=pr||En&&wr(new En)!=ur||lr&&wr(lr.resolve())!=dr||cr&&wr(new cr)!=hr||dt&&wr(new dt)!=fr)&&(wr=function(e){var t=Be(e),n="[object Object]"==t?e.constructor:void 0,r=n?rt(n):"";if(r)switch(r){case mr:return pr;case gr:return ur;case vr:return dr;case yr:return hr;case br:return fr}return t});var Er=Object.prototype.hasOwnProperty,_r=Me.Uint8Array;function xr(e){var t=new e.constructor(e.byteLength);return new _r(t).set(new _r(e)),t}var Tr=/\w*$/,Sr=Ce?Ce.prototype:void 0,Or=Sr?Sr.valueOf:void 0;function Ar(e,t){var n=t?xr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Mr="[object Boolean]",Cr="[object Date]",Nr="[object Map]",kr="[object Number]",Rr="[object RegExp]",Dr="[object Set]",Ir="[object String]",Lr="[object Symbol]",$r="[object ArrayBuffer]",Pr="[object DataView]",Br="[object Float32Array]",zr="[object Float64Array]",Hr="[object Int8Array]",Fr="[object Int16Array]",Ur="[object Int32Array]",jr="[object Uint8Array]",Vr="[object Uint8ClampedArray]",Gr="[object Uint16Array]",Wr="[object Uint32Array]";function qr(e){return"function"!=typeof e.constructor||Pt(e)?{}:ft(zn(e))}var Yr=Qt&&Qt.isMap,Zr=Yr?Yt(Yr):function(e){return ze(e)&&"[object Map]"==wr(e)},Xr=Qt&&Qt.isSet,Kr=Xr?Yt(Xr):function(e){return ze(e)&&"[object Set]"==wr(e)},Qr=1,Jr=2,ei=4,ti="[object Arguments]",ni="[object Function]",ri="[object GeneratorFunction]",ii="[object Object]",oi={};function ai(e,t,n,r,i,o){var a,s=t&Qr,l=t&Jr,c=t&ei;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!qe(e))return e;var u=je(e);if(u){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Er.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return pt(e,a)}else{var d=wr(e),h=d==ni||d==ri;if(Wt(e))return Qn(e,s);if(d==ii||d==ti||h&&!i){if(a=l||h?{}:qr(e),!s)return l?function(e,t){return Ct(e,rr(e),t)}(e,function(e,t){return e&&Ct(t,un(t),e)}(a,e)):function(e,t){return Ct(e,nr(e),t)}(e,function(e,t){return e&&Ct(t,ln(t),e)}(a,e))}else{if(!oi[d])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case $r:return xr(e);case Mr:case Cr:return new r(+e);case Pr:return function(e,t){var n=t?xr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Br:case zr:case Hr:case Fr:case Ur:case jr:case Vr:case Gr:case Wr:return Ar(e,n);case Nr:return new r;case kr:case Ir:return new r(e);case Rr:return function(e){var t=new e.constructor(e.source,Tr.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Dr:return new r;case Lr:return function(e){return Or?Object(Or.call(e)):{}}(e)}}(e,d,s)}}o||(o=new qn);var f=o.get(e);if(f)return f;o.set(e,a),Kr(e)?e.forEach((function(r){a.add(ai(r,t,n,r,e,o))})):Zr(e)&&e.forEach((function(r,i){a.set(i,ai(r,t,n,i,e,o))}));var p=u?void 0:(c?l?ar:or:l?un:ln)(e);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n););}(p||e,(function(r,i){p&&(r=e[i=r]),Mt(a,i,ai(r,t,n,i,e,o))})),a}oi[ti]=oi["[object Array]"]=oi["[object ArrayBuffer]"]=oi["[object DataView]"]=oi["[object Boolean]"]=oi["[object Date]"]=oi["[object Float32Array]"]=oi["[object Float64Array]"]=oi["[object Int8Array]"]=oi["[object Int16Array]"]=oi["[object Int32Array]"]=oi["[object Map]"]=oi["[object Number]"]=oi[ii]=oi["[object RegExp]"]=oi["[object Set]"]=oi["[object String]"]=oi["[object Symbol]"]=oi["[object Uint8Array]"]=oi["[object Uint8ClampedArray]"]=oi["[object Uint16Array]"]=oi["[object Uint32Array]"]=!0,oi["[object Error]"]=oi[ni]=oi["[object WeakMap]"]=!1;var si=1,li=4;function ci(e){return ai(e,si|li)}function ui(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xn;++t<n;)this.add(e[t])}function di(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 hi(e,t){return e.has(t)}ui.prototype.add=ui.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ui.prototype.has=function(e){return this.__data__.has(e)};var fi=1,pi=2;function mi(e,t,n,r,i,o){var a=n&fi,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&pi?new ui:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var p=e[d],m=t[d];if(r)var g=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!di(t,(function(e,t){if(!hi(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function gi(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function vi(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var yi=1,bi=2,wi="[object Boolean]",Ei="[object Date]",_i="[object Error]",xi="[object Map]",Ti="[object Number]",Si="[object RegExp]",Oi="[object Set]",Ai="[object String]",Mi="[object Symbol]",Ci="[object ArrayBuffer]",Ni="[object DataView]",ki=Ce?Ce.prototype:void 0,Ri=ki?ki.valueOf:void 0,Di=1,Ii=Object.prototype.hasOwnProperty,Li=1,$i="[object Arguments]",Pi="[object Array]",Bi="[object Object]",zi=Object.prototype.hasOwnProperty;function Hi(e,t,n,r,i){return e===t||(null==e||null==t||!ze(e)&&!ze(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=je(e),s=je(t),l=a?Pi:wr(e),c=s?Pi:wr(t),u=(l=l==$i?Bi:l)==Bi,d=(c=c==$i?Bi:c)==Bi,h=l==c;if(h&&Wt(e)){if(!Wt(t))return!1;a=!0,u=!1}if(h&&!u)return o||(o=new qn),a||en(e)?mi(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case Ni:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ci:return!(e.byteLength!=t.byteLength||!o(new _r(e),new _r(t)));case wi:case Ei:case Ti:return Ot(+e,+t);case _i:return e.name==t.name&&e.message==t.message;case Si:case Ai:return e==t+"";case xi:var s=gi;case Oi:var l=r&yi;if(s||(s=vi),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=bi,a.set(e,t);var u=mi(s(e),s(t),r,i,o,a);return a.delete(e),u;case Mi:if(Ri)return Ri.call(e)==Ri.call(t)}return!1}(e,t,l,n,r,i,o);if(!(n&Li)){var f=u&&zi.call(e,"__wrapped__"),p=d&&zi.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,g=p?t.value():t;return o||(o=new qn),i(m,g,n,r,o)}}return!!h&&(o||(o=new qn),function(e,t,n,r,i,o){var a=n&Di,s=or(e),l=s.length;if(l!=or(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:Ii.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,o):r(m,g,u,e,t,o);if(!(void 0===v?m===g||i(m,g,n,r,o):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 o.delete(e),o.delete(t),f}(e,t,n,r,i,o))}(e,t,n,r,Hi,i))}var Fi=1,Ui=2;function ji(e){return e==e&&!qe(e)}function Vi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function Gi(e,t){return null!=e&&t in Object(e)}var Wi=1,qi=2;function Yi(e){return"function"==typeof e?e:null==e?Ye:"object"==typeof e?je(e)?function(e,t){return fn(e)&&ji(t)?Vi(Rn(e),t):function(n){var r=In(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,i=(t=kn(t,e)).length,o=!1;++r<i;){var a=Rn(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&It(i)&&Tt(a,i)&&(je(e)||Ut(e))}(e,t,Gi)}(n,e):Hi(t,r,Wi|qi)}}(e[0],e[1]):function(e){var t=function(e){for(var t=ln(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ji(i)]}return t}(e);return 1==t.length&&t[0][2]?Vi(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n){var r=n.length,i=r;if(null==e)return!i;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<i;){var a=(o=n[r])[0],s=e[a],l=o[1];if(o[2]){if(void 0===s&&!(a in e))return!1}else{var c=new qn;if(!Hi(l,s,Fi|Ui,void 0,c))return!1}}return!0}(n,0,t)}}(e):function(e){return fn(e)?function(e){return function(t){return null==t?void 0:t[e]}}(Rn(e)):function(e){return function(t){return Dn(t,e)}}(e)}(e)}var Zi=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};function Xi(e,t,n){(void 0!==n&&!Ot(e[t],n)||void 0===n&&!(t in e))&&St(e,t,n)}function Ki(e){return ze(e)&&Lt(e)}function Qi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Ji(e,t,n,r,i){e!==t&&Zi(t,(function(o,a){if(i||(i=new qn),qe(o))!function(e,t,n,r,i,o,a){var s=Qi(e,n),l=Qi(t,n),c=a.get(l);if(c)Xi(e,n,c);else{var u=o?o(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var h=je(l),f=!h&&Wt(l),p=!h&&!f&&en(l);u=l,h||f||p?je(s)?u=s:Ki(s)?u=pt(s):f?(d=!1,u=Qn(l,!0)):p?(d=!1,u=Ar(l,!0)):u=[]:Wn(l)||Ut(l)?(u=s,Ut(s)?u=function(e){return Ct(e,un(e))}(s):(!qe(s)||Je(s))&&(u=qr(l))):d=!1}d&&(a.set(l,u),i(u,l,r,o,a),a.delete(l)),Xi(e,n,u)}}(e,t,a,n,Ji,r,i);else{var s=r?r(Qi(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),Xi(e,a,s)}}),un)}function eo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var to=Object.prototype.hasOwnProperty;var no=function(e){return Rt((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&function(e,t,n){if(!qe(n))return!1;var r=typeof t;return!!("number"==r?Lt(n)&&Tt(t,n.length):"string"==r&&t in n)&&Ot(n[t],e)}(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r)}return t}))}((function(e,t,n){Ji(e,t,n)})),ro=cr&&1/vi(new cr([,-0]))[1]==1/0?function(e){return new cr(e)}:function(){},io=200;function oo(e,t,n){var r=-1,i=Et,o=e.length,a=!0,s=[],l=s;if(o>=io){var c=t?null:ro(e);if(c)return vi(c);a=!1,i=hi,l=new ui}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=0!==u?u:0,a&&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}var ao=Rt((function(e){var t=eo(e);return Ki(t)&&(t=void 0),oo(Bn(e,1,Ki,!0),Yi(t))}));function so(e){return e&&e.length?oo(e):[]}function lo(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function co(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function uo(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=lo,n=(t,n)=>lo(e(t),n),r=(t,n)=>e(t)-n):(t=e===lo||e===co?e:ho,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function ho(){return 0}const fo=uo(lo).right;function po(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 o of e)null!=(o=t(o,++i,e))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}uo((function(e){return null===e?NaN:+e})).center;let mo=class extends Map{constructor(e,t=vo){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(go(this,e))}has(e){return super.has(go(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 go({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vo(e){return null!==e&&"object"==typeof e?e.valueOf():e}const yo=Math.sqrt(50),bo=Math.sqrt(10),wo=Math.sqrt(2);function Eo(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=yo?10:o>=bo?5:o>=wo?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,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)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Eo(e,t,2*n):[s,l,c]}function _o(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?Eo(t,e,n):Eo(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}function xo(e,t,n){return Eo(e=+e,t=+t,n=+n)[2]}function To(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?xo(t,e,n):xo(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function So(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}var Oo={value:()=>{}};function Ao(){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 Mo(r)}function Mo(e){this._=e}function Co(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function No(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Oo,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Mo.prototype=Ao.prototype={constructor:Mo,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),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=No(r[n],e.name,t);else if(null==t)for(n in r)r[n]=No(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=Co(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Mo(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(t,n)}};var ko="http://www.w3.org/1999/xhtml";const Ro={svg:"http://www.w3.org/2000/svg",xhtml:ko,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Do(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ro.hasOwnProperty(t)?{space:Ro[t],local:e}:e}function Io(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ko&&t.documentElement.namespaceURI===ko?t.createElement(e):t.createElementNS(n,e)}}function Lo(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $o(e){var t=Do(e);return(t.local?Lo:Io)(t)}function Po(){}function Bo(e){return null==e?Po:function(){return this.querySelector(e)}}function zo(){return[]}function Ho(e){return null==e?zo:function(){return this.querySelectorAll(e)}}function Fo(e){return function(){return this.matches(e)}}function Uo(e){return function(t){return t.matches(e)}}var jo=Array.prototype.find;function Vo(){return this.firstElementChild}var Go=Array.prototype.filter;function Wo(){return Array.from(this.children)}function qo(e){return new Array(e.length)}function Yo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Zo(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Yo(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Xo(e,t,n,r,i,o,a){var s,l,c,u=new Map,d=t.length,h=o.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<h;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new Yo(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function Ko(e){return e.__data__}function Qo(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Jo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ea(e){return function(){this.removeAttribute(e)}}function ta(e){return function(){this.removeAttributeNS(e.space,e.local)}}function na(e,t){return function(){this.setAttribute(e,t)}}function ra(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ia(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function oa(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 aa(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function sa(e){return function(){this.style.removeProperty(e)}}function la(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ca(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ua(e,t){return e.style.getPropertyValue(t)||aa(e).getComputedStyle(e,null).getPropertyValue(t)}function da(e){return function(){delete this[e]}}function ha(e,t){return function(){this[e]=t}}function fa(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function pa(e){return e.trim().split(/^|\s+/)}function ma(e){return e.classList||new ga(e)}function ga(e){this._node=e,this._names=pa(e.getAttribute("class")||"")}function va(e,t){for(var n=ma(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ya(e,t){for(var n=ma(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ba(e){return function(){va(this,e)}}function wa(e){return function(){ya(this,e)}}function Ea(e,t){return function(){(t.apply(this,arguments)?va:ya)(this,e)}}function _a(){this.textContent=""}function xa(e){return function(){this.textContent=e}}function Ta(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Sa(){this.innerHTML=""}function Oa(e){return function(){this.innerHTML=e}}function Aa(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ma(){this.nextSibling&&this.parentNode.appendChild(this)}function Ca(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Na(){return null}function ka(){var e=this.parentNode;e&&e.removeChild(this)}function Ra(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Da(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ia(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++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 La(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function $a(e,t,n){var r=aa(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 Pa(e,t){return function(){return $a(this,e,t)}}function Ba(e,t){return function(){return $a(this,e,t.apply(this,arguments))}}Yo.prototype={constructor:Yo,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)}},ga.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 za=[null];function Ha(e,t){this._groups=e,this._parents=t}function Fa(){return new Ha([[document.documentElement]],za)}function Ua(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]}function ja(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Va(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ga(){}Ha.prototype=Fa.prototype={constructor:Ha,select:function(e){"function"!=typeof e&&(e=Bo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Ha(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}(e):Ho(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new Ha(r,i)},selectChild:function(e){return this.select(null==e?Vo:function(e){return function(){return jo.call(this.children,e)}}("function"==typeof e?e:Uo(e)))},selectChildren:function(e){return this.selectAll(null==e?Wo:function(e){return function(){return Go.call(this.children,e)}}("function"==typeof e?e:Uo(e)))},filter:function(e){"function"!=typeof e&&(e=Fo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new Ha(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ko);var n=t?Xo:Zo,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],d=i[c],h=d.length,f=Qo(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p);n(u,d,m,g,l[c]=new Array(h),f,t);for(var v,y,b=0,w=0;b<p;++b)if(v=m[b]){for(b>=w&&(w=b+1);!(y=g[w])&&++w<p;);v._next=y||null}}return(a=new Ha(a,r))._enter=s,a._exit=l,a},enter:function(){return new Ha(this._enter||this._groups.map(qo),this._parents)},exit:function(){return new Ha(this._exit||this._groups.map(qo),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=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?o.remove():n(o),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,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++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 Ha(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],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Jo);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Ha(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,o=r.length;i<o;++i){var a=r[i];if(a)return a}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,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Do(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?ta:ea:"function"==typeof t?n.local?oa:ia:n.local?ra:na)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?sa:"function"==typeof t?ca:la)(e,t,n??"")):ua(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?da:"function"==typeof t?fa:ha)(e,t)):this.node()[e]},classed:function(e,t){var n=pa(e+"");if(arguments.length<2){for(var r=ma(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?Ea:t?ba:wa)(n,t))},text:function(e){return arguments.length?this.each(null==e?_a:("function"==typeof e?Ta:xa)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Sa:("function"==typeof e?Aa:Oa)(e)):this.node().innerHTML},raise:function(){return this.each(Ma)},lower:function(){return this.each(Ca)},append:function(e){var t="function"==typeof e?e:$o(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:$o(e),r=null==t?Na:"function"==typeof t?t:Bo(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ka)},clone:function(e){return this.select(e?Da:Ra)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=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+""),a=o.length;if(!(arguments.length<2)){for(s=t?La:Ia,r=0;r<a;++r)this.each(s(o[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<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Ba:Pa)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Wa=.7,qa=1/Wa,Ya="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ka=/^#([0-9a-f]{3,8})$/,Qa=new RegExp(`^rgb\\(${Ya},${Ya},${Ya}\\)$`),Ja=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),es=new RegExp(`^rgba\\(${Ya},${Ya},${Ya},${Za}\\)$`),ts=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${Za}\\)$`),ns=new RegExp(`^hsl\\(${Za},${Xa},${Xa}\\)$`),rs=new RegExp(`^hsla\\(${Za},${Xa},${Xa},${Za}\\)$`),is={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 os(){return this.rgb().formatHex()}function as(){return this.rgb().formatRgb()}function ss(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ka.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ls(t):3===n?new ds(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?cs(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?cs(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=Qa.exec(e))?new ds(t[1],t[2],t[3],1):(t=Ja.exec(e))?new ds(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=es.exec(e))?cs(t[1],t[2],t[3],t[4]):(t=ts.exec(e))?cs(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ns.exec(e))?vs(t[1],t[2]/100,t[3]/100,1):(t=rs.exec(e))?vs(t[1],t[2]/100,t[3]/100,t[4]):is.hasOwnProperty(e)?ls(is[e]):"transparent"===e?new ds(NaN,NaN,NaN,0):null}function ls(e){return new ds(e>>16&255,e>>8&255,255&e,1)}function cs(e,t,n,r){return r<=0&&(e=t=n=NaN),new ds(e,t,n,r)}function us(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Ga||(e=ss(e)),e?new ds((e=e.rgb()).r,e.g,e.b,e.opacity):new ds}(e):new ds(e,t,n,r??1)}function ds(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function hs(){return`#${gs(this.r)}${gs(this.g)}${gs(this.b)}`}function fs(){const e=ps(this.opacity);return`${1===e?"rgb(":"rgba("}${ms(this.r)}, ${ms(this.g)}, ${ms(this.b)}${1===e?")":`, ${e})`}`}function ps(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gs(e){return((e=ms(e))<16?"0":"")+e.toString(16)}function vs(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bs(e,t,n,r)}function ys(e){if(e instanceof bs)return new bs(e.h,e.s,e.l,e.opacity);if(e instanceof Ga||(e=ss(e)),!e)return new bs;if(e instanceof bs)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new bs(a,s,l,e.opacity)}function bs(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ws(e){return(e=(e||0)%360)<0?e+360:e}function Es(e){return Math.max(0,Math.min(1,e||0))}function _s(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ja(Ga,ss,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:os,formatHex:os,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ys(this).formatHsl()},formatRgb:as,toString:as}),ja(ds,us,Va(Ga,{brighter(e){return e=null==e?qa:Math.pow(qa,e),new ds(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Wa:Math.pow(Wa,e),new ds(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ds(ms(this.r),ms(this.g),ms(this.b),ps(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:hs,formatHex:hs,formatHex8:function(){return`#${gs(this.r)}${gs(this.g)}${gs(this.b)}${gs(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:fs,toString:fs})),ja(bs,(function(e,t,n,r){return 1===arguments.length?ys(e):new bs(e,t,n,r??1)}),Va(Ga,{brighter(e){return e=null==e?qa:Math.pow(qa,e),new bs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Wa:Math.pow(Wa,e),new bs(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 ds(_s(e>=240?e-240:e+120,i,r),_s(e,i,r),_s(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new bs(ws(this.h),Es(this.s),Es(this.l),ps(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=ps(this.opacity);return`${1===e?"hsl(":"hsla("}${ws(this.h)}, ${100*Es(this.s)}%, ${100*Es(this.l)}%${1===e?")":`, ${e})`}`}}));const xs=e=>()=>e;function Ts(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xs(isNaN(e)?t:e)}const Ss=function e(t){var n=function(e){return 1==(e=+e)?Ts: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):xs(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=us(e)).r,(t=us(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ts(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Os(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function As(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Is(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Ms(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Cs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ns(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]=Is(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var ks=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rs=new RegExp(ks.source,"g");function Ds(e,t){var n,r,i,o=ks.lastIndex=Rs.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ks.exec(e))&&(r=Rs.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cs(n,r)})),o=Rs.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=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 Is(e,t){var n,r=typeof t;return null==t||"boolean"===r?xs(t):("number"===r?Cs:"string"===r?(n=ss(t))?(t=n,Ss):Ds:t instanceof ss?Ss:t instanceof Date?Ms:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Os:Array.isArray(t)?As:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ns:Cs)(e,t)}function Ls(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var $s,Ps=180/Math.PI,Bs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zs(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(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,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ps,skewX:Math.atan(l)*Ps,scaleX:a,scaleY:s}}function Hs(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Cs(e,i)},{i:l-2,x:Cs(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Cs(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Cs(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Cs(e,n)},{i:s-2,x:Cs(t,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=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 Fs,Us,js=Hs((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bs:zs(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Vs=Hs((function(e){return null!=e&&($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",e),e=$s.transform.baseVal.consolidate())?zs((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Bs}),", ",")",")"),Gs=0,Ws=0,qs=0,Ys=1e3,Zs=0,Xs=0,Ks=0,Qs="object"==typeof performance&&performance.now?performance:Date,Js="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function el(){return Xs||(Js(tl),Xs=Qs.now()+Ks)}function tl(){Xs=0}function nl(){this._call=this._time=this._next=null}function rl(e,t,n){var r=new nl;return r.restart(e,t,n),r}function il(){Xs=(Zs=Qs.now())+Ks,Gs=Ws=0;try{!function(){el(),++Gs;for(var e,t=Fs;t;)(e=Xs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Gs}()}finally{Gs=0,function(){for(var e,t,n=Fs,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:Fs=t);Us=e,al(r)}(),Xs=0}}function ol(){var e=Qs.now(),t=e-Zs;t>Ys&&(Ks-=t,Zs=e)}function al(e){Gs||(Ws&&(Ws=clearTimeout(Ws)),e-Xs>24?(e<1/0&&(Ws=setTimeout(il,e-Qs.now()-Ks)),qs&&(qs=clearInterval(qs))):(qs||(Zs=Qs.now(),qs=setInterval(ol,Ys)),Gs=1,Js(il)))}function sl(e,t,n){var r=new nl;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}nl.prototype=rl.prototype={constructor:nl,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?el():+n)+(null==t?0:+t),!this._next&&Us!==this&&(Us?Us._next=this:Fs=this,Us=this),this._call=e,this._time=n,al()},stop:function(){this._call&&(this._call=null,this._time=1/0,al())}};var ll=Ao("start","end","cancel","interrupt"),cl=[],ul=0,dl=2,hl=3,fl=5,pl=6;function ml(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,d,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===hl)return sl(o);4===h.state?(h.state=pl,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=pl,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(sl((function(){n.state===hl&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=dl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===dl){for(n.state=hl,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 a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=fl,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);n.state===fl&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=pl,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=rl((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:ll,tween:cl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ul})}function gl(e,t){var n=yl(e,t);if(n.state>ul)throw new Error("too late; already scheduled");return n}function vl(e,t){var n=yl(e,t);if(n.state>hl)throw new Error("too late; already running");return n}function yl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function bl(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>dl&&n.state<fl,n.state=pl,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}}function wl(e,t){var n,r;return function(){var i=vl(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function El(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=vl(this,e),a=o.tween;if(a!==r){i=(r=a).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)}o.tween=i}}function _l(e,t,n){var r=e._id;return e.each((function(){var e=vl(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return yl(e,r).value[t]}}function xl(e,t){var n;return("number"==typeof t?Cs:t instanceof ss?Ss:(n=ss(t))?(t=n,Ss):Ds)(e,t)}function Tl(e){return function(){this.removeAttribute(e)}}function Sl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ol(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Al(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Ml(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttribute(e):(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Cl(e,t,n){var r,i,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Nl(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 kl(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 Rl(e,t){return function(){gl(this,e).delay=+t.apply(this,arguments)}}function Dl(e,t){return t=+t,function(){gl(this,e).delay=t}}function Il(e,t){return function(){vl(this,e).duration=+t.apply(this,arguments)}}function Ll(e,t){return t=+t,function(){vl(this,e).duration=t}}var $l=Fa.prototype.constructor;function Pl(e){return function(){this.style.removeProperty(e)}}var Bl=0;function zl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Hl(){return++Bl}var Fl=Fa.prototype;function Ul(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}zl.prototype={constructor:zl,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Bo(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,d=o[a]=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,ml(d[h],t,n,h,d,yl(s,n)));return new zl(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Ho(e));for(var r=this._groups,i=r.length,o=[],a=[],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=yl(l,n),m=0,g=f.length;m<g;++m)(h=f[m])&&ml(h,t,n,m,f,p);o.push(f),a.push(l)}return new zl(o,a,t,n)},selectChild:Fl.selectChild,selectChildren:Fl.selectChildren,filter:function(e){"function"!=typeof e&&(e=Fo(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new zl(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,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],d=c.length,h=a[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(h[f]=l);for(;s<r;++s)a[s]=t[s];return new zl(a,this._parents,this._name,this._id)},selection:function(){return new $l(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Hl(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=yl(a,t);ml(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new zl(r,this._parents,e,n)},call:Fl.call,nodes:Fl.nodes,node:Fl.node,size:Fl.size,empty:Fl.empty,each:Fl.each,on:function(e,t){var n=this._id;return arguments.length<2?yl(this.node(),n).on.on(e):this.each(function(e,t,n){var r,i,o=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)?gl:vl;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=Do(e),r="transform"===n?Vs:xl;return this.attrTween(e,"function"==typeof t?(n.local?Cl:Ml)(n,r,_l(this,"attr."+e,t)):null==t?(n.local?Sl:Tl)(n):(n.local?Al:Ol)(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=Do(e);return this.tween(n,(r.local?Nl:kl)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?js:xl;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=ua(this,e),a=(this.style.removeProperty(e),ua(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,Pl(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=ua(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=ua(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,_l(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=vl(this,e),c=l.on,u=null==l.value[a]?o||(o=Pl(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,o=n+"";return function(){var a=ua(this,e);return a===o?null:a===r?i:i=t(r=a,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 o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(_l(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=yl(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?wl:El)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Rl:Dl)(t,e)):yl(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Il:Ll)(t,e)):yl(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(){vl(this,e).ease=t}}(t,e)):yl(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;vl(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0==--i&&o()}};n.each((function(){var n=vl(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&&o()}))},[Symbol.iterator]:Fl[Symbol.iterator]};var jl={time:null,delay:0,duration:250,ease:Ul};function Vl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Gl(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 Wl(e){return(e=Gl(Math.abs(e)))?e[1]:NaN}Fa.prototype.interrupt=function(e){return this.each((function(){bl(this,e)}))},Fa.prototype.transition=function(e){var t,n;e instanceof zl?(t=e._id,e=e._name):(t=Hl(),(n=jl).time=el(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&ml(a,e,t,c,s,n||Vl(a,t));return new zl(r,this._parents,e,t)};var ql,Yl=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zl(e){if(!(t=Yl.exec(e)))throw new Error("invalid format: "+e);var t;return new Xl({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 Xl(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 Kl(e,t){var n=Gl(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")}Zl.prototype=Xl.prototype,Xl.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 Ql={"%":(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)=>Kl(100*e,t),r:Kl,s:function(e,t){var n=Gl(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(ql=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gl(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Jl(e){return e}var ec,tc,nc,rc=Array.prototype.map,ic=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function oc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}ec=function(e){var t=void 0===e.grouping||void 0===e.thousands?Jl:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(rc.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+"",o=void 0===e.numerals?Jl:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(rc.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Zl(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"):Ql[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():"",w="$"===h?r:/[%p]/.test(y)?a:"",E=Ql[y],_=/[defgprs%]/.test(y);function x(e){var n,r,a,h=b,x=w;if("c"===y)x=E(e)+x,e="";else{var T=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(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)),T&&0==+e&&"+"!==d&&(T=!1),h=(T?"("===d?d:s:"-"===d||"("===d?"":d)+h,x=("s"===y?ic[8+ql/3]:"")+x+(T&&"("===d?")":""),_)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){x=(46===a?i+e.slice(n+1):e.slice(n))+x,e=e.slice(0,n);break}}m&&!f&&(e=t(e,1/0));var S=h.length+e.length+x.length,O=S<p?new Array(p-S+1).join(c):"";switch(m&&f&&(e=t(O+e,O.length?p-x.length:1/0),O=""),u){case"<":e=h+e+x+O;break;case"=":e=h+O+e+x;break;case"^":e=O.slice(0,S=O.length>>1)+h+e+x+O.slice(S);break;default:e=O+h+e+x}return o(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=Zl(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Wl(t)/3))),i=Math.pow(10,-r),o=ic[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),tc=ec.format,nc=ec.formatPrefix;const ac=Symbol("implicit");function sc(){var e=new mo,t=[],n=[],r=ac;function i(i){let o=e.get(i);if(void 0===o){if(r!==ac)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new mo;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 sc(t,n).unknown(r)},oc.apply(i,arguments),i}function lc(e){return+e}var cc=[0,1];function uc(e){return e}function dc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hc(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=dc(i,r),o=n(a,o)):(r=dc(r,i),o=n(o,a)),function(e){return o(r(e))}}function fc(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=dc(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=fo(e,t,1,r)-1;return o[n](i[n](t))}}function pc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mc(){var e,t,n,r,i,o,a=cc,s=cc,l=Is,c=uc;function u(){var e=Math.min(a.length,s.length);return c!==uc&&(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))}}(a[0],a[e-1])),r=e>2?fc:hc,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Cs)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,lc),u()):a.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=Ls,u()},d.clamp=function(e){return arguments.length?(c=!!e||uc,u()):c!==uc},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 gc(){return mc()(uc,uc)}function vc(e){var t=e.domain;return e.ticks=function(e){var n=t();return _o(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var i,o=To(e,t,n);switch((r=Zl(r??",f")).type){case"s":var a=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(Wl(t)/3)))-Wl(Math.abs(e)))}(o,a))&&(r.precision=i),nc(r,a);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,Wl(t)-Wl(e))+1}(o,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,-Wl(Math.abs(e)))}(o))&&(r.precision=i-2*("%"===r.type))}return tc(r)}(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=xo(l,c,n))===r)return o[a]=l,o[s]=c,t(o);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 yc(){var e=gc();return e.copy=function(){return pc(e,yc())},oc.apply(e,arguments),vc(e)}function bc(e,t,n){this.k=e,this.x=t,this.y=n}bc.prototype={constructor:bc,scale:function(e){return 1===e?this:new bc(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new bc(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+")"}},bc.prototype;const wc="cds",Ec=7,_c=2.5,xc=3.5,Tc={reference:"value",compareTo:"marker"},Sc=4,Oc={duration:1e3,ease:Ul,zoomLevel:3},Ac={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},Mc={defaultBins:10},Cc={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}},Nc=.3,kc=1,Rc=24,Dc={defaultOffset:4,horizontalOffset:10},Ic={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Lc={height:{[B.GRAPH_VIEW]:32,[B.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},$c=[{type:te.RADIUS,name:"Radius"},{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}],Pc={type:z.END_LINE,threshold:16,numCharacter:14},Bc={code:typeof navigator<"u"&&(null==navigator?void 0:navigator.language)||"en-US",number:(e,t=(null==navigator?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},zc={enabled:!0,position:U.BOTTOM,clickable:!0,truncation:Pc,alignment:j.LEFT,order:null,additionalItems:[]},Hc={enabled:!0,showTotal:!0,truncation:Pc,groupLabel:"Group"},Fc={top:{visible:!0,includeZero:!0,truncation:Pc},bottom:{visible:!0,includeZero:!0,truncation:Pc},left:{visible:!0,includeZero:!0,truncation:Pc},right:{visible:!0,includeZero:!0,truncation:Pc}},Uc={addSpaceOnEdges:1,showDayName:!1,localeObject:Te,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"}}};let jc=!1;try{jc=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(Se){console.warn("Fullscreen capabilities check failed: ",Se.message)}const Vc={width:null,height:null,resizable:!0,theme:L.WHITE,tooltip:Hc,legend:zc,locale:Bc,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:J.SHOW_AS_DATATABLE},...jc?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},Gc=no({},Vc,{thematic:{projection:ie.geoNaturalEarth1}}),Wc=no({},Vc,{axes:Fc,timeScale:Uc,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:B.GRAPH_VIEW}}}),qc=no({},Wc,{bars:{maxWidth:16,spacingFactor:.25},timeScale:no(Uc,{addSpaceOnEdges:1})}),Yc=no({},qc,{}),Zc=no({},qc,{}),Xc=no({},qc,{bars:no({},qc.bars,{dividerSize:1.5})}),Kc=no({},qc,{}),Qc=no({},Wc,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Jc=Qc,eu=no({},Qc,{points:{radius:3,filled:!1,enabled:!0}}),tu=no({},eu,{timeScale:no(Uc,{addSpaceOnEdges:0})}),nu=tu,ru=no({},Wc,{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:te.RADIUS,name:"Radius"}]}}),iu=no({},Wc,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:te.AREA,name:"Poor area"},{type:te.AREA,name:"Satisfactory area"},{type:te.AREA,name:"Great area"},{type:te.QUARTILE,name:"Quartiles"}]}}),ou=no({},qc,{bars:{dividerSize:1.5},timeScale:no(Uc,{addSpaceOnEdges:0})}),au=no({},Vc,{tooltip:no({},Hc,{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"}}),su=no({},Vc,{pie:{labels:{formatter:null,enabled:!0},alignment:j.LEFT,sortFunction:null,valueMapsTo:"value"}}),lu=no({},Vc,{legend:{enabled:!1},gauge:{type:X.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,alignment:j.LEFT}}),cu=no({},su,{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)},alignment:j.LEFT}}),uu=no({},Vc,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),du=no({},uu,{legend:{enabled:!0}}),hu=no({},Vc,{radar:{axes:{angle:"key",value:"value"},alignment:j.LEFT},tooltip:{gridline:{enabled:!0}}}),fu=no({},qc,{comboChartTypes:[]}),pu=no({tree:{type:G.TREE}},Vc,{}),mu=no({},Vc,{data:no(Vc.data,{groupMapsTo:"name"})}),gu=no({},Vc,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:no(Vc.data,{groupMapsTo:"name"})}),vu=no({},Vc,{alluvial:{data:no(Vc.data,{groupMapsTo:"source"}),nodeAlignment:j.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),yu=no({},Vc,{axes:Fc,heatmap:{divider:{state:ne.AUTO},colorLegend:{type:"linear"}}}),bu={alluvialChart:vu,areaChart:tu,axisChart:Wc,boxplotChart:Kc,bubbleChart:ru,bulletChart:iu,chart:Vc,circlePackChart:gu,choroplethChart:no({},Gc,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:fu,donutChart:cu,gaugeChart:lu,groupedBarChart:Zc,heatmapChart:yu,histogramChart:ou,lineChart:eu,lollipopChart:Jc,meterChart:uu,pieChart:su,proportionalMeterChart:du,radarChart:hu,scatterChart:Qc,simpleBarChart:Yc,stackedAreaChart:nu,stackedBarChart:Xc,thematicChart:Gc,treeChart:pu,treemapChart:mu,wordCloudChart:au};function wu(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 Eu(e,t,n){return n>e.length?e:t===z.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===z.FRONT_LINE?"..."+e.substr(-n):t===z.END_LINE?e.substr(0,n)+"...":void 0}function _u(e,t){const n=xu(e,"legend","additionalItems"),r=xu(t,"legend","additionalItems");if(n&&r){const i=r.map((e=>e.type)),o=n.map((e=>e.type)),a=$c.filter((e=>o.includes(e.type)&&!i.includes(e.type)));e.legend.additionalItems=a,t.legend.additionalItems=ao(a,r,"name")}}const xu=(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},Tu=(e,t)=>t===H.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e;function Su(e,t,n){return n===H.VERTICAL?[e,t]:[t,e]}function Ou(e){const t=ye(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Au(e,t){const n=ye(e,void 0);return n.setHours(0,0,0,0),n}function Mu(e,t,n){const[r,i]=me(0,e,t),o=Au(r),a=Au(i),s=+o-Ou(o),l=+a-Ou(a);return Math.round((s-l)/ue)}function Cu(e,t){return be(e,{...t,weekStartsOn:1})}function Nu(e,t){const n=ye(e,void 0),r=n.getFullYear(),i=pe(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Cu(i),a=pe(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Cu(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ku(e,t){var n,r,i,o;const a=ye(e,null==t?void 0:t.in),s=a.getFullYear(),l=ve(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(i=l.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,u=pe((null==t?void 0:t.in)||e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=be(u,t),h=pe((null==t?void 0:t.in)||e,0);h.setFullYear(s,0,c),h.setHours(0,0,0,0);const f=be(h,t);return+a>=+d?s+1:+a>=+f?s:s-1}function Ru(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Du={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ru("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ru(n+1,2)},d:(e,t)=>Ru(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Ru(e.getHours()%12||12,t.length),H:(e,t)=>Ru(e.getHours(),t.length),m:(e,t)=>Ru(e.getMinutes(),t.length),s:(e,t)=>Ru(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ru(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Iu={G:function(e,t,n){const r=e.getFullYear()>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){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Du.y(e,t)},Y:function(e,t,n,r){const i=ku(e,r),o=i>0?i:1-i;return"YY"===t?Ru(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Ru(o,t.length)},R:function(e,t){return Ru(Nu(e),t.length)},u:function(e,t){return Ru(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ru(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){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ru(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){const r=e.getMonth();switch(t){case"M":case"MM":return Du.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ru(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){const i=function(e,t){const n=ye(e,null==t?void 0:t.in),r=+be(n,t)-+function(e,t){var n,r,i,o;const a=ve(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(o=null==(i=a.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,l=ku(e,t),c=pe((null==t?void 0:t.in)||e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),be(c,t)}(n,t);return Math.round(r/ce)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Ru(i,t.length)},I:function(e,t,n){const r=function(e){const t=ye(e,void 0),n=+Cu(t)-+function(e){const t=Nu(e),n=pe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Cu(n)}(t);return Math.round(n/ce)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ru(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Du.d(e,t)},D:function(e,t,n){const r=function(e){const t=ye(e,void 0);return Mu(t,function(e){const t=ye(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ru(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ru(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ru(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Ru(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){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Du.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Du.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ru(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ru(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Du.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Du.s(e,t)},S:function(e,t){return Du.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return $u(r);case"XXXX":case"XX":return Pu(r);default:return Pu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return $u(r);case"xxxx":case"xx":return Pu(r);default:return Pu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lu(r,":");default:return"GMT"+Pu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lu(r,":");default:return"GMT"+Pu(r,":")}},t:function(e,t,n){return Ru(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Ru(+e,t.length)}};function Lu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+Ru(o,2)}function $u(e,t){return e%60==0?(e>0?"-":"+")+Ru(Math.abs(e)/60,2):Pu(e,t)}function Pu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ru(Math.trunc(r/60),2)+t+Ru(r%60,2)}const Bu=(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"})}},zu=(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"})}},Hu={p:zu,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Bu(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Bu(r,t)).replace("{{time}}",zu(i,t))}},Fu=/^D+$/,Uu=/^Y+$/,ju=["D","DD","YY","YYYY"];const Vu=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wu=/^'([^]*?)'?$/,qu=/''/g,Yu=/[a-zA-Z]/;function Zu(e,t,n){var r,i,o,a,s,l,c,u;const d=ve(),h=(null==n?void 0:n.locale)??d.locale??Te,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(i=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(o=d.locale)?void 0:o.options)?void 0:a.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=ye(e,null==n?void 0:n.in);if(!function(e){return!(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e||isNaN(+ye(e)))}(m))throw new RangeError("Invalid time value");let g=t.match(Gu).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,Hu[t])(e,h.formatLong):e})).join("").match(Vu).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Xu(e)};if(Iu[t])return{isToken:!0,value:e};if(t.match(Yu))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));h.localize.preprocessor&&(g=h.localize.preprocessor(m,g));const v={firstWeekContainsDate:f,weekStartsOn:p,locale:h};return g.map((r=>{if(!r.isToken)return r.value;const i=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(e){return Uu.test(e)}(i)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(e){return Fu.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),ju.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,Iu[i[0]])(m,i,h.localize,v)})).join("")}function Xu(e){const t=e.match(Wu);return t?t[1].replace(qu,"'"):e}const Ku=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function Qu(e,t,n,r,i){const o=0===t,a=2===Number(Zu(new Date(e),"c")),s=1===Number(Zu(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(e){const{s:t,m:n,H:r}=ed(e);return 0===r&&0===n&&0===t}(e)||nd(e,l)||rd(e);case"daily":return i?o||a||rd(e):o||nd(e,l)||rd(e);case"weekly":return o||a||rd(e);case"monthly":return o||rd(e);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Ju(e,t,n,r,i,o){const a=i.showDayName,s="daily"===r&&a?"weekly":r,l=new Date(e),c=xu(i,"timeIntervalFormats")[s],u=xu(c,"primary"),d=xu(c,"secondary"),h=Qu(e,t,n,r,a);let f=h?u:d;"15seconds"===r&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:m,optionsObject:g}=o,v=g[r].type,y=g[r][h?"primary":"secondary"][f];if("quarterly"!==r&&y)return o[v](l,m,y);{const e=Zu(l,f,{locale:p}).split("").map((e=>{const t=Number(e);return" "===e||Number.isNaN(t)?e:t.toLocaleString(m)}));return o[v](l,m,{},e.join(""))}}function ed(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function td(e,t){if(oe[t])return t;if(1===e.length)return"15seconds";const n=function(e){if(e)return e.slice(1).map(((t,n)=>t-e[n]))}(e);return function(e){const t=Ku.reduce(((t,[,n],r)=>{const i=Ku[t][1];return Math.abs(i-e)<Math.abs(n-e)?t:r}),0);return Ku[t][0]}(function(e){let t;for(const n of e)null!=n&&(t>n||void 0===t&&n>=n)&&(t=n);return t}(n))}function nd(e,t){return ed(e).M!==ed(t).M}function rd(e){const{M:t,d:n,s:r,m:i,H:o}=ed(e);return 1===t&&1===n&&0===o&&0===i&&0===r}function id(e){return void 0===e?"":e.toISOString()}var od=(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))(od||{}),ad=function(e,t){if(null==e)return e;if(!Lt(e))return function(e,t){return e&&Zi(e,t,ln)}(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e};function sd(e){return function(){return e}}function ld(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function cd(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function ud(e,t,n,r){return ad(e,(function(e,i,o){t(r,e,n(e),o)})),r}Array.prototype.slice;var dd=Object.prototype.hasOwnProperty,hd=function(e){return function(t,n){return(je(t)?cd:ud)(t,e,Yi(n),{})}}((function(e,t,n){dd.call(e,n)?e[n].push(t):St(e,n,[t])}));function fd(e){return e}var pd=Array.prototype.slice;function md(e){return()=>e}function gd(e){return Math.max(1,Math.ceil(Math.log(function(e){let t=0;for(let n of e)null!=n&&(n=+n)>=n&&++t;return t}(e))/Math.LN2)+1)}function vd(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function yd(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bd(e,t){return e[t]}function wd(e){const t=[];return t.key=e,t}function Ed(){var e=sd([]),t=yd,n=vd,r=bd;function i(i){var o,a,s=Array.from(e.apply(this,arguments),wd),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=ld(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:sd(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:sd(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?yd:"function"==typeof e?e:sd(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??vd,i):n},i}function _d(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}class xd{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}formatTable({headers:e,cells:t}){const n=this.getOptions(),{code:r,date:i,number:o}=xu(n,"locale"),a=xu(n,"tabularRepModal","tableHeadingFormatter"),s=xu(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services;let c;return(null==l?void 0:l.getDomainAxisScaleType())===F.TIME&&(c=e=>i(e,r,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof a?a(e):e,..."function"==typeof s?s(t):t.map((e=>{c&&(e[1]=c(e[1]));for(const t in e){const n=e[t];"number"==typeof n&&(e[t]=o(n,r))}return e}))]}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=xu(t,"data"),o=xu(t,"axes");return e&&(n=n.filter((t=>e.includes(t[i])))),o&&Object.keys(o).forEach((e=>{const t=o[e].mapsTo,r=o[e].scaleType;if((r===F.LINEAR||r===F.LOG)&&(n=n.map((e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])})))),t&&o[e].domain)if(r===F.LABELS)n=n.filter((n=>o[e].domain.includes(n[t])));else{const[r,i]=o[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}=Cc.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(ci(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return xu(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter((t=>e.includes(t.name))):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=Cc.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 hd(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:o}=t.data,{bins:a=Mc.defaultBins}=i,s=Array.isArray(a),l=function(){var e=fd,t=po,n=gd;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,s=r.length,l=new Array(s);for(i=0;i<s;++i)l[i]=e(r[i],i,r);var c=t(l),u=c[0],d=c[1],h=n(l,u,d);if(!Array.isArray(h)){const e=d,n=+h;if(t===po&&([u,d]=function(e,t,n){let r;for(;;){const i=xo(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}}(u,d,n)),(h=_o(u,d,n))[0]<=u&&(a=xo(u,d,n)),h[h.length-1]>=d)if(e>=d&&t===po){const e=xo(u,d,n);isFinite(e)&&(e>0?d=(Math.floor(d/e)+1)*e:e<0&&(d=(Math.ceil(d*-e)+1)/-e))}else h.pop()}for(var f=h.length,p=0,m=f;h[p]<=u;)++p;for(;h[m-1]>d;)--m;(p||m<f)&&(h=h.slice(p,m),f=m-p);var g,v=new Array(f+1);for(i=0;i<=f;++i)(g=v[i]=[]).x0=i>0?h[i-1]:u,g.x1=i<f?h[i]:d;if(isFinite(a)){if(a>0)for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[Math.min(f,Math.floor((o-u)/a))].push(r[i]);else if(a<0)for(i=0;i<s;++i)if(null!=(o=l[i])&&u<=o&&o<=d){const e=Math.floor((u-o)*a);v[Math.min(f,e+(h[e]<=o))].push(r[i])}}else for(i=0;i<s;++i)null!=(o=l[i])&&u<=o&&o<=d&&v[fo(h,o,0,f)].push(r[i]);return v}return r.value=function(t){return arguments.length?(e="function"==typeof t?t:md(t),r):e},r.domain=function(e){return arguments.length?(t="function"==typeof e?e:md([e[0],e[1]]),r):t},r.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:md(Array.isArray(e)?pd.call(e):e),r):n},r}().value((e=>e[r])).thresholds(a)(e);if(s)l[l.length-1].x1=a[a.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?[a[0],a[a.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map((e=>e[o])))),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 Ed().keys(n)(i).map(((e,r)=>Object.keys(e).filter((e=>!isNaN(e))).map((i=>{const o=e[i];return o[t]=n[r],o}))))}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}`)):so(r.map((e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?id(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]})));const o=this.services.cartesianScales.domainAxisPosition,a=n.axes[o].scaleType;return a===F.TIME?i.sort(((e,t)=>new Date(e)-new Date(t))):(a===F.LOG||a===F.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),o=this.getDataGroupNames(),a=this.getStackKeys({bins:e,groups:t});return e?a.map((t=>{const[n,i]=t.split(":"),a={x0:n,x1:i},s=e.find((e=>e.x0.toString()===n.toString()));return o.forEach((e=>{a[e]=s.filter((t=>t[r]===e)).length})),a})):a.map((e=>{const t={sharedStackKey:e};return o.forEach((n=>{const o=i.find((t=>{const i=this.services.cartesianScales.getDomainIdentifier(t);return t[r]===n&&Object.prototype.hasOwnProperty.call(t,i)&&(t[i]instanceof Date?id(t[i])===e:t[i].toString()===e)})),a=this.services.cartesianScales.getRangeIdentifier(t);t[n]=o?o[a]:null})),t}))}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,o=this.getActiveDataGroupNames(t),a=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}(a.map((e=>[e.sharedStackKey,0])));a.forEach((t=>{o.forEach((n=>{e[t.sharedStackKey]+=t[n]}))})),a.forEach((t=>{o.forEach((n=>{const r=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/r*100:t[n]=0}))}))}return(n?Ed().offset(_d):Ed()).keys(o)(a).map(((e,t)=>Object.keys(e).filter((e=>!isNaN(e))).map((n=>{const r=e[n];return r[i]=o[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:no(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(D.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=Cc.items.status,r=this.getDataGroups(),i=r.some((e=>e.status===n)),o=r.filter((e=>e.status===t));if(i)if(1===o.length&&o[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,o)=>{r[o].status=i.name===e?t:n}));const a=r.filter((e=>e.status===t)),s=this.getOptions();r.some((e=>e.status===n))?s.data.selectedGroups=a.map((e=>e.name)):s.data.selectedGroups=[],this.services.events.dispatchEvent(D.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=xu(this.colorScale,e);return r.getFillColor?r.getFillColor(e,t,n,i):i}getStrokeColor(e,t,n){const r=this.getOptions(),i=xu(this.colorScale,e);return r.getStrokeColor?r.getStrokeColor(e,t,n,i):i}isUserProvidedColorScaleValid(){const e=xu(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://charts.carbondesignsystem.com/");const t=[],{datasets:n,labels:r}=e;return n.forEach((e=>{e.data.forEach(((n,i)=>{let o;const a=xu(e,"label");if(null===a){o=xu(r,i)||"Ungrouped"}else o=a;const s={group:o,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).split(/[,;'"`]/).map((e=>function(e){const t=e.trim();return["=","+","-","@","\t","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}(e))).join("")}"`)))).map((e=>e.join(","))).join("\n"),t=this.getOptions();let n="myChart";const r=xu(t,"fileDownload","fileName");"function"==typeof r?n=r("csv"):"string"==typeof r&&(n=r),this.services.files.downloadCSV(e,`${n}.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}=Cc.items.status,i=this.getOptions(),o=so(e.map((e=>e[t])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((e=>o.includes(e)))||(i.data.selectedGroups=[]));const a=e=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(e)?n:r;return o.map((e=>({name:e,status:a(e)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=xu(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=xu(this.getOptions(),"color","pairing");let t=xu(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=xu(e,"option");const r=t>5?14:t;n=n<=Ac[`${r}-color`]?n:1;const i=this.allDataGroups.map(((e,t)=>`${r}-${n}-${t%14+1}`));this.colorClassNames=sc().range(i).domain(this.allDataGroups)}}class Td extends xd{constructor(e){super(e),this.axisFlavor=re.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:xu(t,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{primaryDomain:r,primaryRange:i,secondaryDomain:o,secondaryRange:a}=this.assignRangeAndDomains(),{number:s,code:l}=xu(this.getOptions(),"locale"),c=["Group",r.label,i.label,...o?[o.label]:[],...a?[a.label]:[]],u=e.map((e=>[e[n],null===e[r.identifier]?"–":e[r.identifier],null===e[i.identifier]||isNaN(e[i.identifier])?"–":s(e[i.identifier],l),...o?[null===e[o.identifier]?"–":e[o.identifier]]:[],...a?[null===e[a.identifier]||isNaN(e[a.identifier])?"–":e[a.identifier]]:[]]));return super.formatTable({headers:c,cells:u})}setData(e){let t;if(e&&(t=super.setData(e),xu(this.getOptions(),"zoomBar",P.TOP,"enabled"))){const e=xu(this.getOptions(),"zoomBar",P.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize(ci(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 o=t.map((t=>t[e].getTime()));o=so(o).sort(),n=o.map((n=>{let r=0;const o={};return t.forEach((t=>{t[e].getTime()===n&&(r+=t[i])})),o[e]=new Date(n),o[i]=r,o}))}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(P).forEach((e=>{const r=P[e],i=t.axes[r];if(i&&i.scaleType===F.TIME){const e=i.mapsTo;(null!==e||void 0!==e)&&n.push(e)}})),n.length>0&&e.forEach((e=>{n.forEach((t=>{null===xu(e,t,"getTime")&&(e[t]=new Date(e[t]))}))})),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}}var Sd=/\s/,Od=/^\s+/;var Ad=NaN,Md=/^[-+]0x[0-9a-f]+$/i,Cd=/^0b[01]+$/i,Nd=/^0o[0-7]+$/i,kd=parseInt;function Rd(e){if("number"==typeof e)return e;if(Fe(e))return Ad;if(qe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=function(e){return e&&e.slice(0,function(e){for(var t=e.length;t--&&Sd.test(e.charAt(t)););return t}(e)+1).replace(Od,"")}(e);var n=Cd.test(e);return n||Nd.test(e)?kd(e.slice(2),n?2:8):Md.test(e)?Ad:+e}var Dd=function(){return Me.Date.now()},Id=Math.max,Ld=Math.min;function $d(e){return"string"==typeof e?new Ha([[document.querySelector(e)]],[document.documentElement]):new Ha([[e]],za)}function Pd(){var e,t,n=sc().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,h=d?a:o,f=d?o:a;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)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(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?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,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 Pd(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},oc.apply(d(),arguments)}function Bd(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}const zd=new Date,Hd=new Date;function Fd(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,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Fd((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)=>(zd.setTime(+t),Hd.setTime(+r),e(zd),e(Hd),Math.floor(n(zd,Hd))),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 Ud=Fd((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));Ud.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Fd((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):Ud:null),Ud.range;const jd=1e3,Vd=6e4,Gd=60*Vd,Wd=24*Gd,qd=7*Wd,Yd=30*Wd,Zd=365*Wd,Xd=Fd((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*jd)}),((e,t)=>(t-e)/jd),(e=>e.getUTCSeconds()));Xd.range;const Kd=Fd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jd)}),((e,t)=>{e.setTime(+e+t*Vd)}),((e,t)=>(t-e)/Vd),(e=>e.getMinutes()));Kd.range;const Qd=Fd((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Vd)}),((e,t)=>(t-e)/Vd),(e=>e.getUTCMinutes()));Qd.range;const Jd=Fd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jd-e.getMinutes()*Vd)}),((e,t)=>{e.setTime(+e+t*Gd)}),((e,t)=>(t-e)/Gd),(e=>e.getHours()));Jd.range;const eh=Fd((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Gd)}),((e,t)=>(t-e)/Gd),(e=>e.getUTCHours()));eh.range;const th=Fd((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vd)/Wd),(e=>e.getDate()-1));th.range;const nh=Fd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Wd),(e=>e.getUTCDate()-1));nh.range;const rh=Fd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Wd),(e=>Math.floor(e/Wd)));function ih(e){return Fd((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())*Vd)/qd))}rh.range;const oh=ih(0),ah=ih(1),sh=ih(2),lh=ih(3),ch=ih(4),uh=ih(5),dh=ih(6);function hh(e){return Fd((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)/qd))}oh.range,ah.range,sh.range,lh.range,ch.range,uh.range,dh.range;const fh=hh(0),ph=hh(1),mh=hh(2),gh=hh(3),vh=hh(4),yh=hh(5),bh=hh(6);fh.range,ph.range,mh.range,gh.range,vh.range,yh.range,bh.range;const wh=Fd((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()));wh.range;const Eh=Fd((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()));Eh.range;const _h=Fd((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()));_h.every=e=>isFinite(e=Math.floor(e))&&e>0?Fd((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,_h.range;const xh=Fd((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()));xh.every=e=>isFinite(e=Math.floor(e))&&e>0?Fd((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,xh.range;const[Th,Sh]=function(e,t,n,r,i,o){const a=[[Xd,1,jd],[Xd,5,5e3],[Xd,15,15e3],[Xd,30,3e4],[o,1,Vd],[o,5,5*Vd],[o,15,15*Vd],[o,30,30*Vd],[i,1,Gd],[i,3,3*Gd],[i,6,6*Gd],[i,12,12*Gd],[r,1,Wd],[r,2,2*Wd],[n,1,qd],[t,1,Yd],[t,3,3*Yd],[e,1,Zd]];function s(t,n,r){const i=Math.abs(n-t)/r,o=uo((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(To(t/Zd,n/Zd,r));if(0===o)return Ud.every(Math.max(To(t,n,r),1));const[s,l]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const i=n&&"function"==typeof n.range?n:s(e,t,n),o=i?i.range(e,+t+1):[];return r?o.reverse():o},s]}(_h,wh,oh,th,Jd,Kd);function Oh(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 Ah(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 Mh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Ch,Nh,kh={"-":"",_:" ",0:"0"},Rh=/^\s*\d+/,Dh=/^%/,Ih=/[\\^$*+?|[\]().{}]/g;function Lh(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function $h(e){return e.replace(Ih,"\\$&")}function Ph(e){return new RegExp("^(?:"+e.map($h).join("|")+")","i")}function Bh(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function zh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Hh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Fh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Uh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function jh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Vh(e,t,n){var r=Rh.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Gh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wh(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 qh(e,t,n){var r=Rh.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Yh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Zh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xh(e,t,n){var r=Rh.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Kh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Jh(e,t,n){var r=Rh.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ef(e,t,n){var r=Rh.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tf(e,t,n){var r=Rh.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nf(e,t,n){var r=Dh.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rf(e,t,n){var r=Rh.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function of(e,t,n){var r=Rh.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function af(e,t){return Lh(e.getDate(),t,2)}function sf(e,t){return Lh(e.getHours(),t,2)}function lf(e,t){return Lh(e.getHours()%12||12,t,2)}function cf(e,t){return Lh(1+th.count(_h(e),e),t,3)}function uf(e,t){return Lh(e.getMilliseconds(),t,3)}function df(e,t){return uf(e,t)+"000"}function hf(e,t){return Lh(e.getMonth()+1,t,2)}function ff(e,t){return Lh(e.getMinutes(),t,2)}function pf(e,t){return Lh(e.getSeconds(),t,2)}function mf(e){var t=e.getDay();return 0===t?7:t}function gf(e,t){return Lh(oh.count(_h(e)-1,e),t,2)}function vf(e){var t=e.getDay();return t>=4||0===t?ch(e):ch.ceil(e)}function yf(e,t){return e=vf(e),Lh(ch.count(_h(e),e)+(4===_h(e).getDay()),t,2)}function bf(e){return e.getDay()}function wf(e,t){return Lh(ah.count(_h(e)-1,e),t,2)}function Ef(e,t){return Lh(e.getFullYear()%100,t,2)}function _f(e,t){return Lh((e=vf(e)).getFullYear()%100,t,2)}function xf(e,t){return Lh(e.getFullYear()%1e4,t,4)}function Tf(e,t){var n=e.getDay();return Lh((e=n>=4||0===n?ch(e):ch.ceil(e)).getFullYear()%1e4,t,4)}function Sf(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Lh(t/60|0,"0",2)+Lh(t%60,"0",2)}function Of(e,t){return Lh(e.getUTCDate(),t,2)}function Af(e,t){return Lh(e.getUTCHours(),t,2)}function Mf(e,t){return Lh(e.getUTCHours()%12||12,t,2)}function Cf(e,t){return Lh(1+nh.count(xh(e),e),t,3)}function Nf(e,t){return Lh(e.getUTCMilliseconds(),t,3)}function kf(e,t){return Nf(e,t)+"000"}function Rf(e,t){return Lh(e.getUTCMonth()+1,t,2)}function Df(e,t){return Lh(e.getUTCMinutes(),t,2)}function If(e,t){return Lh(e.getUTCSeconds(),t,2)}function Lf(e){var t=e.getUTCDay();return 0===t?7:t}function $f(e,t){return Lh(fh.count(xh(e)-1,e),t,2)}function Pf(e){var t=e.getUTCDay();return t>=4||0===t?vh(e):vh.ceil(e)}function Bf(e,t){return e=Pf(e),Lh(vh.count(xh(e),e)+(4===xh(e).getUTCDay()),t,2)}function zf(e){return e.getUTCDay()}function Hf(e,t){return Lh(ph.count(xh(e)-1,e),t,2)}function Ff(e,t){return Lh(e.getUTCFullYear()%100,t,2)}function Uf(e,t){return Lh((e=Pf(e)).getUTCFullYear()%100,t,2)}function jf(e,t){return Lh(e.getUTCFullYear()%1e4,t,4)}function Vf(e,t){var n=e.getUTCDay();return Lh((e=n>=4||0===n?vh(e):vh.ceil(e)).getUTCFullYear()%1e4,t,4)}function Gf(){return"+0000"}function Wf(){return"%"}function qf(e){return+e}function Yf(e){return Math.floor(+e/1e3)}function Zf(e){return new Date(e)}function Xf(e){return e instanceof Date?+e:+new Date(+e)}function Kf(e,t,n,r,i,o,a,s,l,c){var u=gc(),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"),w=c("%Y");function E(e){return(l(e)<e?f:s(e)<e?p:a(e)<e?m:o(e)<e?g:r(e)<e?i(e)<e?v:y:n(e)<e?b:w)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?h(Array.from(e,Xf)):h().map(Zf)},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?E: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(Bd(n,e)):u},u.copy=function(){return pc(u,Kf(e,t,n,r,i,o,a,s,l,c))},u}function Qf(){return oc.apply(Kf(Th,Sh,_h,wh,oh,th,Jd,Kd,Xd,Nh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}Ch=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Ph(i),u=Bh(i),d=Ph(o),h=Bh(o),f=Ph(a),p=Bh(a),m=Ph(s),g=Bh(s),v=Ph(l),y=Bh(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:af,e:af,f:df,g:_f,G:Tf,H:sf,I:lf,j:cf,L:uf,m:hf,M:ff,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:qf,s:Yf,S:pf,u:mf,U:gf,V:yf,w:bf,W:wf,x:null,X:null,y:Ef,Y:xf,Z:Sf,"%":Wf},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Of,e:Of,f:kf,g:Uf,G:Vf,H:Af,I:Mf,j:Cf,L:Nf,m:Rf,M:Df,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:qf,s:Yf,S:If,u:Lf,U:$f,V:Bf,w:zf,W:Hf,x:null,X:null,y:Ff,Y:jf,Z:Gf,"%":Wf},E={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 T(e,t,n,r)},d:Zh,e:Zh,f:tf,g:Gh,G:Vh,H:Kh,I:Kh,j:Xh,L:ef,m:Yh,M:Qh,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:qh,Q:rf,s:of,S:Jh,u:Hh,U:Fh,V:Uh,w:zh,W:jh,x:function(e,t,r){return T(e,n,t,r)},X:function(e,t,n){return T(e,r,t,n)},y:Gh,Y:Vh,Z:Wh,"%":nf};function _(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=kh[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function x(e,t){return function(n){var r,i,o=Mh(1900,void 0,1);if(T(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ah(Mh(o.y,0,1))).getUTCDay(),r=i>4||0===i?ph.ceil(r):ph(r),r=nh.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Oh(Mh(o.y,0,1))).getDay(),r=i>4||0===i?ah.ceil(r):ah(r),r=th.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ah(Mh(o.y,0,1)).getUTCDay():Oh(Mh(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ah(o)):Oh(o)}}function T(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=E[i in kh?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),w.x=_(n,w),w.X=_(r,w),w.c=_(t,w),{format:function(e){var t=_(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+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Nh=Ch.format,Ch.parse,Ch.utcFormat,Ch.utcParse;const Jf=Math.abs,ep=Math.atan2,tp=Math.cos,np=Math.max,rp=Math.min,ip=Math.sin,op=Math.sqrt,ap=1e-12,sp=Math.PI,lp=sp/2,cp=2*sp;function up(e){return e>=1?lp:e<=-1?-lp:Math.asin(e)}function dp(e){this._context=e}function hp(e){return new dp(e)}function fp(){}function pp(e){this._context=e}function mp(e){return new pp(e)}dp.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)}}},pp.prototype={areaStart:fp,areaEnd:fp,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))}};const gp=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${e}`)})();function vp(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function yp(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function bp(e,t={}){const n=t.width||function(e){const t=yp(e,"border-left-width"),n=yp(e,"border-right-width");return e.clientWidth+t+n}(e),r=t.height||function(e){const t=yp(e,"border-top-width"),n=yp(e,"border-bottom-width");return e.clientHeight+t+n}(e);return{width:n,height:r}}const wp=16384;function Ep(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}))}const _p=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||_p(n,t))};function xp(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const o=gp();try{t.className=`${t.className} ${o}`}catch{return}const a=document.createElement("style");a.appendChild(function(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 vp(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}(o,n,r)),t.appendChild(a)}const Tp="application/font-woff",Sp="image/jpeg",Op={woff:Tp,woff2:Tp,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Sp,jpeg:Sp,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ap(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return Op[t]||""}function Mp(e){return-1!==e.search(/^(data:)/)}async function Cp(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 o=new FileReader;o.onerror=t,o.onloadend=()=>{try{e(n({res:r,result:o.result}))}catch(e){t(e)}},o.readAsDataURL(i)}))}const Np={};async function kp(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!=Np[r])return Np[r];let i;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const r=await Cp(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n))));i=function(e,t){return`data:${t};base64,${e}`}(r,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 Np[r]=i,i}const Rp=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function Dp(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>async function(e,t){return _p(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):Ep(t)}(e):_p(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),Ep(t.toDataURL())}const n=e.poster,r=Ap(n);return Ep(await kp(n,r,t))}(e,t):_p(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=null==e?void 0:e.contentDocument)&&void 0!==t&&t.body)return await Dp(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t))).then((n=>async function(e,t,n){var r,i;let o=[];return o=Rp(e)&&e.assignedNodes?vp(e.assignedNodes()):_p(e,HTMLIFrameElement)&&null!==(r=e.contentDocument)&&void 0!==r&&r.body?vp(e.contentDocument.body.childNodes):vp((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===o.length||_p(e,HTMLVideoElement)||await o.reduce(((e,r)=>e.then((()=>Dp(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>function(e,t){return _p(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):vp(r).forEach((i=>{let o=r.getPropertyValue(i);"font-size"===i&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),_p(e,HTMLIFrameElement)&&"display"===i&&"inline"===o&&(o="block"),"d"===i&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),n.setProperty(i,o,r.getPropertyPriority(i))}))}(e,t),function(e,t){xp(e,t,":before"),xp(e,t,":after")}(e,t),function(e,t){_p(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),_p(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(_p(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}(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 o=n[i].getAttribute("xlink:href");if(o){const n=e.querySelector(o),i=document.querySelector(o);!n&&i&&!r[o]&&(r[o]=await Dp(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 Ip=/url\((['"]?)([^'"]+?)\1\)/g,Lp=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,$p=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Pp(e){return-1!==e.search(Ip)}async function Bp(e,t,n){if(!Pp(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace($p,(e=>{for(;;){const[n,,r]=Lp.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n);return function(e){const t=[];return e.replace(Ip,((e,n,r)=>(t.push(r),e))),t.filter((e=>!Mp(e)))}(r).reduce(((e,r)=>e.then((e=>async function(e,t,n,r,i){try{const o=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,a=Ap(t);let s;return i||(s=await kp(o,a,r)),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${s}$3`)}catch{}return e}(e,r,t,n)))),Promise.resolve(r))}async function zp(e,t,n){var r;const i=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(i){const r=await Bp(i,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function Hp(e,t){_p(e,Element)&&(await async function(e,t){await zp("background",e,t)||await zp("background-image",e,t),await zp("mask",e,t)||await zp("mask-image",e,t)}(e,t),await async function(e,t){const n=_p(e,HTMLImageElement);if((!n||Mp(e.src))&&(!_p(e,SVGImageElement)||Mp(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await kp(r,Ap(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const o=e;o.decode&&(o.decode=t),"lazy"===o.loading&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i}))}(e,t),await async function(e,t){const n=vp(e.childNodes).map((e=>Hp(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const Fp={};async function Up(e){let t=Fp[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},Fp[e]=t),t}async function jp(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let o=i.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Cp(o,t.fetchRequestInit,(({result:e})=>(n=n.replace(i,`url(${e})`),[i,e])))}));return Promise.all(i).then((()=>n))}function Vp(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,o=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=o.exec(n),null===e)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(e[0])}return t}async function Gp(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await async function(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=vp(e.ownerDocument.styleSheets),r=await async function(e,t){const n=[],r=[];return e.forEach((n=>{if("cssRules"in n)try{vp(n.cssRules||[]).forEach(((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let o=i+1;const a=Up(e.href).then((e=>jp(e,t))).then((e=>Vp(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?o+=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(a)}}))}catch(i){const o=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&r.push(Up(n.href).then((e=>jp(e,t))).then((e=>Vp(e).forEach((e=>{o.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{vp(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>Pp(e.style.getPropertyValue("src"))))}(r)}(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return Bp(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 Wp(e,t={}){const{width:n,height:r}=bp(e,t),i=await Dp(e,t,!0);return await Gp(i,t),await Hp(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 async function(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.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)}(i,n,r)}async function qp(e,t={}){const{width:n,height:r}=bp(e,t),i=await Wp(e,t),o=await Ep(i),a=document.createElement("canvas"),s=a.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 a.width=c*l,a.height=u*l,t.skipAutoScale||function(e){(e.width>wp||e.height>wp)&&(e.width>wp&&e.height>wp?e.width>e.height?(e.height*=wp/e.width,e.width=wp):(e.width*=wp/e.height,e.height=wp):e.width>wp?(e.height*=wp/e.width,e.width=wp):(e.width*=wp/e.height,e.height=wp))}(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(o,0,0,a.width,a.height),a}let Yp=class{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}},Zp=class e extends Yp{constructor(e,t){super(e,t)}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=$d(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")},o=e.node();let a,s,l,c,u;try{"function"==typeof o.getBBox&&(a=o.getBBox(),s={width:a.width,height:a.height})}catch(e){console.error(e)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.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:xu(e.node(),"width","baseVal","value"),height:xu(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.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(e,t=!1){const n={left:0,top:0},r=e.getBoundingClientRect(),i=t?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=r.left-i.left,n.top=r.top-i.top}catch(e){console.error(e)}return n}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=xu(e,"style","prefix"),n=$d(this.getHolder()).append("div").classed(`${wc}--${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),$d(this.getHolder()).classed(`${wc}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=$d(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await qp(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 o="myChart";const a=xu(t,"fileDownload","fileName");"function"==typeof a?o=a("jpg"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const e=this,t=this.model.getOptions(),n=$d(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await qp(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const a=xu(t,"fileDownload","fileName");"function"==typeof a?o=a("png"):"string"==typeof a&&(o=a),null==(i=e.services.files)||i.downloadImage(r,`${o}.png`),n.classed("filled",!1)})).catch((function(e){console.error("oops, something went wrong!",e)}))}isFullScreenMode(){return $d(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const e=this.getHolder();$d(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=$d(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=e.getSVGElementSize($d(this.mainContainer),{useBBox:!0}),n=$d(this.mainContainer).attr("class"),r=$d(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize($d(t),{useBBox:!0}).height)})),i<=t?$d(this.mainContainer).attr("height",i):$d(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&$d(e).on("mouseover",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(D.Chart.MOUSEOVER)})).on("mouseout",(()=>{var e;null==(e=this.services.events)||e.dispatchEvent(D.Chart.MOUSEOUT)}))}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const r=function(e,t,n){var r,i,o,a,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,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function m(){var e=Dd();if(p(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Ld(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,a)}function v(){var e=Dd(),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):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=Rd(t)||0,qe(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Id(Rd(n.maxWait)||0,t):o,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?a:g(Dd())},v}((()=>{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(D.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(e)}},Xp=class e extends Yp{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(t,n){let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var Kp=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"}),Qp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),em=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nm="\\ud800-\\udfff",rm="\\u2700-\\u27bf",im="a-z\\xdf-\\xf6\\xf8-\\xff",om="A-Z\\xc0-\\xd6\\xd8-\\xde",am="\\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="["+am+"]",lm="\\d+",cm="["+rm+"]",um="["+im+"]",dm="[^"+nm+am+lm+rm+im+om+"]",hm="(?:\\ud83c[\\udde6-\\uddff]){2}",fm="[\\ud800-\\udbff][\\udc00-\\udfff]",pm="["+om+"]",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])?",wm="[\\ufe0e\\ufe0f]?",Em=wm+bm+"(?:\\u200d(?:"+["[^"+nm+"]",hm,fm].join("|")+")"+wm+bm+")*",_m="(?:"+[cm,hm,fm].join("|")+")"+Em,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,_m].join("|"),"g");var Tm=RegExp("['’]","g");function Sm(e){return function(t){return function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)n=t(n,e[r],r,e);return n}(function(e,t){return e=Nn(e),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)||[]}(function(e){return(e=Nn(e))&&e.replace(Qp,Kp).replace(Jp,"")}(t).replace(Tm,"")),e,"")}}function Om(e,t){var n;return ad(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Am(e,t,n){return(je(e)?di:Om)(e,Yi(t))}Rt((function(e,t,n){return function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}(e,Rd(t)||0,n)})),Sm((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));class Mm{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],o=e+i,a=Math.abs(e)<Math.abs(i)?e-(o-i):i-(o-e);a&&(t[n++]=a),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,r,i=this._n,o=0;if(i>0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}function Cm(e){return e}var Nm=1,km=2,Rm=3,Dm=4,Im=1e-6;function Lm(e){return"translate("+e+",0)"}function $m(e){return"translate(0,"+e+")"}function Pm(e){return t=>+e(t)}function Bm(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function zm(){return!this.__axis}function Hm(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Nm||e===Dm?-1:1,u=e===Dm||e===km?"x":"y",d=e===Nm||e===Rm?Lm:$m;function h(h){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):Cm),m=Math.max(o,0)+s,g=t.range(),v=+g[0]+l,y=+g[g.length-1]+l,b=(t.bandwidth?Bm:Pm)(t.copy(),l),w=h.selection?h.selection():h,E=w.selectAll(".domain").data([null]),_=w.selectAll(".tick").data(f,t).order(),x=_.exit(),T=_.enter().append("g").attr("class","tick"),S=_.select("line"),O=_.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Nm?"0em":e===Rm?"0.71em":"0.32em")),h!==w&&(E=E.transition(h),_=_.transition(h),S=S.transition(h),O=O.transition(h),x=x.transition(h).attr("opacity",Im).attr("transform",(function(e){return isFinite(e=b(e))?d(e+l):this.getAttribute("transform")})),T.attr("opacity",Im).attr("transform",(function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:b(e))+l)}))),x.remove(),E.attr("d",e===Dm||e===km?a?"M"+c*a+","+v+"H"+l+"V"+y+"H"+c*a:"M"+l+","+v+"V"+y:a?"M"+v+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+v+","+l+"H"+y),_.attr("opacity",1).attr("transform",(function(e){return d(b(e)+l)})),S.attr(u+"2",c*o),O.attr(u,c*m).text(p),w.filter(zm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===km?"start":e===Dm?"end":"middle"),w.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?(o=a=+e,h):o},h.tickSizeInner=function(e){return arguments.length?(o=+e,h):o},h.tickSizeOuter=function(e){return arguments.length?(a=+e,h):a},h.tickPadding=function(e){return arguments.length?(s=+e,h):s},h.offset=function(e){return arguments.length?(l=+e,h):l},h}function Fm(e){return Hm(Nm,e)}function Um(e){return Hm(km,e)}function jm(e){return Hm(Rm,e)}function Vm(e){return Hm(Dm,e)}const Gm={capture:!0,passive:!1};function Wm(e){e.preventDefault(),e.stopImmediatePropagation()}const qm=e=>+e,Ym=e=>()=>e;function Zm(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){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:o}})}function Xm(e){e.preventDefault(),e.stopImmediatePropagation()}var Km={name:"drag"},Qm={name:"space"},Jm={name:"handle"},eg={name:"center"};const{abs:tg,max:ng,min:rg}=Math;function ig(e){return[+e[0],+e[1]]}function og(e){return[ig(e[0]),ig(e[1])]}var ag={name:"x",handles:["w","e"].map(fg),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]]}},sg={},lg={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"},cg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ug={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},dg={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},hg={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function fg(e){return{type:e}}function pg(e){return!e.ctrlKey&&!e.button}function mg(){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 gg(){return navigator.maxTouchPoints||"ontouchstart"in this}function vg(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function yg(){return function(e){var t,n=mg,r=pg,i=gg,o=!0,a=Ao("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([fg("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",lg.overlay).merge(n).each((function(){var e=vg(this).extent;$d(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([fg("selection")]).enter().append("rect").attr("class","selection").attr("cursor",lg.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 lg[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=$d(this),t=vg(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,a,s,l,d,h,f,p,m,g,v,y=this,b=n.target.__data__.type,w="selection"===(o&&n.metaKey?b="overlay":b)?Km:o&&n.altKey?eg:Jm,E=e===sg?null:dg[b],_=e===ag?null:hg[b],x=vg(y),T=x.extent,S=x.selection,O=T[0][0],A=T[0][1],M=T[1][0],C=T[1][1],N=0,k=0,R=E&&_&&o&&n.shiftKey,D=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=Ua(e,y)).point0=e.slice(),e.identifier=t,e}));bl(y);var I=u(y,arguments,!0).beforestart();if("overlay"===b){S&&(m=!0);const t=[D[0],D[1]||D[0]];x.selection=S=[[i=e===sg?O:rg(t[0][0],t[1][0]),s=e===ag?A:rg(t[0][1],t[1][1])],[d=e===sg?M:ng(t[0][0],t[1][0]),f=e===ag?C:ng(t[0][1],t[1][1])]],D.length>1&&z(n)}else i=S[0][0],s=S[0][1],d=S[1][0],f=S[1][1];a=i,l=s,h=d,p=f;var L=$d(y).attr("pointer-events","none"),$=L.selectAll(".overlay").attr("cursor",lg[b]);if(n.touches)I.moved=B,I.ended=H;else{var P=$d(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",H,!0);o&&P.on("keydown.brush",(function(e){switch(e.keyCode){case 16:R=E&&_;break;case 18:w===Jm&&(E&&(d=h-N*E,i=a+N*E),_&&(f=p-k*_,s=l+k*_),w=eg,z(e));break;case 32:(w===Jm||w===eg)&&(E<0?d=h-N:E>0&&(i=a-N),_<0?f=p-k:_>0&&(s=l-k),w=Qm,$.attr("cursor",lg.selection),z(e));break;default:return}Xm(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:R&&(g=v=R=!1,z(e));break;case 18:w===eg&&(E<0?d=h:E>0&&(i=a),_<0?f=p:_>0&&(s=l),w=Jm,z(e));break;case 32:w===Qm&&(e.altKey?(E&&(d=h-N*E,i=a+N*E),_&&(f=p-k*_,s=l+k*_),w=eg):(E<0?d=h:E>0&&(i=a),_<0?f=p:_>0&&(s=l),w=Jm),$.attr("cursor",lg[b]),z(e));break;default:return}Xm(e)}),!0),function(e){var t=e.document.documentElement,n=$d(e).on("dragstart.drag",Wm,Gm);"onselectstart"in t?n.on("selectstart.drag",Wm,Gm):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,w.name)}function B(e){for(const t of e.changedTouches||[e])for(const e of D)e.identifier===t.identifier&&(e.cur=Ua(t,y));if(R&&!g&&!v&&1===D.length){const e=D[0];tg(e.cur[0]-e[0])>tg(e.cur[1]-e[1])?v=!0:g=!0}for(const e of D)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,Xm(e),z(e)}function z(e){const t=D[0],n=t.point0;var r;switch(N=t[0]-n[0],k=t[1]-n[1],w){case Qm:case Km:E&&(N=ng(O-i,rg(M-d,N)),a=i+N,h=d+N),_&&(k=ng(A-s,rg(C-f,k)),l=s+k,p=f+k);break;case Jm:D[1]?(E&&(a=ng(O,rg(M,D[0][0])),h=ng(O,rg(M,D[1][0])),E=1),_&&(l=ng(A,rg(C,D[0][1])),p=ng(A,rg(C,D[1][1])),_=1)):(E<0?(N=ng(O-i,rg(M-i,N)),a=i+N,h=d):E>0&&(N=ng(O-d,rg(M-d,N)),a=i,h=d+N),_<0?(k=ng(A-s,rg(C-s,k)),l=s+k,p=f):_>0&&(k=ng(A-f,rg(C-f,k)),l=s,p=f+k));break;case eg:E&&(a=ng(O,rg(M,i-N*E)),h=ng(O,rg(M,d+N*E))),_&&(l=ng(A,rg(C,s-k*_)),p=ng(A,rg(C,f+k*_)))}h<a&&(E*=-1,r=i,i=d,d=r,r=a,a=h,h=r,b in cg&&$.attr("cursor",lg[b=cg[b]])),p<l&&(_*=-1,r=s,s=f,f=r,r=l,l=p,p=r,b in ug&&$.attr("cursor",lg[b=ug[b]])),x.selection&&(S=x.selection),g&&(a=S[0][0],h=S[1][0]),v&&(l=S[0][1],p=S[1][1]),(S[0][0]!==a||S[0][1]!==l||S[1][0]!==h||S[1][1]!==p)&&(x.selection=[[a,l],[h,p]],c.call(y),I.brush(e,w.name))}function H(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=$d(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wm,Gm),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),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);L.attr("pointer-events","all"),$.attr("cursor",lg.overlay),x.selection&&(S=x.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(S)&&(x.selection=null,c.call(y)),I.end(e,w.name)}}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=og(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),o=r.selection,a=e.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Is(o,a);function l(e){r.selection=1===e&&null===a?null:s(e),c.call(t),i.brush()}return null!==o&&null!==a?l:l(1)})):t.each((function(){var t=this,i=arguments,o=t.__brush,a=e.input("function"==typeof n?n.apply(t,i):n,o.extent),s=u(t,i).beforestart();bl(t),o.selection=null===a?null:a,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=$d(this.that).datum();a.call(t,this.that,new Zm(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:Ym(og(e)),l):n},l.filter=function(e){return arguments.length?(r="function"==typeof e?e:Ym(!!e),l):r},l.touchable=function(e){return arguments.length?(i="function"==typeof e?e:Ym(!!e),l):i},l.handleSize=function(e){return arguments.length?(s=+e,l):s},l.keyModifiers=function(e){return arguments.length?(o=!!e,l):o},l.on=function(){var e=a.on.apply(a,arguments);return e===a?l:e},l}(ag)}const bg=Math.PI,wg=2*bg,Eg=1e-6,_g=wg-Eg;function xg(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let Tg=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?xg:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return xg;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,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}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 o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Eg)if(Math.abs(u*s-l*c)>Eg&&i){let h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((bg-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Eg&&this._append`L${e+b*c},${t+b*u}`,this._append`A${i},${i},0,0,${+(u*h>c*f)},${this._x1=e+w*s},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Eg||Math.abs(this._y1-c)>Eg)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%wg+wg),d>_g?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Eg&&this._append`A${n},${n},0,${+(d>=bg)},${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._}};Tg.prototype;var Sg=Math.PI,Og=2*Sg,Ag=Sg/180,Mg=Math.abs,Cg=(Math.atan,Math.atan2,Math.cos),Ng=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function kg(e,t){return Mg(e)>Sg&&(e-=Math.round(e/Og)*Og),[e,t]}function Rg(){}function Dg(e,t){return[e,t]}kg.invert=kg,new Mm,new Mm,new Mm,Rg.prototype={constructor:Rg,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()}},Cg(30*Ag),Dg.invert=Dg;Ng(3);function Ig(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 Lg(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Pg)):void 0===t&&(t=$g);for(var n,r,i,o,a,s=new Hg(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Hg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(zg)}function $g(e){return e.children}function Pg(e){return Array.isArray(e)?e[1]:null}function Bg(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function zg(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Hg(e){this.data=e,this.depth=this.height=0,this.parent=null}function Fg(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)(o=a[s]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function Ug(e,t,n,r,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)(o=a[s]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function jg(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 Tg(t)}function Vg(e){return e.innerRadius}function Gg(e){return e.outerRadius}function Wg(e){return e.startAngle}function qg(e){return e.endAngle}function Yg(e){return e&&e.padAngle}function Zg(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/op(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,w=y*y+b*b,E=i-o,_=h*m-p*f,x=(b<0?-1:1)*op(np(0,E*E*w-_*_)),T=(_*b-y*x)/w,S=(-_*y-b*x)/w,O=(_*b+y*x)/w,A=(-_*y+b*x)/w,M=T-g,C=S-v,N=O-g,k=A-v;return M*M+C*C>N*N+k*k&&(T=O,S=A),{cx:T,cy:S,x01:-u,y01:-d,x11:T*(i/E-1),y11:S*(i/E-1)}}function Xg(e){return e[0]}function Kg(e){return e[1]}function Qg(e,t){var n=sd(!0),r=null,i=hp,o=null,a=jg(s);function s(s){var l,c,u,d=(s=ld(s)).length,h=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?Xg:sd(e),t="function"==typeof t?t:void 0===t?Kg:sd(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:sd(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}function Jg(e,t,n){var r=null,i=sd(!0),o=null,a=hp,s=null,l=jg(c);function c(c){var u,d,h,f,p,m=(c=ld(c)).length,g=!1,v=new Array(m),y=new Array(m);for(null==o&&(s=a(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 Qg().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?Xg:sd(+e),t="function"==typeof t?t:sd(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?Kg:sd(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:sd(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:sd(+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:sd(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function ev(e){this._curve=e}Hg.prototype=Lg.prototype={constructor:Hg,count:function(){return this.eachAfter(Ig)},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,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.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 Lg(this).eachBefore(Bg)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Object.create(Hg.prototype),function e(t){function n(e,n,r,i,o){!function(e,t,n,r,i,o){for(var a,s,l,c,u,d,h,f,p,m,g,v=[],y=t.children,b=0,w=0,E=y.length,_=t.value;b<E;){l=i-n,c=o-r;do{u=y[w++].value}while(!u&&w<E);for(d=h=u,g=u*u*(m=Math.max(c/l,l/c)/(_*e)),p=Math.max(h/g,g/d);w<E;++w){if(u+=s=y[w].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(a={value:u,dice:l<c,children:y.slice(b,w)}),a.dice?Fg(a,n,r,i,_?r+=c*u/_:o):Ug(a,n,r,_?n+=l*u/_:i,o),_-=u,b=w}}(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}((1+Math.sqrt(5))/2),function(e){function t(t){return new ev(e(t))}t._curve=e}(hp),ev.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))}};let tv=class{constructor(e,t,n){if(this.type="",this.renderType=I.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=xu(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent($d(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=xu(this.model.getOptions(),"style","prefix");null==(t=this.parent)||t.classed(`${wc}--${e}--${this.type}`,!0),n&&n.classed(`${wc}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const t=xu(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Zp.appendOrSelect(this.parent,`${this.renderType===I.SVG?"svg":"div"}${n}.${wc}--${t}--${this.type}`);if(e.ariaLabel&&r.attr("aria-label",e.ariaLabel),e.isPresentational&&r.attr("role","presentation"),e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=$d(`#${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?no({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:nv,setPrototypeOf:rv,isFrozen:iv,getPrototypeOf:ov,getOwnPropertyDescriptor:av}=Object;let{freeze:sv,seal:lv,create:cv}=Object,{apply:uv,construct:dv}=typeof Reflect<"u"&&Reflect;sv||(sv=function(e){return e}),lv||(lv=function(e){return e}),uv||(uv=function(e,t,n){return e.apply(t,n)}),dv||(dv=function(e,t){return new e(...t)});const hv=Ov(Array.prototype.forEach),fv=Ov(Array.prototype.lastIndexOf),pv=Ov(Array.prototype.pop),mv=Ov(Array.prototype.push),gv=Ov(Array.prototype.splice),vv=Ov(String.prototype.toLowerCase),yv=Ov(String.prototype.toString),bv=Ov(String.prototype.match),wv=Ov(String.prototype.replace),Ev=Ov(String.prototype.indexOf),_v=Ov(String.prototype.trim),xv=Ov(Object.prototype.hasOwnProperty),Tv=Ov(RegExp.prototype.test),Sv=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dv(e,n)}}(TypeError);function Ov(e){return 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];return uv(e,t,r)}}function Av(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vv;rv&&rv(e,null);let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){const e=n(i);e!==i&&(iv(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Mv(e){for(let t=0;t<e.length;t++)xv(e,t)||(e[t]=null);return e}function Cv(e){const t=cv(null);for(const[n,r]of nv(e))xv(e,n)&&(Array.isArray(r)?t[n]=Mv(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=Cv(r):t[n]=r);return t}function Nv(e,t){for(;null!==e;){const n=av(e,t);if(n){if(n.get)return Ov(n.get);if("function"==typeof n.value)return Ov(n.value)}e=ov(e)}return function(){return null}}const kv=sv(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Rv=sv(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dv=sv(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Iv=sv(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Lv=sv(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$v=sv(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pv=sv(["#text"]),Bv=sv(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),zv=sv(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Hv=sv(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fv=sv(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Uv=lv(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jv=lv(/<%[\w\W]*|[\w\W]*%>/gm),Vv=lv(/\$\{[\w\W]*/gm),Gv=lv(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wv=lv(/^aria-[\-\w]+$/),qv=lv(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yv=lv(/^(?:\w+script|data):/i),Zv=lv(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xv=lv(/^html$/i),Kv=lv(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qv=Object.freeze({__proto__:null,ARIA_ATTR:Wv,ATTR_WHITESPACE:Zv,CUSTOM_ELEMENT:Kv,DATA_ATTR:Gv,DOCTYPE_NAME:Xv,ERB_EXPR:jv,IS_ALLOWED_URI:qv,IS_SCRIPT_OR_DATA:Yv,MUSTACHE_EXPR:Uv,TMPLIT_EXPR:Vv});var Jv=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,o=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:p}=t,m=c.prototype,g=Nv(m,"cloneNode"),v=Nv(m,"remove"),y=Nv(m,"nextSibling"),b=Nv(m,"childNodes"),w=Nv(m,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let E,_="";const{implementation:x,createNodeIterator:T,createDocumentFragment:S,getElementsByTagName:O}=r,{importNode:A}=i;let M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof nv&&"function"==typeof w&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:N,TMPLIT_EXPR:k,DATA_ATTR:R,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:$}=Qv;let{IS_ALLOWED_URI:P}=Qv,B=null;const z=Av({},[...kv,...Rv,...Dv,...Lv,...Pv]);let H=null;const F=Av({},[...Bv,...zv,...Hv,...Fv]);let U=Object.seal(cv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,V=null,G=!0,W=!0,q=!1,Y=!0,Z=!1,X=!0,K=!1,Q=!1,J=!1,ee=!1,te=!1,ne=!1,re=!0,ie=!1,oe=!0,ae=!1,se={},le=null;const ce=Av({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=Av({},["audio","video","img","source","image","track"]);let he=null;const fe=Av({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let ve=ge,ye=!1,be=null;const we=Av({},[pe,me,ge],yv);let Ee=Av({},["mi","mo","mn","ms","mtext"]),_e=Av({},["annotation-xml"]);const xe=Av({},["title","style","font","a","script"]);let Te=null;const Se=["application/xhtml+xml","text/html"];let Oe=null,Ae=null;const Me=r.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ae||Ae!==e){if((!e||"object"!=typeof e)&&(e={}),e=Cv(e),Te=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Oe="application/xhtml+xml"===Te?yv:vv,B=xv(e,"ALLOWED_TAGS")?Av({},e.ALLOWED_TAGS,Oe):z,H=xv(e,"ALLOWED_ATTR")?Av({},e.ALLOWED_ATTR,Oe):F,be=xv(e,"ALLOWED_NAMESPACES")?Av({},e.ALLOWED_NAMESPACES,yv):we,he=xv(e,"ADD_URI_SAFE_ATTR")?Av(Cv(fe),e.ADD_URI_SAFE_ATTR,Oe):fe,ue=xv(e,"ADD_DATA_URI_TAGS")?Av(Cv(de),e.ADD_DATA_URI_TAGS,Oe):de,le=xv(e,"FORBID_CONTENTS")?Av({},e.FORBID_CONTENTS,Oe):ce,j=xv(e,"FORBID_TAGS")?Av({},e.FORBID_TAGS,Oe):{},V=xv(e,"FORBID_ATTR")?Av({},e.FORBID_ATTR,Oe):{},se=!!xv(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,K=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||qv,ve=e.NAMESPACE||ge,Ee=e.MATHML_TEXT_INTEGRATION_POINTS||Ee,_e=e.HTML_INTEGRATION_POINTS||_e,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(W=!1),te&&(ee=!0),se&&(B=Av({},Pv),H=[],!0===se.html&&(Av(B,kv),Av(H,Bv)),!0===se.svg&&(Av(B,Rv),Av(H,zv),Av(H,Fv)),!0===se.svgFilters&&(Av(B,Dv),Av(H,zv),Av(H,Fv)),!0===se.mathMl&&(Av(B,Lv),Av(H,Hv),Av(H,Fv))),e.ADD_TAGS&&(B===z&&(B=Cv(B)),Av(B,e.ADD_TAGS,Oe)),e.ADD_ATTR&&(H===F&&(H=Cv(H)),Av(H,e.ADD_ATTR,Oe)),e.ADD_URI_SAFE_ATTR&&Av(he,e.ADD_URI_SAFE_ATTR,Oe),e.FORBID_CONTENTS&&(le===ce&&(le=Cv(le)),Av(le,e.FORBID_CONTENTS,Oe)),oe&&(B["#text"]=!0),K&&Av(B,["html","head","body"]),B.table&&(Av(B,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Sv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Sv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,_=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(p,o)),null!==E&&"string"==typeof _&&(_=E.createHTML(""));sv&&sv(e),Ae=e}},ke=Av({},[...Rv,...Dv,...Iv]),Re=Av({},[...Lv,...$v]),De=function(e){mv(n.removed,{element:e});try{w(e).removeChild(e)}catch{v(e)}},Ie=function(e,t){try{mv(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{mv(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{De(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Le=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=bv(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Te&&ve===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=E?E.createHTML(e):e;if(ve===ge)try{t=(new f).parseFromString(i,Te)}catch{}if(!t||!t.documentElement){t=x.createDocument(ve,"template",null);try{t.documentElement.innerHTML=ye?_:i}catch{}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),ve===ge?O.call(t,K?"html":"body")[0]:K?t.documentElement:o},$e=function(e){return T.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Pe=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function ze(e,t,r){hv(e,(e=>{e.call(n,t,r,Ae)}))}const He=function(e){let t=null;if(ze(M.beforeSanitizeElements,e,null),Pe(e))return De(e),!0;const r=Oe(e.nodeName);if(ze(M.uponSanitizeElement,e,{tagName:r,allowedTags:B}),e.hasChildNodes()&&!Be(e.firstElementChild)&&Tv(/<[/\w]/g,e.innerHTML)&&Tv(/<[/\w]/g,e.textContent)||7===e.nodeType||X&&8===e.nodeType&&Tv(/<[/\w]/g,e.data))return De(e),!0;if(!B[r]||j[r]){if(!j[r]&&Ue(r)&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,r)||U.tagNameCheck instanceof Function&&U.tagNameCheck(r)))return!1;if(oe&&!le[r]){const t=w(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,y(e))}}return De(e),!0}return e instanceof c&&!function(e){let t=w(e);(!t||!t.tagName)&&(t={namespaceURI:ve,tagName:"template"});const n=vv(e.tagName),r=vv(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===me?t.namespaceURI===ge?"svg"===n:t.namespaceURI===pe?"svg"===n&&("annotation-xml"===r||Ee[r]):!!ke[n]:e.namespaceURI===pe?t.namespaceURI===ge?"math"===n:t.namespaceURI===me?"math"===n&&_e[r]:!!Re[n]:e.namespaceURI===ge?!(t.namespaceURI===me&&!_e[r]||t.namespaceURI===pe&&!Ee[r])&&!Re[n]&&(xe[n]||!ke[n]):!("application/xhtml+xml"!==Te||!be[e.namespaceURI]))}(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&Tv(/<\/no(script|embed|frames)/i,e.innerHTML)?(De(e),!0):(Z&&3===e.nodeType&&(t=e.textContent,hv([C,N,k],(e=>{t=wv(t,e," ")})),e.textContent!==t&&(mv(n.removed,{element:e.cloneNode()}),e.textContent=t)),ze(M.afterSanitizeElements,e,null),!1)},Fe=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in Me))return!1;if((!W||V[t]||!Tv(R,t))&&(!G||!Tv(D,t)))if(!H[t]||V[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&Tv(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Tv(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(!he[t]&&!Tv(P,wv(n,L,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ev(n,"data:")||!ue[e])&&(!q||Tv(I,wv(n,L,"")))&&n)return!1;return!0},Ue=function(e){return"annotation-xml"!==e&&bv(e,$)},je=function(e){ze(M.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Pe(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let i=t.length;for(;i--;){const o=t[i],{name:a,namespaceURI:s,value:l}=o,c=Oe(a);let u="value"===a?l:_v(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,ze(M.uponSanitizeAttribute,e,r),u=r.attrValue,ie&&("id"===c||"name"===c)&&(Ie(a,e),u="user-content-"+u),X&&Tv(/((--!?|])>)|<\/(style|title)/i,u)){Ie(a,e);continue}if(r.forceKeepAttr||(Ie(a,e),!r.keepAttr))continue;if(!Y&&Tv(/\/>/i,u)){Ie(a,e);continue}Z&&hv([C,N,k],(e=>{u=wv(u,e," ")}));const d=Oe(e.nodeName);if(Fe(d,c,u)){if(E&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!s)switch(p.getAttributeType(d,c)){case"TrustedHTML":u=E.createHTML(u);break;case"TrustedScriptURL":u=E.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),Pe(e)?De(e):pv(n.removed)}catch{}}}ze(M.afterSanitizeAttributes,e,null)},Ve=function e(t){let n=null;const r=$e(t);for(ze(M.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ze(M.uponSanitizeShadowNode,n,null),He(n),je(n),n.content instanceof a&&e(n.content);ze(M.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,c=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw Sv("toString is not a function");if("string"!=typeof(e=e.toString()))throw Sv("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Ne(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Oe(e.nodeName);if(!B[t]||j[t])throw Sv("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=Le("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!ee&&!Z&&!K&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(r=Le(e),!r)return ee?null:ne?_:""}r&&J&&De(r.firstChild);const u=$e(ae?e:r);for(;s=u.nextNode();)He(s),je(s),s.content instanceof a&&Ve(s.content);if(ae)return e;if(ee){if(te)for(c=S.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(H.shadowroot||H.shadowrootmode)&&(c=A.call(i,c,!0)),c}let d=K?r.outerHTML:r.innerHTML;return K&&B["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Tv(Xv,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Z&&hv([C,N,k],(e=>{d=wv(d,e," ")})),E&&ne?E.createHTML(d):d},n.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Ae=null,Q=!1},n.isValidAttribute=function(e,t,n){Ae||Ne({});const r=Oe(e),i=Oe(t);return Fe(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&mv(M[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=fv(M[e],t);return-1===n?void 0:gv(M[e],n,1)[0]}return pv(M[e])},n.removeHooks=function(e){M[e]=[]},n.removeAllHooks=function(){M={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const ey=e=>Jv.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),ty=e=>Jv.sanitize(e,{ALLOWED_TAGS:[]}),ny=class e extends tv{constructor(){super(...arguments),this.type="toolbar",this.renderType=I.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(D.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(D.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",e)}))}render(e=!0){const t=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(xu(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"),o=this;i.merge(r).classed("disabled",(e=>e.shouldBeDisabled())).attr("role","button").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-${ty(e.id)}`)}" aria-label="${ty(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=>Jv.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(e.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(e,t){$d(this).select("svg").style("pointer-events","none").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"),$d(this).select("button").on("mouseover focus",(function(t){const n=$d(this);n.classed("hovered",!0),o.services.events.dispatchEvent(D.Toolbar.SHOW_TOOLTIP,{event:t,hoveredElement:n,content:e.title,noWrap:!0,placements:["top","bottom"]})})).on("mouseout blur",(function(){o.services.events.dispatchEvent(D.Toolbar.HIDE_TOOLTIP)})).on("click",(t=>{e.shouldBeDisabled()||o.triggerFunctionAndEvent(e,t,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&o.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=>xu(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.title))}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),$d(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(D.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(D.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=$d(`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=$d(`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=$d(`#${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=$d(`#${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=$d(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{t.triggerFunctionAndEvent(n,e,i.node()),t.updateOverflowMenu(!1)})),i.on("keydown",(o=>{o&&"Enter"===o.key?t.triggerFunctionAndEvent(n,e,i.node()):o&&"ArrowUp"===o.key?t.focusOnPreviousEnabledMenuItem(r):o&&"ArrowDown"===o.key?t.focusOnNextEnabledMenuItem(r):o&&"Escape"===o.key&&t.updateOverflowMenu(!1),o.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(D.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=xu(this.getOptions(),"toolbar","numberOfIcons")-1,n=xu(this.getOptions(),"toolbar","controls"),r=[],i=[],o=[];return n.forEach((n=>{let a=null;if(n.type===J.CUSTOM)null===xu(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===xu(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),a=n;else{const e=this.services.domUtils.isFullScreenMode();n.type===J.MAKE_FULLSCREEN&&e?n.type=J.EXIT_FULLSCREEN:n.type===J.EXIT_FULLSCREEN&&!e&&(n.type=J.MAKE_FULLSCREEN),a=this.getControlConfigByType(n.type)}a&&(a.text=n.text?n.text:n.type,-1!==a.id.indexOf("toolbar-export")?r.push(a):i.length<t?null===xu(a,"iconSVG","content")?o.push(a):i.push(a):o.push(a))})),o.push(...r),o.length?{buttonList:i,overflowMenuItemList:o}:{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(){const{moreOptions:e}=xu(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:e,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(),r=this.model.getOptions(),{exportAsCSV:i,exportAsJPG:o,exportAsPNG:a,zoomIn:s,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:d,showAsTable:h}=xu(r,"locale","translations","toolbar");let f;switch(e){case J.ZOOM_IN:t&&(f={id:"toolbar-zoomIn",title:s,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:t&&(f={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:t&&(f={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:d,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:h,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(D.Modal.SHOW)};break;case J.EXPORT_CSV:f={id:"toolbar-export-CSV",title:i,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:f={id:"toolbar-export-PNG",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:f={id:"toolbar-export-JPG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return f}getControlIconByType(e){switch(e){case J.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 J.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 J.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 J.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 J.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case J.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 J.EXPORT_CSV:case J.EXPORT_JPG:case J.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)}}};ny.buttonID=0;let ry=ny;const iy=class e extends tv{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=xu(e,"growth");return t===q.PREFERRED||t===q.FIXED})).each((function(e){t+=e.size})),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e=>xu(e,"growth")===q.STRETCH)).size()}render(e=!0){const t=this.model.getOptions(),n=this.parent,{width:r,height:i}=Zp.getHTMLElementSize(n.node()),o=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,a=xu(this.model.getOptions(),"style","prefix"),s=n.classed(`${wc}--${a}--layout-row`,this.configs.direction===W.ROW).classed(`${wc}--${a}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${wc}--${a}--layout-column`,this.configs.direction===W.COLUMN).classed(`${wc}--${a}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${wc}--${a}--layout-alignitems-center`,this.configs.alignItems===Y.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));s.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(e=>`layout-child layout-child-${this._instanceID} ${e.id}`)).each((function(n){n.components.forEach((r=>{var i;const o=$d(this),a=xu(n,"renderType")===I.SVG;r.setParent(a?Zp.appendOrSelect(o,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):o),a&&!o.select("svg.layout-svg-wrapper").attr("aria-label")&&o.select("svg.layout-svg-wrapper").attr("aria-label",(null==(i=null==t?void 0:t.accessibility)?void 0:i.svgAriaLabel)||(null==t?void 0:t.title));const s=xu(n,"growth");(s===q.PREFERRED||s===q.FIXED)&&r.render(e)}))})),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(e){const t=xu(e,"growth"),n=xu(e,"renderType")===I.SVG?Zp.getSVGElementSize($d(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Zp.getHTMLElementSize(this);if(t===q.PREFERRED){const t=o?n.width:n.height,a=o?r:i;e.size=t/a*100}})),s.exit().remove(),this.children.filter((e=>xu(e,"growth")===q.STRETCH)).forEach((e=>{e.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(e=>e.id));o?l.style("width",(e=>e.size/100*r+"px")).style("height","100%"):l.style("height",(e=>e.size/100*i+"px")).style("width","100%"),l.each((function(t){t.components.forEach((n=>{xu(t,"growth")===q.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()))}))}};iy.instanceID=Math.floor(99999999999*Math.random());let oy=iy;class ay extends tv{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||Rc}px`).style("height",`${this.configs.size||Rc}px`).attr("opacity",0)}}class sy extends tv{constructor(e,t,n){super(e,t,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const e=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${e}__modal-title`).attr("aria-describedby",`${e}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",(e=>{e.stopPropagation()})),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=e=>{"Escape"===e.key&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(D.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(D.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.services.domUtils.getChartID(),t=this.model.getOptions(),{title:n,downloadAsCSV:r}=xu(t,"locale","translations","tabularRep"),i=xu(t,"style","prefix"),o=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container">\n\t\t\t<div class="cds--modal-header">\n\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta" id="${e}__modal-description">${ty(t.title)}</p>\n\n\t\t\t\t<button class="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">\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">\n\t\t\t\t<table class="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${In(o,0).map((e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${ty(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>${o.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>${ty(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">\n\t\t\t <div class="${wc}--${i}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${r}</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=$d(this.services.domUtils.getHolder()),n=xu(t,"style","prefix");this.modal=Zp.appendOrSelect(e,`div.${wc}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class ly extends tv{constructor(){super(...arguments),this.type="title",this.renderType=I.HTML}render(e=!1){const t=this.getComponentContainer(),n=xu(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=>ty(e))),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const e=this;r.on("mouseover",(function(t){e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:r,content:r.text()})})).on("mousemove",(function(t){e.services.events.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){e.services.events.dispatchEvent(D.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=Zp.appendOrSelect(e,"tspan").node().getComputedTextLength(),i=e.text(),o=this.getSubstringIndex(e.node(),0,i.length-1,t-r);e.html(i.substring(0,o-1)).append("tspan").text("...");const a=this;e.on("mouseover",(function(t){a.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})})).on("mousemove",(function(e){a.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){a.services.events.dispatchEvent(D.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Zp.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}}class cy extends tv{constructor(){super(...arguments),this.type="legend",this.renderType=I.HTML}render(e=!1){const t=this.getOptions(),n=xu(t,"legend"),r=xu(n,"alignment"),i=xu(t,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:a}=Cc.items.status,s=o.some((e=>e.status===a)),l=xu(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===j.CENTER).classed("right-aligned",r===j.RIGHT).classed(i,!0).classed("has-deactivated-items",s).attr("role",od.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));const u=c.selectAll("div.legend-item").data(o,(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===Cc.items.status.ACTIVE}));const h=xu(this.getOptions(),"legend","clickable");c.classed("clickable",h&&o.length>1);const f=Cc.checkbox.radius,p=d.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",od.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===Cc.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(e=>this.model.getColorClassName({classNameTypes:[$.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"}))).style("background",(e=>e.status===Cc.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null)).classed("active",(function(e){return e.status===Cc.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=xu(t,"legend","additionalItems");if(g&&o.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=$d(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}=Cc.area;if(t.type===te.RADIUS?e.style("width",`${i}px`).style("height",`${i}px`):e.style("width",`${r}px`).style("height",`${i}px`),t.type===te.RADIUS){const{iconData:n,fill:r,stroke:i}=Cc.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",od.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===te.LINE){const i=Cc.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",od.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===te.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",od.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!t.fill?Cc.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===te.SIZE){const{iconData:n,fill:r,stroke:i}=Cc.size;e.attr("fill","none").attr("role",od.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===te.QUARTILE){const{iconData:t}=Cc.quartile;e.selectAll("rect").attr("role",od.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===te.ZOOM){const{iconData:n,color:r}=xu(Cc,"zoom"),i=e.attr("role",od.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=xu(this.getOptions(),"legend","truncation"),n=xu(t,"type"),r=xu(t,"threshold"),i=xu(t,"numCharacter"),o=e.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==z.NONE?o.html((function(e){const t=ty(e.name);return t.length>r&&t.length!==i?Eu(t,n,i):t})):o.html((e=>ty(e.name)))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),r=xu(n,"legend"),i=xu(r,"truncation");t.selectAll("div.legend-item").on("mouseover",(function(t){e.services.events.dispatchEvent(D.Legend.ITEM_HOVER,{hoveredElement:$d(this)});const n=$d(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})})).on("mousemove",(function(t){$d(this).datum().name.length>i.threshold&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("click",(function(){e.services.events.dispatchEvent(D.Legend.ITEM_CLICK,{clickedElement:$d(this)});const t=$d(this).datum();e.model.toggleDataLabel(t.name)})).on("mouseout",(function(){const t=$d(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>i.threshold&&i.type!==z.NONE&&e.services.events.dispatchEvent(D.Tooltip.HIDE),e.services.events.dispatchEvent(D.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(D.Legend.ITEM_HOVER,{hoveredElement:$d(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(D.Legend.ITEM_MOUSEOUT,{hoveredElement:$d(this)})})),t.selectAll("g.additional-item").on("mouseover",(function(t){const n=$d(this),r=n.datum();r.name.length>i.threshold&&e.services.events.dispatchEvent(D.Tooltip.SHOW,{event:t,hoveredElement:n,content:r.name})}))}}class uy extends tv{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=I.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,o]=n.range(),[a,s]=r.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Zp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Zp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-i>0&&l.attr("x",i).attr("y",s).attr("width",o-i).attr("height",a-s),this.chartClipPath.merge(l).lower()}}class dy extends uy{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}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Zp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Zp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(r).lower()}}var hy,fy;!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(fy||(fy={}));var py=((hy={})[fy.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)}},hy[fy.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)}},hy[fy.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)}},hy[fy.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)}},hy),my=typeof window<"u"?window:{innerHeight:0,innerWidth:0},gy=function(){function e(e){void 0===e&&(e={}),this.positions=py,this.positions=Object.assign({},py,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(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.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),o=e.getBoundingClientRect();return this.calculatePosition(i,o,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 o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var a=n.map((function(n){var a=i(e,t,n),s=o.getPlacementBox(t,a),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 a.sort((function(e,t){return t.weight-e.weight})),a[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,r){var i=this;return void 0===r&&(r=this.defaultContainerFunction.bind(this)),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:my.innerHeight,width:my.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 gy;class vy extends tv{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=I.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new gy,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items,n=$d(e.detail.event.target).datum();let r;const i=this.formatItems(this.getItems(e));r=e.detail.content?`<div class="title-tooltip"><p>${ey(e.detail.content)}</p></div>`:ey(this.getTooltipHTML(i));const o=Zp.appendOrSelect(this.tooltip,"div.content-box");if(xu(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${ey(e.detail.content)}</p></div>`;o.html(t)}else o.html(`<div class="title-tooltip"><p>${ey(this.model.getOptions().tooltip.customHTML(t,r,n))}</p></div>`);else o.html(r);o.selectAll(".datapoint-tooltip").each((function(e,t){const n=i[t];i[t]&&i[t].color&&$d(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.lastTriggeredEventType=e.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(D.Tooltip.MOVE,(e=>{this.lastTriggeredEventType!==D.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)})),this.services.events.addEventListener(D.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(D.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(D.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(D.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(D.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(D.Tooltip.MOVE,null),this.services.events.removeEventListener(D.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(D.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(D.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(D.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(D.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=xu(t,"tooltip","truncation","type"),r=xu(t,"tooltip","truncation","threshold"),i=xu(t,"tooltip","truncation","numCharacter");return n!==z.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=Eu(e.label,n,i)),e.value&&e.value.length>r&&(e.value=Eu(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>"}isDate(e){return e instanceof Date}valueFormatter(e,t){const n=this.getOptions(),r=xu(n,"tooltip","valueFormatter"),{code:i,number:o,date:a}=xu(n,"locale");if(r)return r(e,t);if(this.isDate(e))return a(e,i,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof e&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(e))return a(new Date(e),i,{month:"short",day:"numeric",year:"numeric"})}catch{}return o(e,i)}render(e=!1){const t=this.getOptions(),n=xu(t,"tooltip","enabled");if(n){const e=$d(this.services.domUtils.getHolder()),n=xu(t,"style","prefix");this.tooltip=Zp.appendOrSelect(e,`div.${wc}--${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)}addOffsetByPlacement(e,t,n){const r=Object.assign({},e);return t==fy.LEFT?r.left-=n:t==fy.RIGHT?r.left+=n:t==fy.TOP?r.top-=n:t==fy.BOTTOM&&(r.top+=n),r}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=t.offsetWidth,r=t.offsetHeight,i=this.tooltip.node(),o=this.getOptions(),a=xu(o,"zoomBar","top","enabled"),s=!!xu(e,"detail","noWrap"),l=Array.isArray(xu(e,"detail","placements")),c=l?xu(e,"detail","placements"):[fy.RIGHT,fy.LEFT,fy.TOP,fy.BOTTOM];let u,{horizontalOffset:d}=Dc;const{defaultOffset:h}=Dc;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",s),l){const t=xu(e,"detail","event","target"),o=this.services.domUtils.getElementOffset(t,!0);u=this.positionService.findBestPlacementAt(o,i,c,(()=>({top:0,left:0,width:n,height:r})));let a=this.positionService.findPosition(t,i,u,(()=>this.services.domUtils.getElementOffset(t)));return a=this.addOffsetByPlacement(a,u,h),void this.positionService.setElement(i,a)}let f=xu(e,"detail","mousePosition");if(f){const e=xu(o,"zoomBar","top","type"),t=Lc.height[e];a&&(f[1]+=t+Lc.spacerHeight)}else f=Ua(xu(e,"detail","event"),t);u=f[0]/n>.9?fy.LEFT:f[0]/n<.1?fy.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},i,c,(()=>({top:void 0,left:void 0,width:n,height:r}))),u===fy.LEFT&&(d*=-1);const p=this.positionService.findPositionAt({left:f[0]+d,top:f[1]},i,u);this.positionService.setElement(i,p)}}const yy=class e extends tv{constructor(){super(...arguments),this.type="grid-brush",this.renderType=I.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const i=Zp.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Zp.appendOrSelect(i,`g.${this.type}`),a=Zp.appendOrSelect(o,this.selectionSelector),{width:s,height:l}=Zp.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=Zp.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===F.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),o=i*e.DASH_LENGTH;for(let t=0;t<i;t++)r+=","+e.DASH_LENGTH;r+=","+(l-o),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(a.attr("x"))+parseFloat(i.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const r=Qf().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]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=s&&(u=yg().extent([[0,0],[s-1,l]]).on("start brush end",r).on("end.brushed",d),o.call(u));const h=this.services.zoom.getZoomRatio();i.on("click",(function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=Ua(o.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)}}))}}};yy.DASH_LENGTH=4;let by=yy;class wy extends tv{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=I.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=yg(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(D.ZoomBar.UPDATE,this.render.bind(this));const e=xu(this.getOptions(),"zoomBar",P.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(P.TOP),r=this.services.zoom.isZoomBarLocked(P.TOP),i=xu(this.getOptions(),"zoomBar",P.TOP,"type"),o=xu(this.getOptions(),"axes",P.BOTTOM,"highlights"),a=Lc.height[i],{width:s}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Zp.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);if(Zp.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",Lc.spacerHeight).attr("opacity",1).attr("fill","none"),i===B.GRAPH_VIEW?Zp.appendOrSelect(u,"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===B.SLIDER_VIEW&&Zp.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",a/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(u,l,s);const{cartesianScales:d}=this.services,h=d.getMainXScale(),f=d.getMainYScale(),p=d.getMainXScaleType();if(h&&p===F.TIME){let e=this.services.zoom.getZoomBarData();if(function(e){if(null==e)return!0;if(Lt(e)&&(je(e)||"string"==typeof e||"function"==typeof e.splice||Wt(e)||en(e)||Ut(e)))return!e.length;var t=wr(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Pt(e))return!sn(e).length;for(var n in e)if(to.call(e,n))return!1;return!0}(e)||1===e.length)return;this.xScale=h.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const c=this.model.get("initialZoomDomain"),d=xu(this.getOptions(),"zoomBar",P.TOP,"initialZoomDomain");d&&d[0]&&d[1]&&(d[0]=new Date(d[0]),d[1]=new Date(d[1])),!d||c&&c[0].valueOf()===d[0].valueOf()&&c[1].valueOf()===d[1].valueOf()?null===d&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:no([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:no([],d),zoomDomain:d?no([],d):n},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(po(e,(e=>e.value)));const p=this.model.get("zoomDomain");if(i===B.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",e,null),this.updateClipPath(t,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",e,this.clipId),this.renderZoomBarBaseline(u,l,s),o)){const e=o.highlightStartMapsTo,t=o.highlightEndMapsTo,n=o.color,r=o.labelMapsTo;o.data.forEach(((i,o)=>{Zp.appendOrSelect(u,`rect.highlight-${o}`).attr("height",a-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(p,l,s);const m=Zp.appendOrSelect(t,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())m.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const e=p.map((e=>this.xScale(e)));e[1]-e[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}r&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const r=xu(this.getOptions(),"zoomBar",P.TOP,"type"),i=Lc.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=D.ZoomBar.SELECTION_START:"brush"===e.type?n=D.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=D.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(D.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(e,t){const n=this,r=Lc.handleWidth,i=xu(this.getOptions(),"zoomBar",P.TOP,"type"),o=Lc.height[i],a=-r/2,s=Lc.handleBarWidth,l=i===B.GRAPH_VIEW?Lc.handleBarHeight:6,c=-s/2,u=(o-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]+a,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+a,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",o).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]-a+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+a+c):void 0})).attr("y",u).attr("width",s).attr("height",l).attr("cursor","ew-resize"),i===B.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],o)}updateSliderSelectedArea(e){const t=xu(this.getOptions(),"zoomBar",P.TOP,"type"),n=Lc.height[t],r=this.getComponentContainer().select("svg.zoom-container");Zp.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,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(e,t,n)=>r=>i.getValueFromScale(e,t,n,r),u=c(this.xScale,s,o),d=c(this.yScale,l,a),h=xu(this.getOptions(),"zoomBar",P.TOP,"type"),f=Lc.height[h],p=Jg().x((e=>u(e))).y0(f).y1((e=>f-d(e))),m=Zp.appendOrSelect(e,t).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(e,t,n,r,i,o){const a=Zp.appendOrSelect(e,"clipPath").attr("id",t);Zp.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=ci(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=xu(this.model.getOptions(),"zoomBar",P.TOP,"type"),o=Lc.height[i],a=Qg()([[t,o],[n,o]]);Zp.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",a).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),Zp.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),xu(this.getOptions(),"zoomBar",P.TOP,"type")===B.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(D.ZoomBar.UPDATE,this.render.bind(this))}}class Ey extends tv{constructor(e,t){super(e,t),this.type="threshold",this.renderType=I.SVG,this.positionService=new gy}render(e=!1){const t=xu(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(P).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({ariaLabel:"threshold lines",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 o=i.selectAll("g.threshold-group").data((e=>e.thresholds.map((t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("line").attr("class","threshold-line"),a.append("rect").attr("class","threshold-hoverable-area"),a.merge(o).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,o=null;t===P.LEFT||t===P.RIGHT?(o=n,i=s.services.cartesianScales.getMainXScale()):(i=n,o=s.services.cartesianScales.getMainYScale());const a=r===F.LABELS,[l,c]=i.range(),[u,d]=o.range(),{cartesianScales:h}=s.services,f=h.getOrientation(),[p,m]=Su((e=>h.getDomainValue(e)),(e=>h.getRangeValue(e)),f),g=$d(this);t===P.TOP||t===P.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)+(a?n.step()/2:0))).attr("x2",(({datum:e})=>p(e)+(a?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)+(a?n.step()/2:0))).attr("y2",(({datum:e})=>m(e)+(a?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(D.Threshold.SHOW,(e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(D.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,r=this.getOptions(),i=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:a}=xu(r,"locale");if(i===F.TIME){const e=[P.LEFT,P.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),a=e?o:i,s=xu(r,"timeScale"),l=td(a.ticks(),xu(s,"timeInterval"));return Ju(t,0,a.ticks(),l,s,r.locale)}return a(t,o)}appendThresholdLabel(){const e=$d(this.services.domUtils.getHolder()),t=xu(this.getOptions(),"style","prefix");this.label=Zp.appendOrSelect(e,`div.${wc}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),r=Ua(e,n),i=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(ty(`${t.label||"Threshold"}: ${i}`)).style("background-color",t.fillColor);const o=this.label.node(),a=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},o,[fy.RIGHT,fy.LEFT,fy.TOP,fy.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),s=this.positionService.findPositionAt({left:r[0],top:r[1]},o,a);this.positionService.setElement(o,s)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=xu(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){$d(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(D.Threshold.SHOW,{event:t,hoveredElement:$d(this),datum:$d(this).datum()})})).on("mouseout",(function(t){$d(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(D.Threshold.HIDE,{event:t,hoveredElement:$d(this),datum:$d(this).datum()})}))}}class _y extends tv{constructor(e,t){super(e,t),this.type="highlight",this.renderType=I.SVG,this.positionService=new gy,this.highlightStrokeWidth=1}render(e=!1){const t=xu(this.getOptions(),"axes"),n=[];Object.keys(t).forEach((e=>{if(Object.values(P).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({ariaLabel:"highlight areas",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 o=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)))));o.exit().attr("opacity",0).remove();const a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");const s=this;i.each((function({axisPosition:t}){const n=s.services.cartesianScales.getMainXScale(),r=s.services.cartesianScales.getMainYScale(),[i,o]=n.range(),[a,l]=r.range(),{cartesianScales:c}=s.services,u=c.getOrientation(),[d,h]=Su((e=>c.getDomainValue(e)),(e=>c.getRangeValue(e)),u),f=$d(this);t===P.TOP||t===P.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(a-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(o-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 xy extends vy{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(),o=r.isDualAxes(),{groupMapsTo:a}=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(o){const e=r.getRangeAxisPosition({datum:i,groups:[i[a]]});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:In(n,"locale.translations.group")||In(n,"tooltip.groupLabel"),value:i[a],color:this.model.getFillColor(i[a]),class:this.model.getColorClassName({classNameTypes:[$.TOOLTIP],dataGroupName:i[a]})})}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[a],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[a]),class:this.model.getColorClassName({classNameTypes:[$.TOOLTIP],dataGroupName:e[a]})}})).sort(((e,t)=>t.value-e.value))),!o&&!0===xu(n,"tooltip","showTotal"))){const e=r.getRangeIdentifier();u.push({label:In(n,"locale.translations.total")||In(n,"tooltip.totalLabel")||"Total",value:t.reduce(((t,n)=>t+n[e]),0),bold:!0})}return u}}var Ty=Math.PI,Sy=2*Ty,Oy=1e-6,Ay=Sy-Oy;function My(){this._x0=this._y0=this._x1=this._y1=null,this._=""}My.prototype=function(){return new My}.prototype={constructor:My,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,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-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>Oy)if(Math.abs(u*s-l*c)>Oy&&i){var h=n-o,f=r-a,p=s*s+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=i*Math.tan((Ty-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,w=y/g;Math.abs(b-1)>Oy&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+w*s)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?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)>Oy||Math.abs(this._y1-c)>Oy)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%Sy+Sy),d>Ay?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Oy&&(this._+="A"+n+","+n+",0,"+ +(d>=Ty)+","+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._}},Array.prototype.slice;class Cy extends tv{constructor(){super(...arguments),this.type="grid",this.renderType=I.SVG}render(e=!0){const t=xu(this.getOptions(),"grid","x","enabled"),n=xu(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Zp.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Zp.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),r=jm(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(xu(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=xu(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=xu(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=Vm(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(xu(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=xu(this.getOptions(),"axes",e,"ticks","values");t&&r.tickValues(t)}else{const e=xu(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(wu(e).tx)-Number(wu(t).tx)));let r=-1;if(!n.length)return;n.forEach((t=>{e[0]>=+wu(t).tx&&r++}));const i=r+1<n.length?r+1:n.length,o=n[r],a=n[i];let s;if(o)if(a)s=+wu(a).tx-+wu(o).tx;else{const e=t.select("rect.chart-grid-backdrop").node();s=Zp.getSVGElementSize(e).width-+wu(o).tx}else s=+wu(a).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return s*l}getActiveGridline(e){const t=xu(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=wu(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(),[o,a]=r.range(),[s,l]=i.range();this.backdrop=Zp.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Zp.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(a-o)).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 Ny extends tv{constructor(){super(...arguments),this.type="line",this.renderType=I.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?Nc:kc))},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",kc)}}init(){const{events:e}=this.services;e.addEventListener(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:n,curves:r}=this.services,[i,o]=Su((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),n.getOrientation()),a=this.getOptions(),s=Qg().x(i).y(o).curve(r.getD3Curve()).defined((e=>null!=e[n.getRangeIdentifier(e)]));let l=[];if(this.configs.stacked){const e=Object.keys(a.axes).some((e=>a.axes[e].percentage)),{groupMapsTo:t}=a.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:xu(e,0,t),data:e.map((e=>({[n]:e.data.sharedStackKey,[t]:e[t],[r]:e[1]}))),hidden:!Am(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:[$.STROKE],dataGroupName:e.name,originalClassName:"line"}))).style("stroke",(e=>this.model.getStrokeColor(e.name,null,e.data))).attr("role",od.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class ky extends tv{constructor(){super(...arguments),this.type="ruler",this.renderType=I.SVG,this.isXGridEnabled=xu(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=xu(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=xu(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(),o=this.model.getDisplayData(),a=this.services.cartesianScales.getRangeScale(),[s,l]=a.range(),c=i===H.HORIZONTAL?n:t,u=Zp.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),d=Zp.appendOrSelect(u,"line.ruler-line"),h=r.selectAll("[role=graphics-symbol]"),f=o.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(D.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 r=p.map((e=>e.originalData)).filter((e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)])),o=p.map((e=>e.domainValue)),a=h.filter((e=>{const t=this.services.cartesianScales.getDomainValue(e);return o.includes(t)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(e,t){return Hi(e,t)}(this.elementsToHighlight,a)&&this.hideRuler(),a.dispatch("mouseover"),this.elementsToHighlight=a,this.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,mousePosition:[t,n],hoveredElement:d,data:this.formatTooltipData(r)}),u.attr("opacity",1);const c=p[0];"horizontal"===i?d.attr("x1",l).attr("x2",s).attr("y1",c.domainValue).attr("y2",c.domainValue):d.attr("y1",l).attr("y2",s).attr("x1",c.domainValue).attr("x2",c.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Zp.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(D.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=Ua(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(r=function(e,t,n){let r=null;return function(...i){const o=this;o.mousePosition=Ua(i[0],n),clearTimeout(r),r=setTimeout((function(){e.apply(o,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=Zp.appendOrSelect(e,"svg.chart-grid-backdrop")}}let Ry=class extends tv{constructor(){super(...arguments),this.type="scatter",this.renderType=I.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(D.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(D.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(!xu(this.getOptions(),"points","enabled")&&!xu(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:r}=n.data,{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");const o=i.getDomainIdentifier(),a=t.selectAll("circle.dot").data(this.getScatterData(),(e=>`${e[r]}-${e[o]}`));a.exit().attr("opacity",0).remove();const s=a.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(a);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,o]=Su(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),r),[a,s]=Su((e=>n.getDomainValue(e)),(e=>n.getRangeValue(e)),r),l=a(e),c=s(e);return o&&i?c<=o.scaleValue&&l>=i.scaleValue:o?c<=o.scaleValue:!!i&&l>=i.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:r,fillOpacity:i}=n.points,{cartesianScales:o}=this.services;if(!o)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:a}=n.data,[s,l]=Su((e=>o.getDomainValue(e)),(e=>o.getRangeValue(e)),o.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",(e=>{const t=o.getDomainIdentifier(e),n=this.model.getIsFilled(e[a],e[t],e,r)?[$.FILL,$.STROKE]:[$.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[a],originalClassName:"dot"})||""})).classed("threshold-anomaly",(e=>this.isDatapointThresholdAnomaly(e))).classed("filled",(e=>{const t=o.getDomainIdentifier(e);return this.model.getIsFilled(e[a],e[t],e,r)})).classed("unfilled",(e=>{const t=o.getDomainIdentifier(e);return!this.model.getIsFilled(e[a],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=o.getDomainIdentifier(e);if(this.model.getIsFilled(e[a],e[t],e,r))return this.model.getFillColor(e[a],e[t],e)})).style("stroke",(e=>{const t=o.getDomainIdentifier(e);return this.model.getStrokeColor(e[a],e[t],e)})).attr("fill-opacity",r?i:1).attr("opacity",c?0:1).attr("role",od.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(e=>e[o.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,o;const a=$d(this);a.classed("hovered",!0).attr("class",(n=>e.model.getColorClassName({classNameTypes:[$.FILL],dataGroupName:n[t],originalClassName:a.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(D.Tooltip.SHOW,{event:n,hoveredElement:a,data:[r],additionalItems:e.getTooltipAdditionalItems(r)}),null==(o=e.services.events)||o.dispatchEvent(D.Scatter.SCATTER_MOUSEOVER,{event:n,element:a,datum:r})})).on("mousemove",(function(t,n){var r,i;const o=$d(this);null==(r=e.services.events)||r.dispatchEvent(D.Scatter.SCATTER_MOUSEMOVE,{event:t,element:o,datum:n}),null==(i=e.services.events)||i.dispatchEvent(D.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){var r;null==(r=e.services.events)||r.dispatchEvent(D.Scatter.SCATTER_CLICK,{event:t,element:$d(this),datum:n})})).on("mouseout",(function(n,r){var i,o,a;const s=$d(this);if(s.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,o=null==(i=e.services.cartesianScales)?void 0:i.getDomainIdentifier(r),a=e.model.getIsFilled(r[t],r[o],r,n);s.classed("unfilled",!a).style("fill",(r=>a||n?e.model.getFillColor(r[t],r[o],r):null))}null==(o=e.services.events)||o.dispatchEvent(D.Scatter.SCATTER_MOUSEOUT,{event:n,element:s,datum:r}),null==(a=e.services.events)||a.dispatchEvent(D.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(D.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(D.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(D.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(D.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class Dy extends tv{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=I.SVG,this.truncation={[P.LEFT]:!1,[P.RIGHT]:!1,[P.TOP]:!1,[P.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),r=xu(n,"axes",t,"visible"),i=this.getComponentContainer({ariaLabel:"axes"}),{width:o,height:a}=Zp.getSVGElementSize(i,{useAttrs:!0}),s=Zp.appendOrSelect(i,`g.axis.${t}`);let l,c;if(t===P.BOTTOM||t===P.TOP?(l=this.configs.axes[P.LEFT]?this.margins.left:0,c=this.configs.axes[P.RIGHT]?o-this.margins.right:o):(l=a-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===F.LABELS||this.scaleType===F.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case P.LEFT:d=Vm;break;case P.BOTTOM:d=jm;break;case P.RIGHT:d=Um;break;case P.TOP:d=Fm}s.attr("aria-label",`${t} axis`);const h=!s.select("g.ticks").empty();let f=Zp.appendOrSelect(s,"g.ticks");h||(f.attr("role",`${od.GRAPHICS_OBJECT} ${od.GROUP}`),f.attr("aria-label",`${t} ticks`));const p=Zp.appendOrSelect(s,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),m=xu(n,"axes",t),g=this.scaleType===F.TIME||m.scaleType===F.TIME,v=t===P.LEFT||t===P.RIGHT,y=this.model.get("zoomDomain");if(y&&g&&!v&&u.domain(y),!r)return void f.attr("aria-hidden",!0);const b=xu(m,"scaleType"),w=xu(n,"data","loading"),E=xu(m,"ticks","number"),_=xu(m,"ticks","values"),x=xu(m,"truncation","type"),T=xu(m,"truncation","threshold"),S=xu(m,"truncation","numCharacter"),O=null!==E,A=xu(n,"timeScale"),M=Zp.appendOrSelect(p,"g.tick"),C=Zp.appendOrSelect(M,"text").text("0"),N=Zp.getSVGElementSize(C.node(),{useBBox:!0}).height;M.remove();const k=this.scaleType||m.scaleType||F.LINEAR,R=d(u).tickSizeOuter(0);if(u.ticks){let e;if(O?e=E:(e=Ec,v&&(e=this.getNumberOfFittingTicks(a,N,_c))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),R.ticks(e),g)if(u.ticks(e).length){const r=xu(n,"timeScale","addSpaceOnEdges"),i=xu(n,"axes",t,"domain"),o=u.copy();r&&!i&&o.nice(e);const a=o.ticks(e);r&&a.length>2&&!i&&(a.splice(a.length-1,1),a.splice(0,1)),R.tickValues(a)}else R.tickValues([])}let D;const I=xu(m,"ticks","formatter"),{code:L,number:$}=xu(n,"locale");if(g){const e=td(R.tickValues(),xu(n,"timeScale","timeInterval"));D=null===I?(t,r)=>Ju(t,r,R.tickValues(),e,A,n.locale):(t,r)=>{const i=Ju(t,r,R.tickValues(),e,A,n.locale);return I(t,r,i)}}else null===I?k===F.LINEAR&&(D=e=>$(e,L)):D=I;R.tickFormat(D);const[B,H]=this.services.cartesianScales.getScaleByPosition(t).domain();let U;if(_){if(g)_.forEach(((e,t)=>{void 0===e.getTime&&(_[t]=new Date(e))})),U=_.filter((e=>{const t=e.getTime();return t>=new Date(B).getTime()&&t<=new Date(H).getTime()}));else if(b===F.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();U=_.filter((t=>e.includes(t)))}else U=_.filter((e=>e>=B&&e<=H));R.tickValues(U)}switch(t){case P.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case P.BOTTOM:f.attr("transform",`translate(0, ${a-this.margins.bottom})`);break;case P.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case P.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const j=this.model.isDataEmpty();if(m.title){const e=Zp.appendOrSelect(s,"text.axis-title").html(j||w?"":ty(m.title)),n=xu(m,"titleOrientation");let r;switch(t){case P.LEFT:n===ee.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 P.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${a+4})`).style("text-anchor","middle");break;case P.RIGHT:n===ee.LEFT?e.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case P.TOP:r=Zp.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=td(R.tickValues(),xu(n,"timeScale","timeInterval")),r=A.showDayName,i=f;e&&(f=f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})))),f=f.call(R),i.selectAll(".tick").data(R.tickValues(),u).order().select("text").attr("class",((e,n)=>Qu(e,n,R.tickValues(),t,r)?"tick-label--primary":"tick-label"))}else f=e&&h?f.transition().call((t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))).call(R):f.call(R);if(p.call(R),t===P.BOTTOM||t===P.TOP){let e=!1;const n=xu(m,"ticks","rotation");if(n===K.ALWAYS)e=!0;else if(n===K.NEVER)e=!1;else if(!n||n===K.AUTO)if(u.step)e=p.selectAll("g.tick text").nodes().some((e=>Zp.getSVGElementSize(e,{useBBox:!0}).width>=u.step()));else{e=!1;const t=p.append("text").text("A"),n=Zp.getSVGElementSize(t.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const t=$d(this),i=parseFloat(xu(wu(this),"tx"));null!==i&&r+t.text().length*n*.8>=i&&(e=!0),r=i})),t.remove()}e?(O||(R.ticks(this.getNumberOfFittingTicks(o,N,xc)),p.call(R),f.call(R)),s.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===P.TOP?"start":"end")):s.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(w?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!==z.NONE&&b===F.LABELS&&!_){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>T?(r.truncation[t]=!0,Eu(e,x,S)):e})),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text((function(e){return e.length>T?Eu(e,x,S):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=Zp.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=xu(r,"axes",t),o=xu(i,"scaleType"),a=xu(i,"truncation","threshold"),s=this;n.selectAll("g.tick text").on("mouseover",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOVER,{event:e,element:$d(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,hoveredElement:$d(this),content:t})})).on("mousemove",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEMOVE,{event:e,element:$d(this),datum:t}),o===F.LABELS&&t.length>a&&s.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("click",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_CLICK,{event:e,element:$d(this),datum:t})})).on("mouseout",(function(e,t){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOUT,{event:e,element:$d(this),datum:t}),o===F.LABELS&&s.services.events.dispatchEvent(D.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 function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Rd(n))==n?n:0),void 0!==t&&(t=(t=Rd(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}(Rd(e),t,n)}(Math.floor(e/(t*n)),2,Ec)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Zp.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class Iy extends Dy{constructor(e,t,n){super(e,t,n)}render(e=!0){super.render(e),super.destroy();const t=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),r=Zp.appendOrSelect(n,`g.axis.${t}`),i=this;r.selectAll("g.tick").each((function(e,n){const r=$d(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=r.select("text"),{width:a,height:s}=Zp.getSVGElementSize(o,{useBBox:!0}),l=Zp.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(t){case P.LEFT:c=-a+Number(o.attr("x")),u=-s/2;break;case P.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-s/2;break;case P.TOP:c=-a/2,u=-s+Number(o.attr("y"))/2,i.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case P.BOTTOM:c=-a/2,u=s/2-2,i.truncation[t]&&(c=-a,l.attr("transform","rotate(-45)"))}l.attr("x",c-Sc).attr("y",u).attr("width",a+2*Sc).attr("height",s).lower()})),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Zp.appendOrSelect(e,`g.axis.${t}`),r=this.getOptions(),i=xu(r,"axes",t),o=xu(i,"scaleType"),a=xu(i,"truncation","threshold"),s=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(e){const t=$d(this).select("text"),n=t.datum();s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),o===F.LABELS&&n.length>a&&s.services.events.dispatchEvent(D.Tooltip.SHOW,{event:e,element:t,datum:n})})).on("mousemove",(function(e){const t=$d(this).select("text"),n=t.datum();s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),s.services.events.dispatchEvent(D.Tooltip.MOVE,{event:e})})).on("click",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_CLICK,{event:e,element:$d(this).select("text"),datum:$d(this).select("text").datum()})})).on("mouseout",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_MOUSEOUT,{event:e,element:$d(this).select("text"),datum:$d(this).select("text").datum()}),o===F.LABELS&&s.services.events.dispatchEvent(D.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(D.Axis.LABEL_FOCUS,{event:{...e,...t},element:$d(this),datum:$d(this).select("text").datum()})})).on("blur",(function(e){s.services.events.dispatchEvent(D.Axis.LABEL_BLUR,{event:e,element:$d(this),datum:$d(this).select("text").datum()})})).on("keydown",(function(e){e.key&&"Escape"===e.key&&(s.services.events.dispatchEvent(D.Tooltip.HIDE),s.services.events.dispatchEvent(D.Axis.LABEL_BLUR,{event:e,element:$d(this),datum:$d(this).select("text").datum()})),t===P.LEFT||t===P.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;Zp.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 Ly extends tv{constructor(){super(...arguments),this.type="2D-axes",this.renderType=I.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys(P),r=xu(this.getOptions(),"axes");n.forEach((e=>{r[P[e]]&&(t[P[e]]=!0)})),this.configs.axes=t,n.forEach((e=>{const t=P[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===re.DEFAULT?new Dy(this.model,this.services,e):new Iy(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:o,height:a}=Zp.getSVGElementSize(r,{useBBox:!0});let s;switch(t.getTitleRef().empty()?s=0:(s=Zp.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===P.LEFT||n===P.RIGHT)&&(s+=5)),n){case P.TOP:i.top=a+s;break;case P.BOTTOM:i.bottom=a+s;break;case P.LEFT:i.left=o+s;break;case P.RIGHT:i.right=o+s}})),this.services.events.dispatchEvent(D.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(D.ZoomBar.UPDATE),Object.keys(this.children).forEach((e=>{this.children[e].margins=this.margins})),this.render(!0))}}class $y extends tv{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=xu(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===Z.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===Z.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===Z.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==Z.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===H.VERTICAL&&this.drawYGrid(e),t===H.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=yc().domain([0,1]).range(e),this.yScale=yc().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:r}=Zp.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Zp.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Zp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,a]=this.yScale.range();this.backdrop.merge(i).attr("x",o).attr("y",a),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=xu(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((e=>e*t)),i=Zp.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).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=xu(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((e=>e*t)),o=Zp.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(e=>e)).attr("y2",(e=>e)),o.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:o}=Zp.getSVGElementSize(r,{useAttrs:!0}),a=Zp.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",o),s=0===t?"pie":"donut",l=xu(this.getOptions(),s,"alignment");Zp.appendOrSelect(a,"rect.chart-skeleton-area-container").attr("width",i).attr("height",o).attr("fill","none");const c=function(){var e=Vg,t=Gg,n=sd(0),r=null,i=Wg,o=qg,a=Yg,s=null,l=jg(c);function c(){var c,u,d=+e.apply(this,arguments),h=+t.apply(this,arguments),f=i.apply(this,arguments)-lp,p=o.apply(this,arguments)-lp,m=Jf(p-f),g=p>f;if(s||(s=c=l()),h<d&&(u=h,h=d,d=u),h>ap)if(m>cp-ap)s.moveTo(h*tp(f),h*ip(f)),s.arc(0,0,h,f,p,!g),d>ap&&(s.moveTo(d*tp(p),d*ip(p)),s.arc(0,0,d,p,f,g));else{var v,y,b=f,w=p,E=f,_=p,x=m,T=m,S=a.apply(this,arguments)/2,O=S>ap&&(r?+r.apply(this,arguments):op(d*d+h*h)),A=rp(Jf(h-d)/2,+n.apply(this,arguments)),M=A,C=A;if(O>ap){var N=up(O/d*ip(S)),k=up(O/h*ip(S));(x-=2*N)>ap?(E+=N*=g?1:-1,_-=N):(x=0,E=_=(f+p)/2),(T-=2*k)>ap?(b+=k*=g?1:-1,w-=k):(T=0,b=w=(f+p)/2)}var R=h*tp(b),D=h*ip(b),I=d*tp(_),L=d*ip(_);if(A>ap){var $,P=h*tp(w),B=h*ip(w),z=d*tp(E),H=d*ip(E);if(m<sp)if($=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,h=d*l-u*c;if(!(h*h<ap))return[e+(h=(u*(t-o)-d*(e-i))/h)*l,t+h*c]}(R,D,z,H,P,B,I,L)){var F=R-$[0],U=D-$[1],j=P-$[0],V=B-$[1],G=1/ip(function(e){return e>1?0:e<-1?sp:Math.acos(e)}((F*j+U*V)/(op(F*F+U*U)*op(j*j+V*V)))/2),W=op($[0]*$[0]+$[1]*$[1]);M=rp(A,(d-W)/(G-1)),C=rp(A,(h-W)/(G+1))}else M=C=0}T>ap?C>ap?(v=Zg(z,H,R,D,h,C,g),y=Zg(P,B,I,L,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<A?s.arc(v.cx,v.cy,C,ep(v.y01,v.x01),ep(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,C,ep(v.y01,v.x01),ep(v.y11,v.x11),!g),s.arc(0,0,h,ep(v.cy+v.y11,v.cx+v.x11),ep(y.cy+y.y11,y.cx+y.x11),!g),s.arc(y.cx,y.cy,C,ep(y.y11,y.x11),ep(y.y01,y.x01),!g))):(s.moveTo(R,D),s.arc(0,0,h,b,w,!g)):s.moveTo(R,D),d>ap&&x>ap?M>ap?(v=Zg(I,L,P,B,d,-M,g),y=Zg(R,D,z,H,d,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<A?s.arc(v.cx,v.cy,M,ep(v.y01,v.x01),ep(y.y01,y.x01),!g):(s.arc(v.cx,v.cy,M,ep(v.y01,v.x01),ep(v.y11,v.x11),!g),s.arc(0,0,d,ep(v.cy+v.y11,v.cx+v.x11),ep(y.cy+y.y11,y.cx+y.x11),g),s.arc(y.cx,y.cy,M,ep(y.y11,y.x11),ep(y.y01,y.x01),!g))):s.arc(0,0,d,_,E,g):s.lineTo(I,L)}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)+ +o.apply(this,arguments))/2-sp/2;return[tp(r)*n,ip(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sd(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sd(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:sd(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:sd(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:sd(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:sd(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:sd(+e),c):a},c.context=function(e){return arguments.length?(s=e??null,c):s},c}().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(-15),d=e+(Math.min(i,o)-2*e)/2,h=Zp.appendOrSelect(a,"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+30;l===j.CENTER?f=i/2:l===j.RIGHT&&(f=i-e-30);const p=e+20;h.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:e,height:t}=Zp.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(e,t)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(e){const t="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Zp.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,o=Zp.appendOrSelect(n,"defs").lower(),a=Zp.appendOrSelect(o,"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`;a.html(s),function e(){a.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(qm).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class Py extends tv{constructor(){super(...arguments),this.type="zero-line",this.renderType=I.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[r,i]=n.domain(),o=r>0&&i<0||r<0&&i>0,a=this.getComponentContainer({isPresentational:!0});if(!o)return void a.selectAll("line.domain").remove();const[s,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=Tu({x0:s,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Zp.appendOrSelect(a,"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 By extends $y{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=xu(this.getOptions(),"data","loading"),n=!(xu(this.getOptions(),"grid","x","enabled")||xu(this.getOptions(),"grid","y","enabled")||xu(this.getOptions(),"axes","bottom","visible")||xu(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=Zp.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=Zp.appendOrSelect(e,"svg.chart-skeleton.DAII"),Zp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function zy(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}var Hy={value:function(){}};function Fy(){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 Uy(r)}function Uy(e){this._=e}function jy(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function Vy(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Hy,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Uy.prototype=Fy.prototype={constructor:Uy,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),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=Vy(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Vy(r[n],e.name,null);return this}for(;++o<a;)if((n=(e=i[o]).type)&&(n=jy(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Uy(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const Gy=zy(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Fy},Symbol.toStringTag,{value:"Module"})));var Wy,qy;function Yy(e){return null!=e&&e.length?Bn(e,1):[]}function Zy(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 o=Array(i);++r<i;)o[r]=e[r+t];return o}function Xy(e,t){return null==(e=function(e,t){return t.length<2?e:Dn(e,Zy(t,0,-1))}(e,t=kn(t,e)))||delete e[Rn(eo(t))]}function Ky(e){return Wn(e)?void 0:e}!function(){if(qy)return Wy;qy=1;const e=Gy.dispatch,t=Math.PI/180,n={archimedean:p,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]}}},r=2048;function i(e){return e.text}function o(){return"serif"}function a(){return"normal"}function s(e){return Math.sqrt(e.value)}function l(){return 30*(~~(6*random())-3)}function c(){return 1}function u(e,n,i,o){if(!n.sprite){var a=e.context,s=e.ratio;a.clearRect(0,0,2048/s,r/s);var l=0,c=0,u=0,d=i.length;for(--o;++o<d;){n=i[o],a.save(),a.font=n.style+" "+n.weight+" "+~~((n.size+1)/s)+"px "+n.font;const e=a.measureText(n.text),d=-Math.floor(e.width/2);let y=(e.width+1)*s,b=n.size<<1;if(n.rotate){var h=Math.sin(n.rotate*t),f=Math.cos(n.rotate*t),p=y*f,m=y*h,g=b*f,v=b*h;y=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,b=~~Math.max(Math.abs(m+g),Math.abs(m-g))}else y=y+31>>5<<5;if(b>u&&(u=b),l+y>=2048&&(l=0,c+=u,u=0),c+b>=r)break;a.translate((l+(y>>1))/s,(c+(b>>1))/s),n.rotate&&a.rotate(n.rotate*t),a.fillText(n.text,d,0),n.padding&&(a.lineWidth=2*n.padding,a.strokeText(n.text,d,0)),a.restore(),n.width=y,n.height=b,n.xoff=l,n.yoff=c,n.x1=y>>1,n.y1=b>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,l+=y}for(var y=a.getImageData(0,0,2048/s,r/s).data,b=[];--o>=0;)if((n=i[o]).hasText){for(var w=n.width,E=w>>5,_=n.y1-n.y0,x=0;x<_*E;x++)b[x]=0;if(null==(l=n.xoff))return;c=n.yoff;for(var T=0,S=-1,O=0;O<_;O++){for(x=0;x<w;x++){var A=E*O+(x>>5),M=y[2048*(c+O)+(l+x)<<2]?1<<31-x%32:0;b[A]|=M,T|=M}T?S=O:(n.y0++,_--,O--,c++)}n.y1=n.y0+S,n.sprite=b.slice(0,(n.y1-n.y0)*E)}}}function d(e,t,n){n>>=5;for(var r,i=e.sprite,o=e.width>>5,a=e.x-(o<<4),s=127&a,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(a>>5),d=0;d<c;d++){r=0;for(var h=0;h<=o;h++)if((r<<l|(h<o?(r=i[d*o+h])>>>s:0))&t[u+h])return!0;u+=n}return!1}function h(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 f(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 p(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function m(){return document.createElement("canvas")}function g(e){return"function"==typeof e?e:function(){return e}}Wy=function(){var t=[256,256],v=i,y=o,b=s,w=a,E=a,_=l,x=c,T=p,S=[],O=1/0,A=e("word","end"),M=null,C=Math.random,N={},k=m;function R(e,n,r){t[0],t[1];for(var i,o,a,s=n.x,l=n.y,c=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=T(t),h=C()<.5?1:-1,p=-h;(i=u(p+=h))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=c));)if(n.x=s+o,n.y=l+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||f(n,r))&&!d(n,e,t[0])){for(var m,g=n.sprite,v=n.width>>5,y=t[0]>>5,b=n.x-(v<<4),w=127&b,E=32-w,_=n.y1-n.y0,x=(n.y+n.y0)*y+(b>>5),S=0;S<_;S++){m=0;for(var O=0;O<=v;O++)e[x+O]|=m<<E|(O<v?(m=g[S*v+O])>>>w:0);x+=y}return!0}return!1}return N.canvas=function(e){return arguments.length?(k=g(e),N):k},N.start=function(){var e=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=r/n,t.fillStyle=t.strokeStyle="red",{context:t,ratio:n}}(k()),n=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((t[0]>>5)*t[1]),i=null,o=S.length,a=-1,s=[],l=S.map((function(e,t){return e.text=v.call(this,e,t),e.font=y.call(this,e,t),e.style=w.call(this,e,t),e.weight=E.call(this,e,t),e.rotate=_.call(this,e,t),e.size=~~b.call(this,e,t),e.padding=x.call(this,e,t),e})).sort((function(e,t){return t.size-e.size}));return M&&clearInterval(M),M=setInterval(c,0),c(),N;function c(){for(var r=Date.now();Date.now()-r<O&&++a<o&&M;){var c=l[a];c.x=t[0]*(C()+.5)>>1,c.y=t[1]*(C()+.5)>>1,u(e,c,l,a),c.hasText&&R(n,c,i)&&(s.push(c),A.call("word",N,c),i?h(i,c):i=[{x:c.x+c.x0,y:c.y+c.y0},{x:c.x+c.x1,y:c.y+c.y1}],c.x-=t[0]>>1,c.y-=t[1]>>1)}a>=o&&(N.stop(),A.call("end",N,s,i))}},N.stop=function(){M&&(clearInterval(M),M=null);for(const e of S)delete e.sprite;return N},N.timeInterval=function(e){return arguments.length?(O=e??1/0,N):O},N.words=function(e){return arguments.length?(S=e,N):S},N.size=function(e){return arguments.length?(t=[+e[0],+e[1]],N):t},N.font=function(e){return arguments.length?(y=g(e),N):y},N.fontStyle=function(e){return arguments.length?(w=g(e),N):w},N.fontWeight=function(e){return arguments.length?(E=g(e),N):E},N.rotate=function(e){return arguments.length?(_=g(e),N):_},N.text=function(e){return arguments.length?(v=g(e),N):v},N.spiral=function(e){return arguments.length?(T=n[e]||e,N):T},N.fontSize=function(e){return arguments.length?(b=g(e),N):b},N.padding=function(e){return arguments.length?(x=g(e),N):x},N.random=function(e){return arguments.length?(C=e,N):C},N.on=function(){var e=A.on.apply(A,arguments);return e===A?N:e},N}}();var Qy=function(e){return bt(kt(e,void 0,Yy),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ue(t,(function(t){return t=kn(t,e),r||(r=t.length>1),t})),Ct(e,ar(e),n),r&&(n=ai(n,7,Ky));for(var i=t.length;i--;)Xy(n,t[i]);return n}));function Jy(e){return Math.log(e)}function eb(e){return Math.exp(e)}function tb(e){return-Math.log(-e)}function nb(e){return-Math.exp(-e)}function rb(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ib(e){return(t,n)=>-e(-t,n)}function ob(){const e=function(e){const t=e(Jy,eb),n=t.domain;let r,i,o=10;function a(){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)}(o),i=function(e){return 10===e?rb:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=ib(r),i=ib(i),e(tb,nb)):e(Jy,eb),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),h=r(s);const f=null==e?10:+e;let p=[];if(!(o%1)&&h-d<f){if(d=Math.floor(d),h=Math.ceil(h),a>0){for(;d<=h;++d)for(c=1;c<o;++c)if(u=d<0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}}else for(;d<=h;++d)for(c=o-1;c>=1;--c)if(u=d>0?c/i(-d):c*i(d),!(u<a)){if(u>s)break;p.push(u)}2*p.length<f&&(p=_o(a,s,f))}else p=_o(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===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Zl(n)).precision&&(n.trim=!0),n=tc(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*o<o-.5&&(t*=o),t<=a?n(e):""}},t.nice=()=>n(Bd(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}(mc()).domain([1,10]);return e.copy=()=>pc(e,ob()).base(e.base()),oc.apply(e,arguments),e}function ab(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 sb(e){this._context=e}function lb(e){return new sb(e)}function cb(e){this._context=e}function ub(e){return new cb(e)}function db(e){this._context=e}function hb(e){return new db(e)}function fb(e,t){this._basis=new sb(e),this._beta=t}sb.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:ab(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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},cb.prototype={areaStart:fp,areaEnd:fp,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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},db.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:ab(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fb.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],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pb=function e(t){function n(e){return 1===t?new sb(e):new fb(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function mb(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 gb(e,t){this._context=e,this._k=(1-t)/6}gb.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:mb(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:mb(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 vb=function e(t){function n(e){return new gb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function yb(e,t){this._context=e,this._k=(1-t)/6}yb.prototype={areaStart:fp,areaEnd:fp,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:mb(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 bb=function e(t){function n(e){return new yb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function wb(e,t){this._context=e,this._k=(1-t)/6}wb.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:mb(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 Eb=function e(t){function n(e){return new wb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function _b(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>ap){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>ap){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);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function xb(e,t){this._context=e,this._alpha=t}xb.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:_b(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 Tb=function e(t){function n(e){return t?new xb(e,t):new gb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Sb(e,t){this._context=e,this._alpha=t}Sb.prototype={areaStart:fp,areaEnd:fp,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:_b(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 Ob=function e(t){function n(e){return t?new Sb(e,t):new yb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ab(e,t){this._context=e,this._alpha=t}Ab.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:_b(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 Mb=function e(t){function n(e){return t?new Ab(e,t):new wb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Cb(e){return e<0?-1:1}function Nb(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Cb(o)+Cb(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function kb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rb(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Db(e){this._context=e}function Ib(e){this._context=new Lb(e)}function Lb(e){this._context=e}function $b(e){return new Db(e)}function Pb(e){return new Ib(e)}function Bb(e){this._context=e}function zb(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Hb(e){return new Bb(e)}function Fb(e,t){this._context=e,this._t=t}function Ub(e){return new Fb(e,.5)}function jb(e){return new Fb(e,0)}function Vb(e){return new Fb(e,1)}Db.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:Rb(this,this._t0,kb(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,Rb(this,kb(this,n=Nb(this,e,t)),n);break;default:Rb(this,this._t0,n=Nb(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Ib.prototype=Object.create(Db.prototype)).point=function(e,t){Db.prototype.point.call(this,t,e)},Lb.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Bb.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=zb(e),i=zb(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Fb.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}};class Gb extends Yp{zoomIn(e,t,n){let r,i,o;const a=n||Oc;e&&(r=e.x,i=e.y,o=2);const{width:s,height:l}=Zp.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(a.duration).ease(a.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${o}) translate(${-r},${-i})`),this.services.events.dispatchEvent(D.CanvasZoom.CANVAS_ZOOM_IN,{element:$d(e)})}zoomOut(e,t){const n=t||Oc;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(D.CanvasZoom.CANVAS_ZOOM_OUT)}}class Wb extends Yp{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 qb extends Yp{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 Yb extends Yp{constructor(){super(...arguments),this.pendingTransitions={}}init(){var e;null==(e=this.services.events)||e.addEventListener(D.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(xu(Ic,t,"duration")||Ic.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Zb(e,t){const n=+ye(e)-+ye(t);return n<0?-1:n>0?1:n}function Xb(e,t,n){const r=ye(e,void 0);if(isNaN(t))return pe(e,NaN);if(!t)return r;const i=r.getDate(),o=pe(e,r.getTime());return o.setMonth(r.getMonth()+t+1,0),i>=o.getDate()?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function Kb(e,t,n){return Xb(e,12*t)}function Qb(e,t,n){return Kb(e,-t)}function Jb(e,t,n){const[r,i,o]=me(0,e,e,t),a=Zb(i,o),s=Math.abs(function(e,t){const[n,r]=me(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(i,o));if(s<1)return 0;1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=Zb(i,o)===-a;(function(e){const t=ye(e,void 0);return+function(e){const t=ye(e,void 0);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=ye(e,void 0),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)})(r)&&1===s&&1===Zb(r,o)&&(l=!1);const c=a*(s-+l);return 0===c?0:c}function ew(e,t,n){return Xb(e,-t)}function tw(e,t){const 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 nw(e,t,n){const r=ye(e,void 0);return isNaN(t)?pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function rw(e,t,n){return nw(e,-t)}function iw(e){return e=>{const t=(0,Math.trunc)(e);return 0===t?0:t}}function ow(e,t,n){return pe(e,+ye(e)+t)}function aw(e,t,n){return ow(e,t*he)}function sw(e,t,n){return aw(e,-t)}function lw(e,t){return+ye(e)-+ye(t)}function cw(e,t,n){const r=lw(e,t)/de;return iw()(r)}function uw(e,t,n){const r=ye(e,void 0);return r.setTime(r.getTime()+t*de),r}function dw(e,t,n){return uw(e,-t)}function hw(e,t,n){const r=lw(e,t)/1e3;return iw()(r)}function fw(e,t,n){return ow(e,1e3*t)}function pw(e,t,n){return fw(e,-t)}class mw extends Yp{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=xu(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=xu(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==e?o=e[r]:t&&t.length>0&&(o=t[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return xu(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===P.BOTTOM||e===P.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(P).map((e=>P[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!==P.LEFT&&this.rangeAxisPosition!==P.RIGHT||this.domainAxisPosition!==P.BOTTOM&&this.domainAxisPosition!==P.TOP?this.orientation=H.HORIZONTAL:this.orientation=H.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var e,t,n,r;const i=this.model.getOptions(),o=xu(i,"axes");(null!=(e=o[P.LEFT])&&e.correspondingDatasets&&o[P.RIGHT]||null!=(t=o[P.RIGHT])&&t.correspondingDatasets&&o[P.LEFT]||null!=(n=o[P.TOP])&&n.correspondingDatasets&&o[P.BOTTOM]||null!=(r=o[P.BOTTOM])&&r.correspondingDatasets&&o[P.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=xu(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]===F.LINEAR||this.scaleTypes[e]===F.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=[P.BOTTOM,P.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((t=>e.indexOf(t)>-1))}getMainYAxisPosition(){const e=[P.LEFT,P.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(),o=xu(i,"axes")[n],{mapsTo:a}=o,s=null!==xu(r,a)?r[a]:r;let l;switch(t){case F.LABELS:l=e(s)+e.step()/2;break;case F.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(),o=xu(i,"axes")[n],{mapsTo:a}=o,s=void 0!==e[a]?e[a]:e;return[r(null!==xu(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:s),r(null!==xu(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 xu(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return xu(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),r=xu(n,"axes",e);return r.scaleType===F.TIME?function(e,t){const n=new Date(e[0]),r=new Date(e[1]);return function(e,t){const[n,r]=me(0,e,t),i=Zb(n,r),o=Math.abs(function(e,t){const[n,r]=me(0,e,t);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);const a=i*(o-+(Zb(n,r)===-i));return 0===a?0:a}(r,n)>1?[Qb(n,t),Kb(r,t)]:Jb(r,n)>1?[ew(n,t),Xb(r,t)]:function(e,t){const[n,r]=me(0,e,t),i=tw(n,r),o=Math.abs(Mu(n,r));n.setDate(n.getDate()-i*o);const a=i*(o-+(tw(n,r)===-i));return 0===a?0:a}(r,n)>1?[rw(n,t),nw(r,t)]:function(e,t){const[n,r]=me(0,e,t),i=(+n-+r)/he;return iw()(i)}(r,n)>1?[sw(n,t),aw(r,t)]:cw(r,n)>30?[dw(n,30*t),uw(r,30*t)]:cw(r,n)>1?[dw(n,t),uw(r,t)]:hw(r,n)>15?[pw(n,15*t),fw(r,15*t)]:hw(r,n)>1?[pw(n,t),fw(r,t)]:[n,r]}(t,xu(n,"timeScale","addSpaceOnEdges")):function([e,t],n,r){const i=(t-e)*n,o=t<=0&&t+i>0?0:t+i;let a=e>=0&&e-i<0?0:e-i;if(r===F.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,o]}(t,.1,r.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=xu(e,"axes"),n=this.isDualAxes();return null===xu(t,P.LEFT)&&null!==xu(t,P.RIGHT)||!0===xu(t,P.RIGHT,"main")||n&&xu(t,P.LEFT,"correspondingDatasets")?{primary:P.RIGHT,secondary:P.LEFT}:{primary:P.LEFT,secondary:P.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=xu(e,"axes"),n=this.isDualAxes();return null===xu(t,P.BOTTOM)&&null!==xu(t,P.TOP)||!0===xu(t,P.TOP,"main")||n&&xu(t,P.BOTTOM,"correspondingDatasets")?{primary:P.TOP,secondary:P.BOTTOM}:{primary:P.BOTTOM,secondary:P.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),r=xu(n,"axes",e.primary),i=xu(n,"axes",t.primary),o=r.scaleType||F.LINEAR,a=i.scaleType||F.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,(!(a===F.LABELS||a===F.TIME)&&o===F.LABELS||o===F.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=xu(t,"axes",e),r=xu(t,"bounds"),{includeZero:i}=n,o=xu(n,"scaleType")||F.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,So(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 a=this.model.getDisplayData(),{extendLinearDomainBy:s,mapsTo:l,percentage:c,thresholds:u}=n,{reference:d,compareTo:h}=Tc;if(n.domain)return o===F.LABELS?n.domain:(o===F.TIME&&(n.domain=n.domain.map((e=>void 0===e.getTime?new Date(e):e))),this.extendsDomain(e,n.domain));if(c)return[0,100];if(n&&o===F.LABELS)return so(a.map((e=>e[l])));let f,p;const m=this.model.getDataGroupNames();if(o===F.LABELS_RATIO)return a.map((e=>`${e[d]}/${e[h]}`));if(o===F.TIME)p=a.map((e=>+new Date(e[l])));else if(r&&t.axes)p=[],a.forEach((e=>{p.push(e[l]),e[r.upperBoundMapsTo]&&p.push(e[r.upperBoundMapsTo]),e[r.lowerBoundMapsTo]&&p.push(e[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),r=a.filter((t=>!m.includes(t[e]))),i=[];n.forEach((e=>{const{...t}=e;let n=0,r=0;Object.values(Qy(t,"sharedStackKey")).forEach((e=>{isNaN(e)||(e<0?r+=e:n+=e)})),i.push([r,n])})),p=[...Yy(i),...r.map((e=>e[l]))]}else p=[],a.forEach((e=>{const t=e[l];Array.isArray(t)&&2===t.length?(p.push(t[0]),p.push(t[1])):(s&&p.push(Math.max(e[l],e[s])),p.push(t))}));return o!==F.TIME&&o!==F.LOG&&i&&p.push(0),u&&u.length>0&&u.forEach((e=>{const t=xu(e,"value");null!==t&&p.push(t)})),f=po(p),f=this.extendsDomain(e,f),f}createScale(e){const t=this.model.getOptions(),n=xu(t,"axes",e);if(!n)return null;const r=xu(n,"scaleType")||F.LINEAR;let i;return this.scaleTypes[e]=r,i=r===F.TIME?Qf():r===F.LOG?ob().base(n.base||10):r===F.LABELS||r===F.LABELS_RATIO?Pd():yc(),i.domain(this.getScaleDomain(e)),i}getDomainLowerBound(e){let t,n=0;return t=this.getOrientation()===H.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===xu(this.model.getOptions(),"axes",e,"includeZero")&&t[0]>0&&t[1]>0&&(n=t[0]),n}getHighestDomainThreshold(){const e=xu(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)===F.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=xu(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 gw extends Yp{constructor(){super(...arguments),this.curveTypes={curveLinear:hp,curveLinearClosed:mp,curveBasis:lb,curveBasisClosed:ub,curveBasisOpen:hb,curveBundle:pb,curveCardinal:vb,curveCardinalClosed:bb,curveCardinalOpen:Eb,curveCatmullRom:Tb,curveCatmullRomClosed:Ob,curveCatmullRomOpen:Mb,curveMonotoneX:$b,curveMonotoneY:Pb,curveNatural:Hb,curveStep:Ub,curveStepAfter:Vb,curveStepBefore:jb}}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 vw extends Yp{isZoomBarEnabled(){if(!this.services.cartesianScales||!xu(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=xu(this.model.getOptions(),"axes",e,"scaleType");return e===P.BOTTOM&&t===F.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(),o=xu(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,po(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(D.ZoomDomain.CHANGE,{newDomain:e}))}getZoomRatio(){return xu(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),o=xu(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&r){const t=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=e.filter((e=>new Date(e[t])>=r[0]&&new Date(e[t])<=r[1]));if(o.length>0)return o}return e}zoomIn(e=this.getZoomRatio()){var t;const n=this.model.get("zoomDomain"),r=Lc.handleWidth,i=null==(t=this.services.cartesianScales)?void 0:t.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const o=i(n[0]),a=i(n[1]);if(a-o<r+1)return;const s=i.range(),l=a-o,c=Math.min((s[1]-s[0])/2*(e/2),l/2);let u=o+c,d=a-c;u>=d&&(u=o+l/2-r/2,d=a-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]),o=n.range(),a=(o[1]-o[0])/2*(e/2),s=Math.max(r-a,o[0]),l=Math.min(i+a,o[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())<xu(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 xu(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return xu(this.model.getOptions(),"zoomBar",e,"locked")}}var yw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function bw(e){return yw.test(e)}var ww="\\ud800-\\udfff",Ew="["+ww+"]",_w="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",xw="\\ud83c[\\udffb-\\udfff]",Tw="[^"+ww+"]",Sw="(?:\\ud83c[\\udde6-\\uddff]){2}",Ow="[\\ud800-\\udbff][\\udc00-\\udfff]",Aw="(?:"+_w+"|"+xw+")?",Mw="[\\ufe0e\\ufe0f]?",Cw=Mw+Aw+"(?:\\u200d(?:"+[Tw,Sw,Ow].join("|")+")"+Mw+Aw+")*",Nw="(?:"+[Tw+_w+"?",_w,Sw,Ow,Ew].join("|")+")",kw=RegExp(xw+"(?="+xw+")|"+Nw+Cw,"g");var Rw=function(e){var t=bw(e=Nn(e))?function(e){return bw(e)?function(e){return e.match(kw)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return Zy(e,1,n=void 0===n?r:n)}(t).join(""):e.slice(1);return n.toUpperCase()+r};Sm((function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return Rw(Nn(e).toLowerCase())}(t):t)}));class Dw{constructor(e,t){this.components=[],this.services={canvasZoom:Gb,domUtils:Zp,events:Wb,files:qb,gradientUtils:Xp,transitions:Yb},this.model=new xd(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(D.Model.UPDATE,(e=>{const t=!!xu(e,"detail","animate");this.update(t)})),this.model.setData(t.data),this.services.events.addEventListener(D.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(D.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=xu(n,"toolbar","enabled"),i={id:"legend",components:[new cy(this.model,this.services)],growth:q.PREFERRED},o=xu(n,"canvasZoom","enabled");o&&!0===o&&e.push(new dy(this.model,this.services));const a=!!this.model.getOptions().title,s={id:"title",components:[new ly(this.model,this.services)],growth:q.STRETCH},l={id:"toolbar",components:[new ry(this.model,this.services)],growth:q.PREFERRED},c={id:"header",components:[new oy(this.model,this.services,[s,...r?[l]:[]],{direction:W.ROW,alignItems:Y.CENTER})],growth:q.PREFERRED},u={id:"graph-frame",components:e,growth:q.STRETCH,renderType:xu(t,"graphFrameRenderType")||I.SVG},d=!0!==xu(t,"excludeLegend")&&!1!==n.legend.enabled;let h=W.COLUMN;if(d){const e=xu(n,"legend","position");"left"===e?(h=W.ROW,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"right"===e?(h=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=V.VERTICAL)):"bottom"===e&&(h=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new ay(this.model,this.services)],growth:q.PREFERRED},p={id:"full-frame",components:[new oy(this.model,this.services,[...d?[i]:[],...d?[f]:[],u],{direction:h})],growth:q.STRETCH},m=[];if(a||r){m.push(c);const e={id:"spacer",components:[new ay(this.model,this.services,r?{size:15}:void 0)],growth:q.PREFERRED};m.push(e)}return m.push(p),[new vy(this.model,this.services),new sy(this.model,this.services),new oy(this.model,this.services,m,{direction:W.COLUMN})]}}class Iw extends Dw{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:mw,curves:gw,zoom:vw}),this.model=new Td(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),r=xu(n,"zoomBar",P.TOP,"enabled"),i=xu(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),a=xu(n,"axes",o,"scaleType"),s=r&&o===P.BOTTOM&&a===F.TIME,l=this.services.zoom.isZoomBarLocked(P.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new ly(this.model,this.services)],growth:q.STRETCH},d={id:"toolbar",components:[new ry(this.model,this.services)],growth:q.PREFERRED},h={id:"header",components:[new oy(this.model,this.services,[u,...i?[d]:[]],{direction:W.ROW,alignItems:Y.CENTER})],growth:q.PREFERRED},f={id:"legend",components:[new cy(this.model,this.services)],growth:q.PREFERRED};s&&!l&&e.push(new uy(this.model,this.services),new by(this.model,this.services)),e.push(new Ey(this.model,this.services)),e.push(new _y(this.model,this.services));const p={id:"graph-frame",components:e,growth:q.STRETCH,renderType:I.SVG},m=!1!==xu(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const e=xu(this.model.getOptions(),"legend","position");e===U.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=V.VERTICAL)):e===U.BOTTOM&&(g=W.COLUMN_REVERSE)}const v={id:"spacer",components:[new ay(this.model,this.services)],growth:q.PREFERRED},y={id:"full-frame",components:[new oy(this.model,this.services,[...m?[f]:[],...m?[v]:[],p],{direction:g})],growth:q.STRETCH},b={id:"zoom-bar",components:[new wy(this.model,this.services)],growth:q.PREFERRED,renderType:I.SVG},w=[];if(c||i){w.push(h);const e={id:"spacer",components:[new ay(this.model,this.services,i?{size:15}:void 0)],growth:q.PREFERRED};w.push(e)}return s&&w.push(b),w.push(y),[new xy(this.model,this.services),new sy(this.model,this.services),new oy(this.model,this.services,w,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class Lw extends Iw{constructor(e,t){super(e,t),this.model.setOptions(function(e,t){var n;const r=ci(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://charts.carbondesignsystem.com/"),null==n.mapsTo){const e=n.scaleType;null==e?n.mapsTo="value":e===F.TIME?n.mapsTo="date":e===F.LABELS&&(n.mapsTo="key")}}else delete r.axes[e];return _u(r,t),no(r,t)}(bu.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new Ly(this.model,this.services),new Cy(this.model,this.services),new ky(this.model,this.services),new Ny(this.model,this.services),new Ry(this.model,this.services,{handleThresholds:!0}),new By(this.model,this.services),new Py(this.model,this.services)];return this.getAxisChartComponents(e)}}class $w extends r.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",r.createRef())}createChart(e,t,n){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(e){var t,n;this.props.data!==e.data&&(null==(t=this.chart)||t.model.setData(this.props.data)),this.props.options!==e.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return r.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class Pw extends $w{createChart(e,t,n){return new Lw(e,{data:t,options:n})}}var Bw;Bw||(Bw=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}({exports:{}}))}}]);
|