@kenyaemr/esm-patient-clinical-view-app 5.4.2-pre.2539 → 5.4.2-pre.2543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/108.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 108.js.LICENSE.txt */
2
- (globalThis.webpackChunk_kenyaemr_esm_patient_clinical_view_app=globalThis.webpackChunk_kenyaemr_esm_patient_clinical_view_app||[]).push([[108],{195:(e,t,n)=>{var i=n(84882),r=n(98121),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},1386:(e,t,n)=>{var i=n(12393),r=n(62049),a=n(7144),s=n(7452),o=n(13964);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,e.exports=l},1877:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2306:(e,t,n)=>{e=n.nmd(e);var i=n(74967),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,s=a&&a.exports===r&&i.process,o=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=o},3283:(e,t,n)=>{var i=n(56027),r=n(80547),a=Object.prototype,s=a.hasOwnProperty,o=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&s.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},3316:e=>{var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),a=16-(r-i);if(i=r,a>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},3326:(e,t,n)=>{var i=n(65111),r=n(69334),a=n(81586),s=n(93526),o=n(39032),l=n(29259),c=n(41439),u=n(93650),h=c(function(e,t){var n={};if(null==e)return n;var c=!1;t=i(t,function(t){return t=s(t,e),c||(c=t.length>1),t}),o(e,u(e),n),c&&(n=r(n,7,l));for(var h=t.length;h--;)a(n,t[h]);return n});e.exports=h},3334:(e,t,n)=>{var i=n(36526),r=n(12343),a=n(22053),s=n(53142),o=n(43282);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?s(e)?r(e[0],e[1]):i(e):o(e)}},3422:(e,t,n)=>{var i=n(57073),r=n(46285),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];a.call(e,t)&&r(s,n)&&(void 0!==n||t in e)||i(e,t,n)}},3766:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4326:(e,t,n)=>{var i=n(28931),r=n(83417),a=n(82237),s=n(95243);e.exports=function(e){return function(t){t=s(t);var n=r(t)?a(t):void 0,o=n?n[0]:t.charAt(0),l=n?i(n,1).join(""):t.slice(1);return o[e]()+l}}},5485:(e,t,n)=>{var i=n(4326)("toUpperCase");e.exports=i},5681:(e,t,n)=>{var i=n(44700);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},7144:(e,t,n)=>{var i=n(97034);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},7452:(e,t,n)=>{var i=n(97034);e.exports=function(e){return i(this.__data__,e)>-1}},7462:e=>{e.exports=function(e){return this.__data__.has(e)}},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},8666:(e,t,n)=>{var i=n(70674),r=n(49460),a=n(2306),s=a&&a.isTypedArray,o=s?r(s):i;e.exports=o},8870:(e,t,n)=>{var i=n(65650),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,o=i?i.toStringTag:void 0;e.exports=function(e){var t=a.call(e,o),n=e[o];try{e[o]=void 0;var i=!0}catch(e){}var r=s.call(e);return i&&(t?e[o]=n:delete e[o]),r}},10358:(e,t,n)=>{var i=n(26137),r=n(3283),a=n(53142),s=n(75853),o=n(69632),l=n(8666),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&r(e),h=!n&&!u&&s(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?i(e.length,String):[],g=f.length;for(var m in e)!t&&!c.call(e,m)||p&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||o(m,g))||f.push(m);return f}},11112:(e,t,n)=>{var i=n(94497),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},11129:e=>{e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},11895:(e,t,n)=>{"use strict";n.d(t,{MQ:()=>d,aZ:()=>p});var i,r,a,s,o,l,c=n(90380),u=n.n(c),h=n(9247);const d=u().forwardRef(function({children:e,size:t=16,...n},o){return 16===t||"16"===t||"16px"===t?u().createElement(h.A,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},i||(i=u().createElement("path",{d:"M13,14H3c-0.6,0-1-0.4-1-1V3c0-0.6,0.4-1,1-1h5v1H3v10h10V8h1v5C14,13.6,13.6,14,13,14z"})),r||(r=u().createElement("path",{d:"M10 1L10 2 13.3 2 9 6.3 9.7 7 14 2.7 14 6 15 6 15 1z"})),e):u().createElement(h.A,{width:t,height:t,ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},a||(a=u().createElement("path",{d:"M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z"})),s||(s=u().createElement("path",{d:"M20 2L20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"})),e)}),p=u().forwardRef(function({children:e,size:t=16,...n},i){return u().createElement(h.A,{width:t,height:t,ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},o||(o=u().createElement("path",{d:"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z"})),l||(l=u().createElement("path",{d:"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"})),e)})},12343:(e,t,n)=>{var i=n(94687),r=n(46123),a=n(27276),s=n(65187),o=n(67267),l=n(23904),c=n(66040);e.exports=function(e,t){return s(e)&&o(t)?l(c(e),t):function(n){var s=r(n,e);return void 0===s&&s===t?a(n,e):i(t,s,3)}}},12393:e=>{e.exports=function(){this.__data__=[],this.size=0}},12762:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},13398:(e,t,n)=>{var i=n(57923),r=n(73501);e.exports=function(e,t){return t.length<2?e:i(e,r(t,0,-1))}},13964:(e,t,n)=>{var i=n(97034);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},16735:(e,t,n)=>{var i=n(65111),r=n(3334),a=n(35031),s=n(93650);e.exports=function(e,t){if(null==e)return{};var n=i(s(e),function(e){return[e]});return t=r(t),a(e,n,function(e,n){return t(e,n[0])})}},16918:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(30977),r=n.n(i),a=n(95924),s=n.n(a)()(r());s.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-clinical-view__pagination__bodyShort01___cR181,.-esm-patient-clinical-view__pagination__configurableLink___2UaPC{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-clinical-view__pagination__desktop___FKsqU,.-esm-patient-clinical-view__pagination__tablet___BjSxC{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex;justify-content:space-between;color:#525252;background-color:#fff;padding-left:1rem;align-items:center;border-top:1px solid #e0e0e0}.-esm-patient-clinical-view__pagination__desktop___FKsqU .cds--pagination{min-height:0;height:2rem;width:auto;border:none}.-esm-patient-clinical-view__pagination__desktop___FKsqU .cds--pagination .cds--select-input,.-esm-patient-clinical-view__pagination__desktop___FKsqU .cds--pagination .cds--btn,.-esm-patient-clinical-view__pagination__desktop___FKsqU .cds--pagination .cds--pagination__right{min-height:0;height:2rem}.-esm-patient-clinical-view__pagination__tablet___BjSxC .cds--pagination{min-height:0;height:3rem;width:auto;border:none}.-esm-patient-clinical-view__pagination__tablet___BjSxC .cds--pagination .cds--select-input,.-esm-patient-clinical-view__pagination__tablet___BjSxC .cds--pagination .cds--btn,.-esm-patient-clinical-view__pagination__tablet___BjSxC .cds--pagination .cds--pagination__right{min-height:0;height:3rem}.-esm-patient-clinical-view__pagination__configurableLink___2UaPC{text-decoration:none;padding:0 .5rem}.-esm-patient-clinical-view__pagination__pagination___vC\\+hv{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;display:flex}div.-esm-patient-clinical-view__pagination__pagination___vC\\+hv>.cds--pagination__left{display:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/pagination/pagination.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,+HC81BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD11BJ,iHC01BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CDv1BF,YAAA,CACA,6BAAA,CACA,aDNQ,CCOR,qBDXM,CCYN,iBEgBW,CFfX,kBAAA,CACA,4BAAA,CAGF,0EACE,YAAA,CACA,WEmBW,CFlBX,UAAA,CACA,WAAA,CAEA,mRAGE,YAAA,CACA,WEWS,CFPb,yEACE,YAAA,CACA,WEeW,CFdX,UAAA,CACA,WAAA,CAEA,gRAGE,YAAA,CACA,WEOS,CFHb,kEACE,oBAAA,CAEA,eAAA,CAGF,6DC4yBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD1yBF,qBDrDM,CCsDN,aDlDQ,CCmDR,YAAA,CAIA,uFACE,YAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.bodyShort01 {\n @include type.type-style('body-compact-01');\n}\n\n.desktop,\n.tablet {\n @include type.type-style('body-compact-01');\n display: flex;\n justify-content: space-between;\n color: $text-02;\n background-color: $ui-02;\n padding-left: layout.$spacing-05;\n align-items: center;\n border-top: 1px solid $ui-03;\n}\n\n.desktop :global(.cds--pagination) {\n min-height: 0;\n height: layout.$spacing-07;\n width: auto;\n border: none;\n\n & :global(.cds--select-input),\n :global(.cds--btn),\n :global(.cds--pagination__right) {\n min-height: 0;\n height: layout.$spacing-07;\n }\n}\n\n.tablet :global(.cds--pagination) {\n min-height: 0;\n height: layout.$spacing-09;\n width: auto;\n border: none;\n\n & :global(.cds--select-input),\n :global(.cds--btn),\n :global(.cds--pagination__right) {\n min-height: 0;\n height: layout.$spacing-09;\n }\n}\n\n.configurableLink {\n text-decoration: none;\n @extend .bodyShort01;\n padding: 0 layout.$spacing-03;\n}\n\n.pagination {\n @include type.type-style('body-compact-01');\n background-color: $ui-02;\n color: $text-02;\n display: flex;\n}\n\ndiv.pagination {\n & > :global(.cds--pagination__left) {\n display: none;\n }\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),s.locals={bodyShort01:"-esm-patient-clinical-view__pagination__bodyShort01___cR181",configurableLink:"-esm-patient-clinical-view__pagination__configurableLink___2UaPC",desktop:"-esm-patient-clinical-view__pagination__desktop___FKsqU",tablet:"-esm-patient-clinical-view__pagination__tablet___BjSxC",pagination:"-esm-patient-clinical-view__pagination__pagination___vC+hv"};const o=s},17099:(e,t,n)=>{e=n.nmd(e);var i=n(78942),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,s=a&&a.exports===r?i.Buffer:void 0,o=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=o?o(n):new e.constructor(n);return e.copy(i),i}},18069:(e,t,n)=>{var i=n(65650),r=i?i.prototype:void 0,a=r?r.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},19270:(e,t,n)=>{var i=n(94715)(n(78942),"WeakMap");e.exports=i},19770:(e,t,n)=>{var i=n(94715)(n(78942),"Map");e.exports=i},20155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},20714:(e,t,n)=>{var i=n(65650),r=n(3283),a=n(53142),s=i?i.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||r(e)||!!(s&&e&&e[s])}},21779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},22053:e=>{e.exports=function(e){return e}},23212:(e,t,n)=>{var i=n(68250),r=n(1877),a=n(8006);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=a,e.exports=s},23305:(e,t,n)=>{var i=n(94497);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},23904:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},23945:(e,t,n)=>{var i=n(22053),r=n(75234),a=n(80796);e.exports=function(e,t){return a(r(e,t,i),e+"")}},24367:(e,t,n)=>{var i=n(67267),r=n(81211);e.exports=function(e){for(var t=r(e),n=t.length;n--;){var a=t[n],s=e[a];t[n]=[a,s,i(s)]}return t}},24733:(e,t,n)=>{var i=n(39032),r=n(85832);e.exports=function(e,t){return i(e,r(e),t)}},25098:(e,t,n)=>{var i=n(23305),r=n(39361),a=n(11112),s=n(25276),o=n(57452);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,e.exports=l},25276:(e,t,n)=>{var i=n(94497),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},25288:(e,t,n)=>{var i=n(10358),r=n(57200),a=n(36529);e.exports=function(e){return a(e)?i(e,!0):r(e)}},26137:e=>{e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},27276:(e,t,n)=>{var i=n(43636),r=n(85899);e.exports=function(e,t){return null!=e&&r(e,t,i)}},28486:(e,t,n)=>{var i=n(33103),r=n(19770),a=n(89413),s=n(64512),o=n(19270),l=n(87379),c=n(64066),u="[object Map]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=c(i),m=c(r),y=c(a),v=c(s),b=c(o),_=l;(i&&_(new i(new ArrayBuffer(1)))!=f||r&&_(new r)!=u||a&&_(a.resolve())!=h||s&&_(new s)!=d||o&&_(new o)!=p)&&(_=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?c(n):"";if(i)switch(i){case g:return f;case m:return u;case y:return h;case v:return d;case b:return p}return t}),e.exports=_},28931:(e,t,n)=>{var i=n(73501);e.exports=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:i(e,t,n)}},29005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},29259:(e,t,n)=>{var i=n(48360);e.exports=function(e){return i(e)?void 0:e}},30125:(e,t,n)=>{var i=n(39032),r=n(25288);e.exports=function(e,t){return e&&i(t,r(t),e)}},31182:(e,t,n)=>{var i=n(80393),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,s,o){var l=1&n,c=i(e),u=c.length;if(u!=i(t).length&&!l)return!1;for(var h=u;h--;){var d=c[h];if(!(l?d in t:r.call(t,d)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var g=!0;o.set(e,t),o.set(t,e);for(var m=l;++h<u;){var y=e[d=c[h]],v=t[d];if(a)var b=l?a(v,y,d,t,e,o):a(y,v,d,e,t,o);if(!(void 0===b?y===v||s(y,v,n,a,o):b)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return o.delete(e),o.delete(t),g}},31623:(e,t,n)=>{var i=n(78942).Uint8Array;e.exports=i},33103:(e,t,n)=>{var i=n(94715)(n(78942),"DataView");e.exports=i},33934:(e,t,n)=>{var i=n(23212),r=n(36465),a=n(65568);e.exports=function(e,t,n,s,o,l){var c=1&n,u=e.length,h=t.length;if(u!=h&&!(c&&h>u))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var y=e[f],v=t[f];if(s)var b=c?s(v,y,f,t,e,l):s(y,v,f,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!r(t,function(e,t){if(!a(m,t)&&(y===e||o(y,e,n,s,l)))return m.push(t)})){g=!1;break}}else if(y!==v&&!o(y,v,n,s,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},34162:e=>{e.exports=function(e){return this.__data__.get(e)}},34185:(e,t,n)=>{"use strict";n.d(t,{aR:()=>A,K0:()=>M,pp:()=>z,W5:()=>R,U0:()=>K,bo:()=>E,Nk:()=>H,WK:()=>W,WO:()=>B});var i=n(90380),r=n.n(i),a=n(53373),s=n.n(a),o=n(83437),l=n(72591),c=n.n(l),u=n(1740),h=n.n(u),d=n(88128),p=n.n(d),f=n(30855),g=n.n(f),m=n(93051),y=n.n(m),v=n(73656),b=n.n(v),_=n(80231),x={};x.styleTagTransform=b(),x.setAttributes=g(),x.insert=p().bind(null,"head"),x.domAPI=h(),x.insertStyleElement=y(),c()(_.A,x);const w=_.A&&_.A.locals?_.A.locals:void 0;function A(e){var t=e.title,n=e.children,i="tablet"===(0,o.useLayoutType)();return r().createElement("div",{className:s()(i?w.tabletHeader:w.desktopHeader)},r().createElement("h4",null,t),n)}var k=n(8877),$=n(71076),E=function(e){return function(t){var n=t.basePath;return r().createElement(k.BrowserRouter,null,r().createElement($.cJ,{basePath:n,title:e.title,path:e.path,icon:e.icon}))}},T=n(75198),S=n(93150),M=function(e){var t=e.width,n=void 0===t?"64":t,i=e.height,a=void 0===i?"64":i;return r().createElement("svg",{width:n,height:a,viewBox:"0 0 64 64"},r().createElement("title",null,"Empty data illustration"),r().createElement("g",{fill:"none",fillRule:"evenodd"},r().createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#F4F4F4"}),r().createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),r().createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),r().createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),r().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),r().createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#F4F4F4"}),r().createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),r().createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),r().createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),r().createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))},O=n(72828),C={};C.styleTagTransform=b(),C.setAttributes=g(),C.insert=p().bind(null,"head"),C.domAPI=h(),C.insertStyleElement=y(),c()(O.A,C);const D=O.A&&O.A.locals?O.A.locals:void 0;var z=function(e){var t=(0,S.useTranslation)("@openmrs/esm-patient-chart-app").t,n="tablet"===(0,o.useLayoutType)();return r().createElement(T.Layer,{className:D.layer},r().createElement(T.Tile,{className:D.tile},r().createElement("div",{className:n?D.tabletHeading:D.desktopHeading},r().createElement("h4",null,e.headerTitle)),r().createElement(M,null),r().createElement("p",{className:D.content},t("emptyStateText","There are no {{displayText}} to display for this patient",{displayText:e.displayText})),r().createElement("p",{className:D.action},e.launchForm&&r().createElement(T.Button,{onClick:function(){return e.launchForm()},kind:"ghost",size:n?"lg":"sm"},t("record","Record")," ",t(e.displayText)))))},L=n(95324),N={};N.styleTagTransform=b(),N.setAttributes=g(),N.insert=p().bind(null,"head"),N.domAPI=h(),N.insertStyleElement=y(),c()(L.A,N);const I=L.A&&L.A.locals?L.A.locals:void 0;var R=function(e){var t,n,i=e.error,a=e.headerTitle,s=(0,S.useTranslation)("@openmrs/esm-patient-chart-app").t,l="tablet"===(0,o.useLayoutType)();return r().createElement(T.Layer,null,r().createElement(T.Tile,{className:I.tile},r().createElement("div",{className:l?I.tabletHeading:I.desktopHeading},r().createElement("h4",null,a)),r().createElement("p",{className:I.errorMessage},s("error","Error")," ","".concat(null==i||null===(t=i.response)||void 0===t?void 0:t.status,": "),null==i||null===(n=i.response)||void 0===n?void 0:n.statusText),r().createElement("p",{className:I.errorCopy},s("errorCopy","Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above."))))};function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function j(e,t,n,i,r,a,s){try{var o=e[a](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(i,r)}var F="visit";function B(e){var t=(0,o.useConnectivity)(),n=(0,o.useVisit)(e),r=function(e){var t=(a=(0,i.useState)({data:null,error:null,isLoading:!0}),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw r}}return a}}(a,s)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(a,s)||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.")}()),n=t[0],r=t[1];var a,s;return(0,i.useEffect)(function(){(function(e){return(t=function(){return function(e,t){var n,i,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,function(t){switch(t.label){case 0:return[4,(0,o.getSynchronizationItems)(F)];case 1:return[2,t.sent().find(function(t){return t.patient===e})]}})},function(){var e=this,n=arguments;return new Promise(function(i,r){var a=t.apply(e,n);function s(e){j(a,i,r,s,o,"next",e)}function o(e){j(a,i,r,s,o,"throw",e)}s(void 0)})})();var t})(e).then(function(e){r({error:null,data:e?U(e):null,isLoading:!1})}).catch(function(e){r({error:e,data:null,isLoading:!1})})},[e]),{activeVisit:n.data,currentVisit:n.data,isLoading:n.isLoading,isValidating:!1,currentVisitIsRetrospective:!1,error:n.error,mutate:function(){}}}(e);return t?n:r}function U(e){var t,n;return{uuid:e.uuid,startDatetime:null===(t=e.startDatetime)||void 0===t?void 0:t.toString(),stopDatetime:null===(n=e.stopDatetime)||void 0===n?void 0:n.toString(),encounters:[],visitType:{uuid:e.visitType,display:"Offline"},patient:{uuid:e.patient}}}var V=(0,o.createGlobalStore)("patient-chart-global-store",{});function H(){return V.getState().patient}(0,o.createGlobalStore)("order-basket",{items:{},postDataPrepFunctions:{}});var G="@openmrs/esm-patient-chart-app";function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function W(e,t,n,r){var a=(0,S.useTranslation)("@openmrs/esm-patient-chart-app").t;return{pageSizes:(0,i.useMemo)(function(){var n,i=Math.ceil(t/e);return isNaN(i)&&(i=0),(n=Array(i).keys(),function(e){if(Array.isArray(e))return Z(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(t){return(t+1)*e})},[e,t]),itemsDisplayed:(0,i.useMemo)(function(){return a("paginationItemsCount","{{pageItemsCount}} / {{count}} items",{count:t,pageItemsCount:e>t?t:e*n>t?e*(n-1)+r:e*n})},[e,t,n,r,a])}}(0,o.translateFrom)(G,"Routine"),(0,o.translateFrom)(G,"Stat"),(0,o.translateFrom)(G,"On scheduled date");var q=n(16918),Y={};Y.styleTagTransform=b(),Y.setAttributes=g(),Y.insert=p().bind(null,"head"),Y.domAPI=h(),Y.insertStyleElement=y(),c()(q.A,Y);const X=q.A&&q.A.locals?q.A.locals:void 0;var K=function(e){var t=e.totalItems,n=e.pageSize,i=e.onPageNumberChange,a=e.pageNumber,s=e.dashboardLinkUrl,l=e.currentItems,c=e.dashboardLinkLabel,u=(0,S.useTranslation)("@openmrs/esm-patient-chart-app").t,h=W(n,t,a,l),d=h.itemsDisplayed,p=h.pageSizes,f="tablet"===(0,o.useLayoutType)();return r().createElement(r().Fragment,null,t>0&&r().createElement("div",{className:f?X.tablet:X.desktop},r().createElement("div",null,d,s&&r().createElement(o.ConfigurableLink,{to:s,className:X.configurableLink},null!=c?c:u("seeAll","See all"))),r().createElement(T.Pagination,{className:X.pagination,page:a,pageSize:n,pageSizes:p,totalItems:t,onChange:i,pageRangeText:function(e,t){return u("paginationPageText","of {{count}} pages",{count:t})},size:f?"lg":"sm"})))}},34772:e=>{e.exports=function(){return!1}},35031:(e,t,n)=>{var i=n(57923),r=n(87655),a=n(93526);e.exports=function(e,t,n){for(var s=-1,o=t.length,l={};++s<o;){var c=t[s],u=i(e,c);n(u,c)&&r(l,a(c,e),u)}return l}},35636:(e,t,n)=>{var i=n(86596)();e.exports=i},36465:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},36526:(e,t,n)=>{var i=n(38330),r=n(24367),a=n(23904);e.exports=function(e){var t=r(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},36529:(e,t,n)=>{var i=n(93655),r=n(65387);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},37681:(e,t,n)=>{var i=n(80777),r=n(49460),a=n(2306),s=a&&a.isMap,o=s?r(s):i;e.exports=o},37930:(e,t,n)=>{var i=n(39032),r=n(81211);e.exports=function(e,t){return e&&i(t,r(t),e)}},38330:(e,t,n)=>{var i=n(51340),r=n(94687);e.exports=function(e,t,n,a){var s=n.length,o=s,l=!a;if(null==e)return!o;for(e=Object(e);s--;){var c=n[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var u=(c=n[s])[0],h=e[u],d=c[1];if(l&&c[2]){if(void 0===h&&!(u in e))return!1}else{var p=new i;if(a)var f=a(h,d,u,e,t,p);if(!(void 0===f?r(d,h,3,a,p):f))return!1}}return!0}},38546:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},39032:(e,t,n)=>{var i=n(3422),r=n(57073);e.exports=function(e,t,n,a){var s=!n;n||(n={});for(var o=-1,l=t.length;++o<l;){var c=t[o],u=a?a(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?r(n,c,u):i(n,c,u)}return n}},39361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},39747:(e,t,n)=>{var i=n(41580),r=Object.create,a=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},40074:(e,t,n)=>{var i=n(90313),r=n(70310),a=n(23945),s=n(74535),o=a(function(e,t){if(null==e)return[];var n=t.length;return n>1&&s(e,t[0],t[1])?t=[]:n>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),r(e,i(t,1),[])});e.exports=o},41393:(e,t,n)=>{var i=n(84570),r=n(36529);e.exports=function(e,t){var n=-1,a=r(e)?Array(e.length):[];return i(e,function(e,i,r){a[++n]=t(e,i,r)}),a}},41439:(e,t,n)=>{var i=n(75857),r=n(75234),a=n(80796);e.exports=function(e){return a(r(e,void 0,i),e+"")}},41580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},41950:(e,t,n)=>{var i=n(78942)["__core-js_shared__"];e.exports=i},43282:(e,t,n)=>{var i=n(12762),r=n(98880),a=n(65187),s=n(66040);e.exports=function(e){return a(e)?i(s(e)):r(e)}},43636:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},44700:(e,t,n)=>{var i=n(79067);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},45770:(e,t,n)=>{var i=n(36529);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var a=n.length,s=t?a:-1,o=Object(n);(t?s--:++s<a)&&!1!==r(o[s],s,o););return n}}},46123:(e,t,n)=>{var i=n(57923);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},46285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},46775:(e,t,n)=>{var i=n(63521);e.exports=function(e,t,n){for(var r=-1,a=e.criteria,s=t.criteria,o=a.length,l=n.length;++r<o;){var c=i(a[r],s[r]);if(c)return r>=l?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}},47170:(e,t,n)=>{var i=n(35636),r=n(81211);e.exports=function(e,t){return e&&i(e,t,r)}},47403:(e,t,n)=>{var i=n(82619),r=n(72532),a=n(22053),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:a;e.exports=s},48244:(e,t,n)=>{var i=n(11129),r=n(53142);e.exports=function(e,t,n){var a=t(e);return r(e)?a:i(a,n(e))}},48360:(e,t,n)=>{var i=n(87379),r=n(74784),a=n(80547),s=Function.prototype,o=Object.prototype,l=s.toString,c=o.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=i(e))return!1;var t=r(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},49460:e=>{e.exports=function(e){return function(t){return e(t)}}},49753:(e,t,n)=>{var i=n(25098),r=n(1386),a=n(19770);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(a||r),string:new i}}},49828:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},50424:(e,t,n)=>{var i=n(58898),r=n(92480),a=n(78340),s=n(18069),o=n(92264);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return i(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return r(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return a(e);case"[object Symbol]":return s(e)}}},50642:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},51187:(e,t,n)=>{var i=n(87379),r=n(80547);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},51340:(e,t,n)=>{var i=n(1386),r=n(86484),a=n(21779),s=n(34162),o=n(7462),l=n(96638);function c(e){var t=this.__data__=new i(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=a,c.prototype.get=s,c.prototype.has=o,c.prototype.set=l,e.exports=c},51890:(e,t,n)=>{"use strict";n.d(t,{bl:()=>bb});var i=n(90380),r=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(r||{}),a=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(a||{}),s=(e=>(e.UPDATE="model-update",e))(s||{}),o=(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))(o||{}),l=(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))(l||{}),c=(e=>(e.CHANGE="zoom-domain-change",e))(c||{}),u=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(u||{}),h=(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))(h||{}),d=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(d||{}),p=(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))(p||{}),f=(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))(f||{}),g=(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))(g||{}),m=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(m||{}),y=(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))(y||{}),v=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(v||{}),b=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(b||{}),_=(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||{}),w=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(w||{}),A=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(A||{}),k=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(k||{}),$=(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))($||{}),E=(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))(E||{}),T=(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))(T||{}),S=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(S||{}),M=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(M||{}),O=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(O||{});const C=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:T,Area:d,Axis:h,Bar:m,Boxplot:y,CanvasZoom:u,Chart:r,Choropleth:O,CirclePack:E,Gauge:g,Heatmap:M,Legend:$,Line:b,Meter:S,Modal:a,Model:s,Pie:f,Radar:_,Scatter:v,Threshold:k,Toolbar:o,Tooltip:A,Tree:x,Treemap:w,WordCloud:p,ZoomBar:l,ZoomDomain:c},Symbol.toStringTag,{value:"Module"}));var D=(e=>(e.HTML="html",e.SVG="svg",e))(D||{}),z=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(z||{}),L=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(L||{}),N=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(N||{}),I=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(I||{}),R=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(R||{}),P=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(P||{}),j=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(j||{}),F=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(F||{}),B=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(B||{}),U=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(U||{}),V=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(V||{}),H=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(H||{}),G=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(G||{}),Z=(e=>(e.CENTER="center",e))(Z||{}),W=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(W||{}),q=(e=>(e.SEMI="semi",e.FULL="full",e))(q||{}),Y=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Y||{}),X=(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))(X||{}),K=(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))(K||{}),Q=(e=>(e.LEFT="left",e.RIGHT="right",e))(Q||{}),J=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(J||{}),ee=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(ee||{}),te=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(te||{}),ne=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(ne||{}),ie=(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))(ie||{});function re(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function ae(e){return(t,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function se(e){return(t,n={})=>{const i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const s=a[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(o,e=>e.test(s)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(o,e=>e.test(s));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(s.length)}}}const oe=6048e5,le=36e5,ce=Symbol.for("constructDateFrom");function ue(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ce in e?e[ce](t):e instanceof Date?new e.constructor(t):new Date(t)}function he(e,...t){const n=ue.bind(null,t.find(e=>"object"==typeof e));return t.map(n)}let de={};function pe(){return de}function fe(e,t){return ue(t||e,e)}function ge(e,t){const n=pe(),i=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=fe(e,t?.in),a=r.getDay(),s=(a<i?7:0)+a-i;return r.setDate(r.getDate()-s),r.setHours(0,0,0,0),r}const me={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"}},ye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ve={ordinalNumber:(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ae({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ae({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:ae({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:ae({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:ae({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"})},be={ordinalNumber:(xe={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(xe.matchPattern);if(!n)return null;const i=n[0],r=e.match(xe.parsePattern);if(!r)return null;let a=xe.valueCallback?xe.valueCallback(r[0]):r[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(i.length)}}),era:se({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:se({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:se({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:se({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:se({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"})},_e={code:"en-US",formatDistance:(e,t,n)=>{let i;const r=me[e];return i="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:{date:re({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:re({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:re({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,n,i)=>ye[e],localize:ve,match:be,options:{weekStartsOn:0,firstWeekContainsDate:1}};var xe,we="object"==typeof global&&global&&global.Object===Object&&global,Ae="object"==typeof self&&self&&self.Object===Object&&self,ke=we||Ae||Function("return this")(),$e=ke.Symbol,Ee=Object.prototype,Te=Ee.hasOwnProperty,Se=Ee.toString,Me=$e?$e.toStringTag:void 0,Oe=Object.prototype.toString,Ce=$e?$e.toStringTag:void 0;function De(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ce&&Ce in Object(e)?function(e){var t=Te.call(e,Me),n=e[Me];try{e[Me]=void 0;var i=!0}catch{}var r=Se.call(e);return i&&(t?e[Me]=n:delete e[Me]),r}(e):function(e){return Oe.call(e)}(e)}function ze(e){return null!=e&&"object"==typeof e}function Le(e){return"symbol"==typeof e||ze(e)&&"[object Symbol]"==De(e)}function Ne(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var Ie=Array.isArray,Re=$e?$e.prototype:void 0,Pe=Re?Re.toString:void 0;function je(e){if("string"==typeof e)return e;if(Ie(e))return Ne(e,je)+"";if(Le(e))return Pe?Pe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Be(e){return e}function Ue(e){if(!Fe(e))return!1;var t=De(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Ve=ke["__core-js_shared__"],He=function(){var e=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ge=Function.prototype.toString;function Ze(e){if(null!=e){try{return Ge.call(e)}catch{}try{return e+""}catch{}}return""}var We=/^\[object .+?Constructor\]$/,qe=Function.prototype,Ye=Object.prototype,Xe=qe.toString,Ke=Ye.hasOwnProperty,Qe=RegExp("^"+Xe.call(Ke).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Je(e,t){var n=function(e,t){return e?.[t]}(e,t);return function(e){return!(!Fe(e)||function(e){return!!He&&He in e}(e))&&(Ue(e)?Qe:We).test(Ze(e))}(n)?n:void 0}var et=Je(ke,"WeakMap"),tt=Object.create,nt=function(){function e(){}return function(t){if(!Fe(t))return{};if(tt)return tt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function it(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}var rt=Date.now;function at(e){return function(){return e}}var st=function(){try{var e=Je(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ot=st?function(e,t){return st(e,"toString",{configurable:!0,enumerable:!1,value:at(t),writable:!0})}:Be,lt=function(e){var t=0,n=0;return function(){var i=rt(),r=16-(i-n);if(n=i,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ot);function ct(e){return e!=e}function ut(e,t){return!(null==e||!e.length)&&function(e,t){return t==t?function(e,t){for(var n=-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t):function(e,t){for(var n=e.length,i=-1;++i<n;)if(t(e[i],i,e))return i;return-1}(e,ct)}(e,t)>-1}var ht=/^(?:0|[1-9]\d*)$/;function dt(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&ht.test(e))&&e>-1&&e%1==0&&e<t}function pt(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ft(e,t){return e===t||e!=e&&t!=t}var gt=Object.prototype.hasOwnProperty;function mt(e,t,n){var i=e[t];(!gt.call(e,t)||!ft(i,n)||void 0===n&&!(t in e))&&pt(e,t,n)}function yt(e,t,n,i){var r=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;void 0===l&&(l=e[o]),r?pt(n,o,l):mt(n,o,l)}return n}var vt=Math.max;function bt(e,t,n){return t=vt(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,a=vt(i.length-t,0),s=Array(a);++r<a;)s[r]=i[t+r];r=-1;for(var o=Array(t+1);++r<t;)o[r]=i[r];return o[t]=n(s),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,o)}}function _t(e,t){return lt(bt(e,t,Be),e+"")}function xt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function wt(e){return null!=e&&xt(e.length)&&!Ue(e)}var At=Object.prototype;function kt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||At)}function $t(e){return ze(e)&&"[object Arguments]"==De(e)}var Et=Object.prototype,Tt=Et.hasOwnProperty,St=Et.propertyIsEnumerable,Mt=$t(function(){return arguments}())?$t:function(e){return ze(e)&&Tt.call(e,"callee")&&!St.call(e,"callee")},Ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ct=Ot&&"object"==typeof module&&module&&!module.nodeType&&module,Dt=Ct&&Ct.exports===Ot?ke.Buffer:void 0,zt=(Dt?Dt.isBuffer:void 0)||function(){return!1},Lt={};function Nt(e){return function(t){return e(t)}}Lt["[object Float32Array]"]=Lt["[object Float64Array]"]=Lt["[object Int8Array]"]=Lt["[object Int16Array]"]=Lt["[object Int32Array]"]=Lt["[object Uint8Array]"]=Lt["[object Uint8ClampedArray]"]=Lt["[object Uint16Array]"]=Lt["[object Uint32Array]"]=!0,Lt["[object Arguments]"]=Lt["[object Array]"]=Lt["[object ArrayBuffer]"]=Lt["[object Boolean]"]=Lt["[object DataView]"]=Lt["[object Date]"]=Lt["[object Error]"]=Lt["[object Function]"]=Lt["[object Map]"]=Lt["[object Number]"]=Lt["[object Object]"]=Lt["[object RegExp]"]=Lt["[object Set]"]=Lt["[object String]"]=Lt["[object WeakMap]"]=!1;var It="object"==typeof exports&&exports&&!exports.nodeType&&exports,Rt=It&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=Rt&&Rt.exports===It&&we.process,jt=function(){try{return Rt&&Rt.require&&Rt.require("util").types||Pt&&Pt.binding&&Pt.binding("util")}catch{}}(),Ft=jt&&jt.isTypedArray,Bt=Ft?Nt(Ft):function(e){return ze(e)&&xt(e.length)&&!!Lt[De(e)]},Ut=Object.prototype.hasOwnProperty;function Vt(e,t){var n=Ie(e),i=!n&&Mt(e),r=!n&&!i&&zt(e),a=!n&&!i&&!r&&Bt(e),s=n||i||r||a,o=s?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=o.length;for(var c in e)(t||Ut.call(e,c))&&(!s||!("length"==c||r&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||dt(c,l)))&&o.push(c);return o}function Ht(e,t){return function(n){return e(t(n))}}var Gt=Ht(Object.keys,Object),Zt=Object.prototype.hasOwnProperty;function Wt(e){if(!kt(e))return Gt(e);var t=[];for(var n in Object(e))Zt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function qt(e){return wt(e)?Vt(e):Wt(e)}var Yt=Object.prototype.hasOwnProperty;function Xt(e){return wt(e)?Vt(e,!0):function(e){if(!Fe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=kt(e),n=[];for(var i in e)"constructor"==i&&(t||!Yt.call(e,i))||n.push(i);return n}(e)}var Kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qt=/^\w*$/;function Jt(e,t){if(Ie(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Le(e))||Qt.test(e)||!Kt.test(e)||null!=t&&e in Object(t)}var en=Je(Object,"create"),tn=Object.prototype.hasOwnProperty,nn=Object.prototype.hasOwnProperty;function rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function an(e,t){for(var n=e.length;n--;)if(ft(e[n][0],t))return n;return-1}rn.prototype.clear=function(){this.__data__=en?en(null):{},this.size=0},rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},rn.prototype.get=function(e){var t=this.__data__;if(en){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return tn.call(t,e)?t[e]:void 0},rn.prototype.has=function(e){var t=this.__data__;return en?void 0!==t[e]:nn.call(t,e)},rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=en&&void 0===t?"__lodash_hash_undefined__":t,this};var sn=Array.prototype.splice;function on(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}on.prototype.clear=function(){this.__data__=[],this.size=0},on.prototype.delete=function(e){var t=this.__data__,n=an(t,e);return!(n<0||(n==t.length-1?t.pop():sn.call(t,n,1),--this.size,0))},on.prototype.get=function(e){var t=this.__data__,n=an(t,e);return n<0?void 0:t[n][1]},on.prototype.has=function(e){return an(this.__data__,e)>-1},on.prototype.set=function(e,t){var n=this.__data__,i=an(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var ln=Je(ke,"Map");function cn(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 un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function hn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=e.apply(this,i);return n.cache=a.set(r,s)||a,s};return n.cache=new(hn.Cache||un),n}un.prototype.clear=function(){this.size=0,this.__data__={hash:new rn,map:new(ln||on),string:new rn}},un.prototype.delete=function(e){var t=cn(this,e).delete(e);return this.size-=t?1:0,t},un.prototype.get=function(e){return cn(this,e).get(e)},un.prototype.has=function(e){return cn(this,e).has(e)},un.prototype.set=function(e,t){var n=cn(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},hn.Cache=un;var dn,pn,fn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gn=/\\(\\)?/g,mn=(dn=hn(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(fn,function(e,n,i,r){t.push(i?r.replace(gn,"$1"):n||e)}),t},function(e){return 500===pn.size&&pn.clear(),e}),pn=dn.cache,dn);function yn(e){return null==e?"":je(e)}function vn(e,t){return Ie(e)?e:Jt(e,t)?[e]:mn(yn(e))}function bn(e){if("string"==typeof e||Le(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function _n(e,t){for(var n=0,i=(t=vn(t,e)).length;null!=e&&n<i;)e=e[bn(t[n++])];return n&&n==i?e:void 0}function xn(e,t,n){var i=null==e?void 0:_n(e,t);return void 0===i?n:i}function wn(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var An=$e?$e.isConcatSpreadable:void 0;function kn(e){return Ie(e)||Mt(e)||!!(An&&e&&e[An])}function $n(e,t,n,i,r){var a=-1,s=e.length;for(n||(n=kn),r||(r=[]);++a<s;){var o=e[a];t>0&&n(o)?t>1?$n(o,t-1,n,i,r):wn(r,o):i||(r[r.length]=o)}return r}var En=Ht(Object.getPrototypeOf,Object),Tn=Function.prototype,Sn=Object.prototype,Mn=Tn.toString,On=Sn.hasOwnProperty,Cn=Mn.call(Object);function Dn(e){if(!ze(e)||"[object Object]"!=De(e))return!1;var t=En(e);if(null===t)return!0;var n=On.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Mn.call(n)==Cn}function zn(e){var t=this.__data__=new on(e);this.size=t.size}zn.prototype.clear=function(){this.__data__=new on,this.size=0},zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},zn.prototype.get=function(e){return this.__data__.get(e)},zn.prototype.has=function(e){return this.__data__.has(e)},zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof on){var i=n.__data__;if(!ln||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new un(i)}return n.set(e,t),this.size=n.size,this};var Ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,Nn=Ln&&"object"==typeof module&&module&&!module.nodeType&&module,In=Nn&&Nn.exports===Ln?ke.Buffer:void 0,Rn=In?In.allocUnsafe:void 0;function Pn(e,t){if(t)return e.slice();var n=e.length,i=Rn?Rn(n):new e.constructor(n);return e.copy(i),i}function jn(){return[]}var Fn=Object.prototype.propertyIsEnumerable,Bn=Object.getOwnPropertySymbols,Un=Bn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var s=e[n];t(s)&&(a[r++]=s)}return a}(Bn(e),function(t){return Fn.call(e,t)}))}:jn,Vn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)wn(t,Un(e)),e=En(e);return t}:jn;function Hn(e,t,n){var i=t(e);return Ie(e)?i:wn(i,n(e))}function Gn(e){return Hn(e,qt,Un)}function Zn(e){return Hn(e,Xt,Vn)}var Wn=Je(ke,"DataView"),qn=Je(ke,"Promise"),Yn=Je(ke,"Set"),Xn="[object Map]",Kn="[object Promise]",Qn="[object Set]",Jn="[object WeakMap]",ei="[object DataView]",ti=Ze(Wn),ni=Ze(ln),ii=Ze(qn),ri=Ze(Yn),ai=Ze(et),si=De;(Wn&&si(new Wn(new ArrayBuffer(1)))!=ei||ln&&si(new ln)!=Xn||qn&&si(qn.resolve())!=Kn||Yn&&si(new Yn)!=Qn||et&&si(new et)!=Jn)&&(si=function(e){var t=De(e),n="[object Object]"==t?e.constructor:void 0,i=n?Ze(n):"";if(i)switch(i){case ti:return ei;case ni:return Xn;case ii:return Kn;case ri:return Qn;case ai:return Jn}return t});var oi=Object.prototype.hasOwnProperty,li=ke.Uint8Array;function ci(e){var t=new e.constructor(e.byteLength);return new li(t).set(new li(e)),t}var ui=/\w*$/,hi=$e?$e.prototype:void 0,di=hi?hi.valueOf:void 0;function pi(e,t){var n=t?ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function fi(e){return"function"!=typeof e.constructor||kt(e)?{}:nt(En(e))}var gi=jt&&jt.isMap,mi=gi?Nt(gi):function(e){return ze(e)&&"[object Map]"==si(e)},yi=jt&&jt.isSet,vi=yi?Nt(yi):function(e){return ze(e)&&"[object Set]"==si(e)},bi="[object Arguments]",_i="[object Function]",xi="[object Object]",wi={};function Ai(e,t,n,i,r,a){var s,o=1&t,l=2&t,c=4&t;if(n&&(s=r?n(e,i,r,a):n(e)),void 0!==s)return s;if(!Fe(e))return e;var u=Ie(e);if(u){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&oi.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!o)return it(e,s)}else{var h=si(e),d=h==_i||"[object GeneratorFunction]"==h;if(zt(e))return Pn(e,o);if(h==xi||h==bi||d&&!r){if(s=l||d?{}:fi(e),!o)return l?function(e,t){return yt(e,Vn(e),t)}(e,function(e,t){return e&&yt(t,Xt(t),e)}(s,e)):function(e,t){return yt(e,Un(e),t)}(e,function(e,t){return e&&yt(t,qt(t),e)}(s,e))}else{if(!wi[h])return r?e:{};s=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return ci(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?ci(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return pi(e,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,ui.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Symbol]":return function(e){return di?Object(di.call(e)):{}}(e)}}(e,h,o)}}a||(a=new zn);var p=a.get(e);if(p)return p;a.set(e,s),vi(e)?e.forEach(function(i){s.add(Ai(i,t,n,i,e,a))}):mi(e)&&e.forEach(function(i,r){s.set(r,Ai(i,t,n,r,e,a))});var f=u?void 0:(c?l?Zn:Gn:l?Xt:qt)(e);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n););}(f||e,function(i,r){f&&(i=e[r=i]),mt(s,r,Ai(i,t,n,r,e,a))}),s}function ki(e){return Ai(e,5)}function $i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new un;++t<n;)this.add(e[t])}function Ei(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function Ti(e,t){return e.has(t)}function Si(e,t,n,i,r,a){var s=1&n,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,p=2&n?new $i:void 0;for(a.set(e,t),a.set(t,e);++h<o;){var f=e[h],g=t[h];if(i)var m=s?i(g,f,h,t,e,a):i(f,g,h,e,t,a);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!Ei(t,function(e,t){if(!Ti(p,t)&&(f===e||r(f,e,n,i,a)))return p.push(t)})){d=!1;break}}else if(f!==g&&!r(f,g,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Mi(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function Oi(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}wi[bi]=wi["[object Array]"]=wi["[object ArrayBuffer]"]=wi["[object DataView]"]=wi["[object Boolean]"]=wi["[object Date]"]=wi["[object Float32Array]"]=wi["[object Float64Array]"]=wi["[object Int8Array]"]=wi["[object Int16Array]"]=wi["[object Int32Array]"]=wi["[object Map]"]=wi["[object Number]"]=wi[xi]=wi["[object RegExp]"]=wi["[object Set]"]=wi["[object String]"]=wi["[object Symbol]"]=wi["[object Uint8Array]"]=wi["[object Uint8ClampedArray]"]=wi["[object Uint16Array]"]=wi["[object Uint32Array]"]=!0,wi["[object Error]"]=wi[_i]=wi["[object WeakMap]"]=!1,$i.prototype.add=$i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},$i.prototype.has=function(e){return this.__data__.has(e)};var Ci=$e?$e.prototype:void 0,Di=Ci?Ci.valueOf:void 0,zi=Object.prototype.hasOwnProperty,Li="[object Arguments]",Ni="[object Array]",Ii="[object Object]",Ri=Object.prototype.hasOwnProperty;function Pi(e,t,n,i,r){return e===t||(null==e||null==t||!ze(e)&&!ze(t)?e!=e&&t!=t:function(e,t,n,i,r,a){var s=Ie(e),o=Ie(t),l=s?Ni:si(e),c=o?Ni:si(t),u=(l=l==Li?Ii:l)==Ii,h=(c=c==Li?Ii:c)==Ii,d=l==c;if(d&&zt(e)){if(!zt(t))return!1;s=!0,u=!1}if(d&&!u)return a||(a=new zn),s||Bt(e)?Si(e,t,n,i,r,a):function(e,t,n,i,r,a,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new li(e),new li(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ft(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Mi;case"[object Set]":var l=1&i;if(o||(o=Oi),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;i|=2,s.set(e,t);var u=Si(o(e),o(t),i,r,a,s);return s.delete(e),u;case"[object Symbol]":if(Di)return Di.call(e)==Di.call(t)}return!1}(e,t,l,n,i,r,a);if(!(1&n)){var p=u&&Ri.call(e,"__wrapped__"),f=h&&Ri.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return a||(a=new zn),r(g,m,n,i,a)}}return!!d&&(a||(a=new zn),function(e,t,n,i,r,a){var s=1&n,o=Gn(e),l=o.length;if(l!=Gn(t).length&&!s)return!1;for(var c=l;c--;){var u=o[c];if(!(s?u in t:zi.call(t,u)))return!1}var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var f=s;++c<l;){var g=e[u=o[c]],m=t[u];if(i)var y=s?i(m,g,u,t,e,a):i(g,m,u,e,t,a);if(!(void 0===y?g===m||r(g,m,n,i,a):y)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,i,r,a))}(e,t,n,i,Pi,r))}function ji(e){return e==e&&!Fe(e)}function Fi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}function Bi(e,t){return null!=e&&t in Object(e)}function Ui(e){return"function"==typeof e?e:null==e?Be:"object"==typeof e?Ie(e)?function(e,t){return Jt(e)&&ji(t)?Fi(bn(e),t):function(n){var i=xn(n,e);return void 0===i&&i===t?function(e,t){return null!=e&&function(e,t,n){for(var i=-1,r=(t=vn(t,e)).length,a=!1;++i<r;){var s=bn(t[i]);if(!(a=null!=e&&n(e,s)))break;e=e[s]}return a||++i!=r?a:!!(r=null==e?0:e.length)&&xt(r)&&dt(s,r)&&(Ie(e)||Mt(e))}(e,t,Bi)}(n,e):Pi(t,i,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=qt(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ji(r)]}return t}(e);return 1==t.length&&t[0][2]?Fi(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n){var i=n.length,r=i;if(null==e)return!r;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<r;){var s=(a=n[i])[0],o=e[s],l=a[1];if(a[2]){if(void 0===o&&!(s in e))return!1}else if(!Pi(l,o,3,void 0,new zn))return!1}return!0}(n,0,t)}}(e):function(e){return Jt(e)?function(e){return function(t){return t?.[e]}}(bn(e)):function(e){return function(t){return _n(t,e)}}(e)}(e)}var Vi=function(e,t,n){for(var i=-1,r=Object(e),a=n(e),s=a.length;s--;){var o=a[++i];if(!1===t(r[o],o,r))break}return e};function Hi(e,t,n){(void 0!==n&&!ft(e[t],n)||void 0===n&&!(t in e))&&pt(e,t,n)}function Gi(e){return ze(e)&&wt(e)}function Zi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Wi(e,t,n,i,r){e!==t&&Vi(t,function(a,s){if(r||(r=new zn),Fe(a))!function(e,t,n,i,r,a,s){var o=Zi(e,n),l=Zi(t,n),c=s.get(l);if(c)Hi(e,n,c);else{var u=a?a(o,l,n+"",e,t,s):void 0,h=void 0===u;if(h){var d=Ie(l),p=!d&&zt(l),f=!d&&!p&&Bt(l);u=l,d||p||f?Ie(o)?u=o:Gi(o)?u=it(o):p?(h=!1,u=Pn(l,!0)):f?(h=!1,u=pi(l,!0)):u=[]:Dn(l)||Mt(l)?(u=o,Mt(o)?u=function(e){return yt(e,Xt(e))}(o):(!Fe(o)||Ue(o))&&(u=fi(l))):h=!1}h&&(s.set(l,u),r(u,l,i,a,s),s.delete(l)),Hi(e,n,u)}}(e,t,s,n,Wi,i,r);else{var o=i?i(Zi(e,s),a,s+"",e,t,r):void 0;void 0===o&&(o=a),Hi(e,s,o)}},Xt)}function qi(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Yi=Object.prototype.hasOwnProperty;var Xi=function(e){return _t(function(t,n){var i=-1,r=n.length,a=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(r--,a):void 0,s&&function(e,t,n){if(!Fe(n))return!1;var i=typeof t;return!!("number"==i?wt(n)&&dt(t,n.length):"string"==i&&t in n)&&ft(n[t],e)}(n[0],n[1],s)&&(a=r<3?void 0:a,r=1),t=Object(t);++i<r;){var o=n[i];o&&e(t,o,i)}return t})}(function(e,t,n){Wi(e,t,n)}),Ki=Yn&&1/Oi(new Yn([,-0]))[1]==1/0?function(e){return new Yn(e)}:function(){};function Qi(e,t,n){var i=-1,r=ut,a=e.length,s=!0,o=[],l=o;if(a>=200){var c=t?null:Ki(e);if(c)return Oi(c);s=!1,r=Ti,l=new $i}else l=t?[]:o;e:for(;++i<a;){var u=e[i],h=t?t(u):u;if(u=0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),o.push(u)}else r(l,h,n)||(l!==o&&l.push(h),o.push(u))}return o}var Ji=_t(function(e){var t=qi(e);return Gi(t)&&(t=void 0),Qi($n(e,1,Gi,!0),Ui(t))});function er(e){return e&&e.length?Qi(e):[]}function tr(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nr(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ir(e){let t,n,i;function r(e,i,r=0,a=e.length){if(r<a){if(0!==t(i,i))return a;do{const t=r+a>>>1;n(e[t],i)<0?r=t+1:a=t}while(r<a)}return r}return 2!==e.length?(t=tr,n=(t,n)=>tr(e(t),n),i=(t,n)=>e(t)-n):(t=e===tr||e===nr?e:rr,n=e,i=e),{left:r,center:function(e,t,n=0,a=e.length){const s=r(e,t,n,a-1);return s>n&&i(e[s-1],t)>-i(e[s],t)?s-1:s},right:function(e,i,r=0,a=e.length){if(r<a){if(0!==t(i,i))return a;do{const t=r+a>>>1;n(e[t],i)<=0?r=t+1:a=t}while(r<a)}return r}}}function rr(){return 0}const ar=ir(tr).right;function sr(e,t){let n,i;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=i=t):(n>t&&(n=t),i<t&&(i=t)));else{let r=-1;for(let a of e)null!=(a=t(a,++r,e))&&(void 0===n?a>=a&&(n=i=a):(n>a&&(n=a),i<a&&(i=a)))}return[n,i]}ir(function(e){return null===e?NaN:+e}).center;let or=class extends Map{constructor(e,t=cr){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(lr(this,e))}has(e){return super.has(lr(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const i=t(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}(this,e))}};function lr({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function cr(e){return null!==e&&"object"==typeof e?e.valueOf():e}const ur=Math.sqrt(50),hr=Math.sqrt(10),dr=Math.sqrt(2);function pr(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),s=a>=ur?10:a>=hr?5:a>=dr?2:1;let o,l,c;return r<0?(c=Math.pow(10,-r)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,r)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?pr(e,t,2*n):[o,l,c]}function fr(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const i=t<e,[r,a,s]=i?pr(t,e,n):pr(e,t,n);if(!(a>=r))return[];const o=a-r+1,l=new Array(o);if(i)if(s<0)for(let e=0;e<o;++e)l[e]=(a-e)/-s;else for(let e=0;e<o;++e)l[e]=(a-e)*s;else if(s<0)for(let e=0;e<o;++e)l[e]=(r+e)/-s;else for(let e=0;e<o;++e)l[e]=(r+e)*s;return l}function gr(e,t,n){return pr(e=+e,t=+t,n=+n)[2]}function mr(e,t,n){n=+n;const i=(t=+t)<(e=+e),r=i?gr(t,e,n):gr(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}function yr(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 i=-1;for(let r of e)null!=(r=t(r,++i,e))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}var vr={value:()=>{}};function br(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new _r(i)}function _r(e){this._=e}function xr(e,t){for(var n,i=0,r=e.length;i<r;++i)if((n=e[i]).name===t)return n.value}function wr(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=vr,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}_r.prototype=br.prototype={constructor:_r,on:function(e,t){var n,i=this._,r=function(e,t){return e.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");if(i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}(e+"",i),a=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=r[a]).type)i[n]=wr(i[n],e.name,t);else if(null==t)for(n in i)i[n]=wr(i[n],e.name,null);return this}for(;++a<s;)if((n=(e=r[a]).type)&&(n=xr(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new _r(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(i=this._[e]).length;a<n;++a)i[a].value.apply(t,r)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)}};var Ar="http://www.w3.org/1999/xhtml";const kr={svg:"http://www.w3.org/2000/svg",xhtml:Ar,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $r(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),kr.hasOwnProperty(t)?{space:kr[t],local:e}:e}function Er(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ar&&t.documentElement.namespaceURI===Ar?t.createElement(e):t.createElementNS(n,e)}}function Tr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sr(e){var t=$r(e);return(t.local?Tr:Er)(t)}function Mr(){}function Or(e){return null==e?Mr:function(){return this.querySelector(e)}}function Cr(){return[]}function Dr(e){return null==e?Cr:function(){return this.querySelectorAll(e)}}function zr(e){return function(){return this.matches(e)}}function Lr(e){return function(t){return t.matches(e)}}var Nr=Array.prototype.find;function Ir(){return this.firstElementChild}var Rr=Array.prototype.filter;function Pr(){return Array.from(this.children)}function jr(e){return new Array(e.length)}function Fr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Br(e,t,n,i,r,a){for(var s,o=0,l=t.length,c=a.length;o<c;++o)(s=t[o])?(s.__data__=a[o],i[o]=s):n[o]=new Fr(e,a[o]);for(;o<l;++o)(s=t[o])&&(r[o]=s)}function Ur(e,t,n,i,r,a,s){var o,l,c,u=new Map,h=t.length,d=a.length,p=new Array(h);for(o=0;o<h;++o)(l=t[o])&&(p[o]=c=s.call(l,l.__data__,o,t)+"",u.has(c)?r[o]=l:u.set(c,l));for(o=0;o<d;++o)c=s.call(e,a[o],o,a)+"",(l=u.get(c))?(i[o]=l,l.__data__=a[o],u.delete(c)):n[o]=new Fr(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&u.get(p[o])===l&&(r[o]=l)}function Vr(e){return e.__data__}function Hr(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Gr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Zr(e){return function(){this.removeAttribute(e)}}function Wr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qr(e,t){return function(){this.setAttribute(e,t)}}function Yr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xr(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Kr(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 Qr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Jr(e){return function(){this.style.removeProperty(e)}}function ea(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ta(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function na(e,t){return e.style.getPropertyValue(t)||Qr(e).getComputedStyle(e,null).getPropertyValue(t)}function ia(e){return function(){delete this[e]}}function ra(e,t){return function(){this[e]=t}}function aa(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function sa(e){return e.trim().split(/^|\s+/)}function oa(e){return e.classList||new la(e)}function la(e){this._node=e,this._names=sa(e.getAttribute("class")||"")}function ca(e,t){for(var n=oa(e),i=-1,r=t.length;++i<r;)n.add(t[i])}function ua(e,t){for(var n=oa(e),i=-1,r=t.length;++i<r;)n.remove(t[i])}function ha(e){return function(){ca(this,e)}}function da(e){return function(){ua(this,e)}}function pa(e,t){return function(){(t.apply(this,arguments)?ca:ua)(this,e)}}function fa(){this.textContent=""}function ga(e){return function(){this.textContent=e}}function ma(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ya(){this.innerHTML=""}function va(e){return function(){this.innerHTML=e}}function ba(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function _a(){this.nextSibling&&this.parentNode.appendChild(this)}function xa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wa(){return null}function Aa(){var e=this.parentNode;e&&e.removeChild(this)}function ka(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $a(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ea(e){return function(){var t=this.__on;if(t){for(var n,i=0,r=-1,a=t.length;i<a;++i)n=t[i],e.type&&n.type!==e.type||n.name!==e.name?t[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?t.length=r:delete this.__on}}}function Ta(e,t,n){return function(){var i,r=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(r)for(var s=0,o=r.length;s<o;++s)if((i=r[s]).type===e.type&&i.name===e.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),void(i.value=t);this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Sa(e,t,n){var i=Qr(e),r=i.CustomEvent;"function"==typeof r?r=new r(t,n):(r=i.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ma(e,t){return function(){return Sa(this,e,t)}}function Oa(e,t){return function(){return Sa(this,e,t.apply(this,arguments))}}Fr.prototype={constructor:Fr,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)}},la.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 Ca=[null];function Da(e,t){this._groups=e,this._parents=t}function za(){return new Da([[document.documentElement]],Ca)}function La(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 i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}function Na(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ia(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ra(){}Da.prototype=za.prototype={constructor:Da,select:function(e){"function"!=typeof e&&(e=Or(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a,s,o=t[r],l=o.length,c=i[r]=new Array(l),u=0;u<l;++u)(a=o[u])&&(s=e.call(a,a.__data__,u,o))&&("__data__"in a&&(s.__data__=a.__data__),c[u]=s);return new Da(i,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):Dr(e);for(var t=this._groups,n=t.length,i=[],r=[],a=0;a<n;++a)for(var s,o=t[a],l=o.length,c=0;c<l;++c)(s=o[c])&&(i.push(e.call(s,s.__data__,c,o)),r.push(s));return new Da(i,r)},selectChild:function(e){return this.select(null==e?Ir:function(e){return function(){return Nr.call(this.children,e)}}("function"==typeof e?e:Lr(e)))},selectChildren:function(e){return this.selectAll(null==e?Pr:function(e){return function(){return Rr.call(this.children,e)}}("function"==typeof e?e:Lr(e)))},filter:function(e){"function"!=typeof e&&(e=zr(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a,s=t[r],o=s.length,l=i[r]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new Da(i,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Vr);var n=t?Ur:Br,i=this._parents,r=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var a=r.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var u=i[c],h=r[c],d=h.length,p=Hr(e.call(u,u&&u.__data__,c,i)),f=p.length,g=o[c]=new Array(f),m=s[c]=new Array(f);n(u,h,g,m,l[c]=new Array(d),p,t);for(var y,v,b=0,_=0;b<f;++b)if(y=g[b]){for(b>=_&&(_=b+1);!(v=m[_])&&++_<f;);y._next=v||null}}return(s=new Da(s,i))._enter=o,s._exit=l,s},enter:function(){return new Da(this._enter||this._groups.map(jr),this._parents)},exit:function(){return new Da(this._exit||this._groups.map(jr),this._parents)},join:function(e,t,n){var i=this.enter(),r=this,a=this.exit();return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=t&&(r=t(r))&&(r=r.selection()),null==n?a.remove():n(a),i&&r?i.merge(r).order():r},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,r=n.length,a=i.length,s=Math.min(r,a),o=new Array(r),l=0;l<s;++l)for(var c,u=n[l],h=i[l],d=u.length,p=o[l]=new Array(d),f=0;f<d;++f)(c=u[f]||h[f])&&(p[f]=c);for(;l<r;++l)o[l]=n[l];return new Da(o,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i,r=e[t],a=r.length-1,s=r[a];--a>=0;)(i=r[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Gr);for(var n=this._groups,i=n.length,r=new Array(i),a=0;a<i;++a){for(var s,o=n[a],l=o.length,c=r[a]=new Array(l),u=0;u<l;++u)(s=o[u])&&(c[u]=s);c.sort(t)}return new Da(r,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 i=e[t],r=0,a=i.length;r<a;++r){var s=i[r];if(s)return s}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,i=t.length;n<i;++n)for(var r,a=t[n],s=0,o=a.length;s<o;++s)(r=a[s])&&e.call(r,r.__data__,s,a);return this},attr:function(e,t){var n=$r(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==t?n.local?Wr:Zr:"function"==typeof t?n.local?Kr:Xr:n.local?Yr:qr)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Jr:"function"==typeof t?ta:ea)(e,t,n??"")):na(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ia:"function"==typeof t?aa:ra)(e,t)):this.node()[e]},classed:function(e,t){var n=sa(e+"");if(arguments.length<2){for(var i=oa(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof t?pa:t?ha:da)(n,t))},text:function(e){return arguments.length?this.each(null==e?fa:("function"==typeof e?ma:ga)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?ya:("function"==typeof e?ba:va)(e)):this.node().innerHTML},raise:function(){return this.each(_a)},lower:function(){return this.each(xa)},append:function(e){var t="function"==typeof e?e:Sr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:Sr(e),i=null==t?wa:"function"==typeof t?t:Or(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(Aa)},clone:function(e){return this.select(e?$a:ka)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var i,r,a=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),s=a.length;if(!(arguments.length<2)){for(o=t?Ta:Ea,i=0;i<s;++i)this.each(o(a[i],t,n));return this}var o=this.node().__on;if(o)for(var l,c=0,u=o.length;c<u;++c)for(i=0,l=o[c];i<s;++i)if((r=a[i]).type===l.type&&r.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Oa:Ma)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i,r=e[t],a=0,s=r.length;a<s;++a)(i=r[a])&&(yield i)}};var Pa=.7,ja=1/Pa,Fa="\\s*([+-]?\\d+)\\s*",Ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ua="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Va=/^#([0-9a-f]{3,8})$/,Ha=new RegExp(`^rgb\\(${Fa},${Fa},${Fa}\\)$`),Ga=new RegExp(`^rgb\\(${Ua},${Ua},${Ua}\\)$`),Za=new RegExp(`^rgba\\(${Fa},${Fa},${Fa},${Ba}\\)$`),Wa=new RegExp(`^rgba\\(${Ua},${Ua},${Ua},${Ba}\\)$`),qa=new RegExp(`^hsl\\(${Ba},${Ua},${Ua}\\)$`),Ya=new RegExp(`^hsla\\(${Ba},${Ua},${Ua},${Ba}\\)$`),Xa={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 Ka(){return this.rgb().formatHex()}function Qa(){return this.rgb().formatRgb()}function Ja(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Va.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?es(t):3===n?new is(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ts(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ts(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=Ha.exec(e))?new is(t[1],t[2],t[3],1):(t=Ga.exec(e))?new is(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Za.exec(e))?ts(t[1],t[2],t[3],t[4]):(t=Wa.exec(e))?ts(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qa.exec(e))?cs(t[1],t[2]/100,t[3]/100,1):(t=Ya.exec(e))?cs(t[1],t[2]/100,t[3]/100,t[4]):Xa.hasOwnProperty(e)?es(Xa[e]):"transparent"===e?new is(NaN,NaN,NaN,0):null}function es(e){return new is(e>>16&255,e>>8&255,255&e,1)}function ts(e,t,n,i){return i<=0&&(e=t=n=NaN),new is(e,t,n,i)}function ns(e,t,n,i){return 1===arguments.length?function(e){return e instanceof Ra||(e=Ja(e)),e?new is((e=e.rgb()).r,e.g,e.b,e.opacity):new is}(e):new is(e,t,n,i??1)}function is(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function rs(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}`}function as(){const e=ss(this.opacity);return`${1===e?"rgb(":"rgba("}${os(this.r)}, ${os(this.g)}, ${os(this.b)}${1===e?")":`, ${e})`}`}function ss(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function os(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ls(e){return((e=os(e))<16?"0":"")+e.toString(16)}function cs(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hs(e,t,n,i)}function us(e){if(e instanceof hs)return new hs(e.h,e.s,e.l,e.opacity);if(e instanceof Ra||(e=Ja(e)),!e)return new hs;if(e instanceof hs)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,o=a-r,l=(a+r)/2;return o?(s=t===a?(n-i)/o+6*(n<i):n===a?(i-t)/o+2:(t-n)/o+4,o/=l<.5?a+r:2-a-r,s*=60):o=l>0&&l<1?0:s,new hs(s,o,l,e.opacity)}function hs(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function ds(e){return(e=(e||0)%360)<0?e+360:e}function ps(e){return Math.max(0,Math.min(1,e||0))}function fs(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Na(Ra,Ja,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ka,formatHex:Ka,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return us(this).formatHsl()},formatRgb:Qa,toString:Qa}),Na(is,ns,Ia(Ra,{brighter(e){return e=null==e?ja:Math.pow(ja,e),new is(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Pa:Math.pow(Pa,e),new is(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new is(os(this.r),os(this.g),os(this.b),ss(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:rs,formatHex:rs,formatHex8:function(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}${ls(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:as,toString:as})),Na(hs,function(e,t,n,i){return 1===arguments.length?us(e):new hs(e,t,n,i??1)},Ia(Ra,{brighter(e){return e=null==e?ja:Math.pow(ja,e),new hs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Pa:Math.pow(Pa,e),new hs(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new is(fs(e>=240?e-240:e+120,r,i),fs(e,r,i),fs(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new hs(ds(this.h),ps(this.s),ps(this.l),ss(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=ss(this.opacity);return`${1===e?"hsl(":"hsla("}${ds(this.h)}, ${100*ps(this.s)}%, ${100*ps(this.l)}%${1===e?")":`, ${e})`}`}}));const gs=e=>()=>e;function ms(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):gs(isNaN(e)?t:e)}const ys=function e(t){var n=function(e){return 1==(e=+e)?ms: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(i){return Math.pow(e+i*t,n)}}(t,n,e):gs(isNaN(t)?n:t)}}(t);function i(e,t){var i=n((e=ns(e)).r,(t=ns(t)).r),r=n(e.g,t.g),a=n(e.b,t.b),s=ms(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=a(t),e.opacity=s(t),e+""}}return i.gamma=e,i}(1);function vs(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(a){for(n=0;n<i;++n)r[n]=e[n]*(1-a)+t[n]*a;return r}}function bs(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,a=new Array(r),s=new Array(i);for(n=0;n<r;++n)a[n]=Es(e[n],t[n]);for(;n<i;++n)s[n]=t[n];return function(e){for(n=0;n<r;++n)s[n]=a[n](e);return s}}function _s(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function xs(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ws(e,t){var n,i={},r={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?i[n]=Es(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var As=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ks=new RegExp(As.source,"g");function $s(e,t){var n,i,r,a=As.lastIndex=ks.lastIndex=0,s=-1,o=[],l=[];for(e+="",t+="";(n=As.exec(e))&&(i=ks.exec(t));)(r=i.index)>a&&(r=t.slice(a,r),o[s]?o[s]+=r:o[++s]=r),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:xs(n,i)})),a=ks.lastIndex;return a<t.length&&(r=t.slice(a),o[s]?o[s]+=r:o[++s]=r),o.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,i=0;i<t;++i)o[(n=l[i]).i]=n.x(e);return o.join("")})}function Es(e,t){var n,i=typeof t;return null==t||"boolean"===i?gs(t):("number"===i?xs:"string"===i?(n=Ja(t))?(t=n,ys):$s:t instanceof Ja?ys:t instanceof Date?_s:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?vs:Array.isArray(t)?bs:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ws:xs)(e,t)}function Ts(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ss,Ms=180/Math.PI,Os={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cs(e,t,n,i,r,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*i)&&(n-=e*l,i-=t*l),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,l/=o),e*i<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*Ms,skewX:Math.atan(l)*Ms,scaleX:s,scaleY:o}}function Ds(e,t,n,i){function r(e){return e.length?e.pop()+" ":""}return function(a,s){var o=[],l=[];return a=e(a),s=e(s),function(e,i,r,a,s,o){if(e!==r||i!==a){var l=s.push("translate(",null,t,null,n);o.push({i:l-4,x:xs(e,r)},{i:l-2,x:xs(i,a)})}else(r||a)&&s.push("translate("+r+t+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,o,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:xs(e,t)})):t&&n.push(r(n)+"rotate("+t+i)}(a.rotate,s.rotate,o,l),function(e,t,n,a){e!==t?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:xs(e,t)}):t&&n.push(r(n)+"skewX("+t+i)}(a.skewX,s.skewX,o,l),function(e,t,n,i,a,s){if(e!==n||t!==i){var o=a.push(r(a)+"scale(",null,",",null,")");s.push({i:o-4,x:xs(e,n)},{i:o-2,x:xs(t,i)})}else(1!==n||1!==i)&&a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,o,l),a=s=null,function(e){for(var t,n=-1,i=l.length;++n<i;)o[(t=l[n]).i]=t.x(e);return o.join("")}}}var zs,Ls,Ns=Ds(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Os:Cs(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),Is=Ds(function(e){return null!=e&&(Ss||(Ss=document.createElementNS("http://www.w3.org/2000/svg","g")),Ss.setAttribute("transform",e),e=Ss.transform.baseVal.consolidate())?Cs((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Os},", ",")",")"),Rs=0,Ps=0,js=0,Fs=0,Bs=0,Us=0,Vs="object"==typeof performance&&performance.now?performance:Date,Hs="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gs(){return Bs||(Hs(Zs),Bs=Vs.now()+Us)}function Zs(){Bs=0}function Ws(){this._call=this._time=this._next=null}function qs(e,t,n){var i=new Ws;return i.restart(e,t,n),i}function Ys(){Bs=(Fs=Vs.now())+Us,Rs=Ps=0;try{!function(){Gs(),++Rs;for(var e,t=zs;t;)(e=Bs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rs}()}finally{Rs=0,function(){for(var e,t,n=zs,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:zs=t);Ls=e,Ks(i)}(),Bs=0}}function Xs(){var e=Vs.now(),t=e-Fs;t>1e3&&(Us-=t,Fs=e)}function Ks(e){Rs||(Ps&&(Ps=clearTimeout(Ps)),e-Bs>24?(e<1/0&&(Ps=setTimeout(Ys,e-Vs.now()-Us)),js&&(js=clearInterval(js))):(js||(Fs=Vs.now(),js=setInterval(Xs,1e3)),Rs=1,Hs(Ys)))}function Qs(e,t,n){var i=new Ws;return t=null==t?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,n),i}Ws.prototype=qs.prototype={constructor:Ws,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Gs():+n)+(null==t?0:+t),!this._next&&Ls!==this&&(Ls?Ls._next=this:zs=this,Ls=this),this._call=e,this._time=n,Ks()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ks())}};var Js=br("start","end","cancel","interrupt"),eo=[];function to(e,t,n,i,r,a){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var i,r=e.__transition;function a(l){var c,u,h,d;if(1!==n.state)return o();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return Qs(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete r[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete r[c])}if(Qs(function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,i=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=d);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(o),n.state=5,1),a=-1,s=i.length;++a<s;)i[a].call(e,r);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),o())}function o(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}r[t]=n,n.timer=qs(function(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)},0,n.time)}(e,n,{name:t,index:i,group:r,on:Js,tween:eo,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function no(e,t){var n=ro(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function io(e,t){var n=ro(e,t);if(n.state>3)throw new Error("too late; already running");return n}function ro(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ao(e,t){var n,i,r,a=e.__transition,s=!0;if(a){for(r in t=null==t?null:t+"",a)(n=a[r]).name===t?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[r]):s=!1;s&&delete e.__transition}}function so(e,t){var n,i;return function(){var r=io(this,e),a=r.tween;if(a!==n)for(var s=0,o=(i=n=a).length;s<o;++s)if(i[s].name===t){(i=i.slice()).splice(s,1);break}r.tween=i}}function oo(e,t,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=io(this,e),s=a.tween;if(s!==i){r=(i=s).slice();for(var o={name:t,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===t){r[l]=o;break}l===c&&r.push(o)}a.tween=r}}function lo(e,t,n){var i=e._id;return e.each(function(){var e=io(this,i);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return ro(e,i).value[t]}}function co(e,t){var n;return("number"==typeof t?xs:t instanceof Ja?ys:(n=Ja(t))?(t=n,ys):$s)(e,t)}function uo(e){return function(){this.removeAttribute(e)}}function ho(e){return function(){this.removeAttributeNS(e.space,e.local)}}function po(e,t,n){var i,r,a=n+"";return function(){var s=this.getAttribute(e);return s===a?null:s===i?r:r=t(i=s,n)}}function fo(e,t,n){var i,r,a=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===i?r:r=t(i=s,n)}}function go(e,t,n){var i,r,a;return function(){var s,o,l=n(this);return null==l?void this.removeAttribute(e):(s=this.getAttribute(e))===(o=l+"")?null:s===i&&o===r?a:(r=o,a=t(i=s,l))}}function mo(e,t,n){var i,r,a;return function(){var s,o,l=n(this);return null==l?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local))===(o=l+"")?null:s===i&&o===r?a:(r=o,a=t(i=s,l))}}function yo(e,t){var n,i;function r(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,r)),n}return r._value=t,r}function vo(e,t){var n,i;function r(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,r)),n}return r._value=t,r}function bo(e,t){return function(){no(this,e).delay=+t.apply(this,arguments)}}function _o(e,t){return t=+t,function(){no(this,e).delay=t}}function xo(e,t){return function(){io(this,e).duration=+t.apply(this,arguments)}}function wo(e,t){return t=+t,function(){io(this,e).duration=t}}var Ao=za.prototype.constructor;function ko(e){return function(){this.style.removeProperty(e)}}var $o=0;function Eo(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function To(){return++$o}var So=za.prototype;function Mo(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Eo.prototype={constructor:Eo,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Or(e));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var o,l,c=i[s],u=c.length,h=a[s]=new Array(u),d=0;d<u;++d)(o=c[d])&&(l=e.call(o,o.__data__,d,c))&&("__data__"in o&&(l.__data__=o.__data__),h[d]=l,to(h[d],t,n,d,h,ro(o,n)));return new Eo(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Dr(e));for(var i=this._groups,r=i.length,a=[],s=[],o=0;o<r;++o)for(var l,c=i[o],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,p=e.call(l,l.__data__,h,c),f=ro(l,n),g=0,m=p.length;g<m;++g)(d=p[g])&&to(d,t,n,g,p,f);a.push(p),s.push(l)}return new Eo(a,s,t,n)},selectChild:So.selectChild,selectChildren:So.selectChildren,filter:function(e){"function"!=typeof e&&(e=zr(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var a,s=t[r],o=s.length,l=i[r]=[],c=0;c<o;++c)(a=s[c])&&e.call(a,a.__data__,c,s)&&l.push(a);return new Eo(i,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,i=t.length,r=n.length,a=Math.min(i,r),s=new Array(i),o=0;o<a;++o)for(var l,c=t[o],u=n[o],h=c.length,d=s[o]=new Array(h),p=0;p<h;++p)(l=c[p]||u[p])&&(d[p]=l);for(;o<i;++o)s[o]=t[o];return new Eo(s,this._parents,this._name,this._id)},selection:function(){return new Ao(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=To(),i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)if(s=o[c]){var u=ro(s,t);to(s,e,n,c,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Eo(i,this._parents,e,n)},call:So.call,nodes:So.nodes,node:So.node,size:So.size,empty:So.empty,each:So.each,on:function(e,t){var n=this._id;return arguments.length<2?ro(this.node(),n).on.on(e):this.each(function(e,t,n){var i,r,a=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?no:io;return function(){var s=a(this,e),o=s.on;o!==i&&(r=(i=o).copy()).on(t,n),s.on=r}}(n,e,t))},attr:function(e,t){var n=$r(e),i="transform"===n?Is:co;return this.attrTween(e,"function"==typeof t?(n.local?mo:go)(n,i,lo(this,"attr."+e,t)):null==t?(n.local?ho:uo)(n):(n.local?fo:po)(n,i,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 i=$r(e);return this.tween(n,(i.local?yo:vo)(i,t))},style:function(e,t,n){var i="transform"==(e+="")?Ns:co;return null==t?this.styleTween(e,function(e,t){var n,i,r;return function(){var a=na(this,e),s=(this.style.removeProperty(e),na(this,e));return a===s?null:a===n&&s===i?r:r=t(n=a,i=s)}}(e,i)).on("end.style."+e,ko(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var i,r,a;return function(){var s=na(this,e),o=n(this),l=o+"";return null==o&&(this.style.removeProperty(e),l=o=na(this,e)),s===l?null:s===i&&l===r?a:(r=l,a=t(i=s,o))}}(e,i,lo(this,"style."+e,t))).each(function(e,t){var n,i,r,a,s="style."+t,o="end."+s;return function(){var l=io(this,e),c=l.on,u=null==l.value[s]?a||(a=ko(t)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on(o,r=u),l.on=i}}(this._id,e)):this.styleTween(e,function(e,t,n){var i,r,a=n+"";return function(){var s=na(this,e);return s===a?null:s===i?r:r=t(i=s,n)}}(e,i,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,function(e,t,n){var i,r;function a(){var a=t.apply(this,arguments);return a!==r&&(i=(r=a)&&function(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}(e,a,n)),i}return a._value=t,a}(e,t,n??""))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=t??""}}(lo(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 i(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&function(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return i._value=e,i}(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 i,r=ro(this.node(),n).tween,a=0,s=r.length;a<s;++a)if((i=r[a]).name===e)return i.value;return null}return this.each((null==t?so:oo)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?bo:_o)(t,e)):ro(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?xo:wo)(t,e)):ro(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(){io(this,e).ease=t}}(t,e)):ro(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;io(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,i=n._id,r=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){0===--r&&a()}};n.each(function(){var n=io(this,i),r=n.on;r!==e&&((t=(e=r).copy())._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),n.on=t}),0===r&&a()})},[Symbol.iterator]:So[Symbol.iterator]};var Oo={time:null,delay:0,duration:250,ease:Mo};function Co(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 Do(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function zo(e){return(e=Do(Math.abs(e)))?e[1]:NaN}za.prototype.interrupt=function(e){return this.each(function(){ao(this,e)})},za.prototype.transition=function(e){var t,n;e instanceof Eo?(t=e._id,e=e._name):(t=To(),(n=Oo).time=Gs(),e=null==e?null:e+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var s,o=i[a],l=o.length,c=0;c<l;++c)(s=o[c])&&to(s,e,t,c,o,n||Co(s,t));return new Eo(i,this._parents,e,t)};var Lo,No=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Io(e){if(!(t=No.exec(e)))throw new Error("invalid format: "+e);var t;return new Ro({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 Ro(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 Po(e,t){var n=Do(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Io.prototype=Ro.prototype,Ro.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 jo={"%":(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)=>Po(100*e,t),r:Po,s:function(e,t){var n=Do(e,t);if(!n)return e+"";var i=n[0],r=n[1],a=r-(Lo=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Do(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Fo(e){return e}var Bo,Uo,Vo,Ho=Array.prototype.map,Go=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zo(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}Bo=function(e){var t=void 0===e.grouping||void 0===e.thousands?Fo:function(e,t){return function(n,i){for(var r=n.length,a=[],s=0,o=e[0],l=0;r>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),a.push(n.substring(r-=o,r+o)),!((l+=o+1)>i));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}(Ho.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?Fo:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Ho.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",o=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Io(e)).fill,u=e.align,h=e.sign,d=e.symbol,p=e.zero,f=e.width,g=e.comma,m=e.precision,y=e.trim,v=e.type;"n"===v?(g=!0,v="g"):jo[v]||(void 0===m&&(m=12),y=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===d?i:/[%p]/.test(v)?s:"",x=jo[v],w=/[defgprs%]/.test(v);function A(e){var n,i,s,d=b,A=_;if("c"===v)A=x(e)+A,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:x(Math.abs(e),m),y&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),d=(k?"("===h?h:o:"-"===h||"("===h?"":h)+d,A=("s"===v?Go[8+Lo/3]:"")+A+(k&&"("===h?")":""),w)for(n=-1,i=e.length;++n<i;)if(48>(s=e.charCodeAt(n))||s>57){A=(46===s?r+e.slice(n+1):e.slice(n))+A,e=e.slice(0,n);break}}g&&!p&&(e=t(e,1/0));var $=d.length+e.length+A.length,E=$<f?new Array(f-$+1).join(c):"";switch(g&&p&&(e=t(E+e,E.length?f-A.length:1/0),E=""),u){case"<":e=d+e+A+E;break;case"=":e=d+E+e+A;break;case"^":e=E.slice(0,$=E.length>>1)+d+e+A+E.slice($);break;default:e=E+d+e+A}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),A.toString=function(){return e+""},A}return{format:c,formatPrefix:function(e,t){var n=c(((e=Io(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(zo(t)/3))),r=Math.pow(10,-i),a=Go[8+i/3];return function(e){return n(r*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Uo=Bo.format,Vo=Bo.formatPrefix;const Wo=Symbol("implicit");function qo(){var e=new or,t=[],n=[],i=Wo;function r(r){let a=e.get(r);if(void 0===a){if(i!==Wo)return i;e.set(r,a=t.push(r)-1)}return n[a%n.length]}return r.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new or;for(const i of n)e.has(i)||e.set(i,t.push(i)-1);return r},r.range=function(e){return arguments.length?(n=Array.from(e),r):n.slice()},r.unknown=function(e){return arguments.length?(i=e,r):i},r.copy=function(){return qo(t,n).unknown(i)},Zo.apply(r,arguments),r}function Yo(e){return+e}var Xo=[0,1];function Ko(e){return e}function Qo(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Jo(e,t,n){var i=e[0],r=e[1],a=t[0],s=t[1];return r<i?(i=Qo(r,i),a=n(s,a)):(i=Qo(i,r),a=n(a,s)),function(e){return a(i(e))}}function el(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=Qo(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(t){var n=ar(e,t,1,i)-1;return a[n](r[n](t))}}function tl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function nl(){var e,t,n,i,r,a,s=Xo,o=Xo,l=Es,c=Ko;function u(){var e=Math.min(s.length,o.length);return c!==Ko&&(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))}}(s[0],s[e-1])),i=e>2?el:Jo,r=a=null,h}function h(t){return null==t||isNaN(t=+t)?n:(r||(r=i(s.map(e),o,l)))(e(c(t)))}return h.invert=function(n){return c(t((a||(a=i(o,s.map(e),xs)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,Yo),u()):s.slice()},h.range=function(e){return arguments.length?(o=Array.from(e),u()):o.slice()},h.rangeRound=function(e){return o=Array.from(e),l=Ts,u()},h.clamp=function(e){return arguments.length?(c=!!e||Ko,u()):c!==Ko},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,i){return e=n,t=i,u()}}function il(){return nl()(Ko,Ko)}function rl(e){var t=e.domain;return e.ticks=function(e){var n=t();return fr(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var i=t();return function(e,t,n,i){var r,a=mr(e,t,n);switch((i=Io(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null==i.precision&&!isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zo(t)/3)))-zo(Math.abs(e)))}(a,s))&&(i.precision=r),Vo(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zo(t)-zo(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=r-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(r=function(e){return Math.max(0,-zo(Math.abs(e)))}(a))&&(i.precision=r-2*("%"===i.type))}return Uo(i)}(i[0],i[i.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var i,r,a=t(),s=0,o=a.length-1,l=a[s],c=a[o],u=10;for(c<l&&(r=l,l=c,c=r,r=s,s=o,o=r);u-- >0;){if((r=gr(l,c,n))===i)return a[s]=l,a[o]=c,t(a);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return e},e}function al(){var e=il();return e.copy=function(){return tl(e,al())},Zo.apply(e,arguments),rl(e)}function sl(e,t,n){this.k=e,this.x=t,this.y=n}sl.prototype={constructor:sl,scale:function(e){return 1===e?this:new sl(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new sl(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+")"}},sl.prototype;const ol="cds",ll=7,cl=2.5,ul=3.5,hl={reference:"value",compareTo:"marker"},dl=4,pl={duration:1e3,ease:Mo,zoomLevel:3},fl={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},gl={defaultBins:10},ml={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}},yl=.3,vl=1,bl=24,_l={defaultOffset:4,horizontalOffset:10},xl={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}},wl={height:{[I.GRAPH_VIEW]:32,[I.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Al=[{type:J.RADIUS,name:"Radius"},{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}],kl={type:R.END_LINE,threshold:16,numCharacter:14},$l={code:typeof navigator<"u"&&navigator?.language||"en-US",number:(e,t=navigator?.language||"en-US")=>e?.toLocaleString?.(t),date:(e,t=navigator?.language||"en-US",n={},i=null)=>i||e.toLocaleDateString(t,n),time:(e,t=navigator?.language||"en-US",n={},i=null)=>i||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"}}},El={enabled:!0,position:F.BOTTOM,clickable:!0,truncation:kl,alignment:B.LEFT,order:null,additionalItems:[]},Tl={enabled:!0,showTotal:!0,truncation:kl,groupLabel:"Group"},Sl={top:{visible:!0,includeZero:!0,truncation:kl},bottom:{visible:!0,includeZero:!0,truncation:kl},left:{visible:!0,includeZero:!0,truncation:kl},right:{visible:!0,includeZero:!0,truncation:kl}},Ml={addSpaceOnEdges:1,showDayName:!1,localeObject:_e,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 Ol=!1;try{Ol=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(xe){console.warn("Fullscreen capabilities check failed: ",xe.message)}const Cl={width:null,height:null,resizable:!0,theme:z.WHITE,tooltip:Tl,legend:El,locale:$l,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:K.SHOW_AS_DATATABLE},...Ol?[{type:K.MAKE_FULLSCREEN}]:[],{type:K.EXPORT_CSV},{type:K.EXPORT_PNG},{type:K.EXPORT_JPG}]}},Dl=Xi({},Cl,{thematic:{projection:ne.geoNaturalEarth1}}),zl=Xi({},Cl,{axes:Sl,timeScale:Ml,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:I.GRAPH_VIEW}}}),Ll=Xi({},zl,{bars:{maxWidth:16,spacingFactor:.25},timeScale:Xi(Ml,{addSpaceOnEdges:1})}),Nl=Xi({},Ll,{}),Il=Xi({},Ll,{}),Rl=Xi({},Ll,{bars:Xi({},Ll.bars,{dividerSize:1.5})}),Pl=Xi({},Ll,{}),jl=Xi({},zl,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Fl=jl,Bl=Xi({},jl,{points:{radius:3,filled:!1,enabled:!0}}),Ul=Xi({},Bl,{timeScale:Xi(Ml,{addSpaceOnEdges:0})}),Vl=Ul,Hl=Xi({},zl,{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:J.RADIUS,name:"Radius"}]}}),Gl=Xi({},zl,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:J.AREA,name:"Poor area"},{type:J.AREA,name:"Satisfactory area"},{type:J.AREA,name:"Great area"},{type:J.QUARTILE,name:"Quartiles"}]}}),Zl=Xi({},Ll,{bars:{dividerSize:1.5},timeScale:Xi(Ml,{addSpaceOnEdges:0})}),Wl=Xi({},Cl,{tooltip:Xi({},Tl,{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"}}),ql=Xi({},Cl,{pie:{labels:{formatter:null,enabled:!0},alignment:B.LEFT,sortFunction:null,valueMapsTo:"value"}}),Yl=Xi({},Cl,{legend:{enabled:!1},gauge:{type:q.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:B.LEFT}}),Xl=Xi({},ql,{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:B.LEFT}}),Kl=Xi({},Cl,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Ql=Xi({},Kl,{legend:{enabled:!0}}),Jl=Xi({},Cl,{radar:{axes:{angle:"key",value:"value"},alignment:B.LEFT},tooltip:{gridline:{enabled:!0}}}),ec=Xi({},Ll,{comboChartTypes:[]}),tc=Xi({tree:{type:V.TREE}},Cl,{}),nc=Xi({},Cl,{data:Xi(Cl.data,{groupMapsTo:"name"})}),ic=Xi({},Cl,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:Xi(Cl.data,{groupMapsTo:"name"})}),rc=Xi({},Cl,{alluvial:{data:Xi(Cl.data,{groupMapsTo:"source"}),nodeAlignment:B.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),ac=Xi({},Cl,{axes:Sl,heatmap:{divider:{state:ee.AUTO},colorLegend:{type:"linear"}}}),sc={alluvialChart:rc,areaChart:Ul,axisChart:zl,boxplotChart:Pl,bubbleChart:Hl,bulletChart:Gl,chart:Cl,circlePackChart:ic,choroplethChart:Xi({},Dl,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:ec,donutChart:Xl,gaugeChart:Yl,groupedBarChart:Il,heatmapChart:ac,histogramChart:Zl,lineChart:Bl,lollipopChart:Fl,meterChart:Kl,pieChart:ql,proportionalMeterChart:Ql,radarChart:Jl,scatterChart:jl,simpleBarChart:Nl,stackedAreaChart:Vl,stackedBarChart:Rl,thematicChart:Dl,treeChart:tc,treemapChart:nc,wordCloudChart:Wl};function oc(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 lc(e,t,n){return n>e.length?e:t===R.MID_LINE?e.substr(0,n/2)+"..."+e.substr(-n/2):t===R.FRONT_LINE?"..."+e.substr(-n):t===R.END_LINE?e.substr(0,n)+"...":void 0}function cc(e,t){const n=uc(e,"legend","additionalItems"),i=uc(t,"legend","additionalItems");if(n&&i){const r=i.map(e=>e.type),a=n.map(e=>e.type),s=Al.filter(e=>a.includes(e.type)&&!r.includes(e.type));e.legend.additionalItems=s,t.legend.additionalItems=Ji(s,i,"name")}}const uc=(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},hc=(e,t)=>t===P.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e;function dc(e,t,n){return n===P.VERTICAL?[e,t]:[t,e]}function pc(e){const t=fe(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 fc(e,t){const n=fe(e,t?.in);return n.setHours(0,0,0,0),n}function gc(e,t,n){const[i,r]=he(0,e,t),a=fc(i),s=fc(r),o=+a-pc(a),l=+s-pc(s);return Math.round((o-l)/864e5)}function mc(e,t){return ge(e,{...t,weekStartsOn:1})}function yc(e,t){const n=fe(e,t?.in),i=n.getFullYear(),r=ue(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const a=mc(r),s=ue(n,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);const o=mc(s);return n.getTime()>=a.getTime()?i+1:n.getTime()>=o.getTime()?i:i-1}function vc(e,t){const n=fe(e,t?.in),i=n.getFullYear(),r=pe(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=ue(t?.in||e,0);s.setFullYear(i+1,0,a),s.setHours(0,0,0,0);const o=ge(s,t),l=ue(t?.in||e,0);l.setFullYear(i,0,a),l.setHours(0,0,0,0);const c=ge(l,t);return+n>=+o?i+1:+n>=+c?i:i-1}function bc(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _c={y(e,t){const n=e.getFullYear(),i=n>0?n:1-n;return bc("yy"===t?i%100:i,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):bc(n+1,2)},d:(e,t)=>bc(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)=>bc(e.getHours()%12||12,t.length),H:(e,t)=>bc(e.getHours(),t.length),m:(e,t)=>bc(e.getMinutes(),t.length),s:(e,t)=>bc(e.getSeconds(),t.length),S(e,t){const n=t.length,i=e.getMilliseconds();return bc(Math.trunc(i*Math.pow(10,n-3)),t.length)}},xc={G:function(e,t,n){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),i=t>0?t:1-t;return n.ordinalNumber(i,{unit:"year"})}return _c.y(e,t)},Y:function(e,t,n,i){const r=vc(e,i),a=r>0?r:1-r;return"YY"===t?bc(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):bc(a,t.length)},R:function(e,t){return bc(yc(e),t.length)},u:function(e,t){return bc(e.getFullYear(),t.length)},Q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return bc(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return bc(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){const i=e.getMonth();switch(t){case"M":case"MM":return _c.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return bc(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){const r=function(e,t){const n=fe(e,t?.in),i=+ge(n,t)-+function(e,t){const n=pe(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=vc(e,t),a=ue(t?.in||e,0);return a.setFullYear(r,0,i),a.setHours(0,0,0,0),ge(a,t)}(n,t);return Math.round(i/oe)+1}(e,i);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):bc(r,t.length)},I:function(e,t,n){const i=function(e,t){const n=fe(e,t?.in),i=+mc(n)-+function(e){const t=yc(e,void 0),n=ue(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mc(n)}(n);return Math.round(i/oe)+1}(e);return"Io"===t?n.ordinalNumber(i,{unit:"week"}):bc(i,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):_c.d(e,t)},D:function(e,t,n){const i=function(e,t){const n=fe(e,t?.in);return gc(n,function(e){const t=fe(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(n))+1}(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):bc(i,t.length)},E:function(e,t,n){const i=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return bc(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});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"})}},c:function(e,t,n,i){const r=e.getDay(),a=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return bc(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const i=e.getDay(),r=0===i?7:i;switch(t){case"i":return String(r);case"ii":return bc(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const i=e.getHours();let r;switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const i=e.getHours();let r;switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return _c.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):_c.H(e,t)},K:function(e,t,n){const i=e.getHours()%12;return"Ko"===t?n.ordinalNumber(i,{unit:"hour"}):bc(i,t.length)},k:function(e,t,n){let i=e.getHours();return 0===i&&(i=24),"ko"===t?n.ordinalNumber(i,{unit:"hour"}):bc(i,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_c.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_c.s(e,t)},S:function(e,t){return _c.S(e,t)},X:function(e,t,n){const i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Ac(i);case"XXXX":case"XX":return kc(i);default:return kc(i,":")}},x:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"x":return Ac(i);case"xxxx":case"xx":return kc(i);default:return kc(i,":")}},O:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wc(i,":");default:return"GMT"+kc(i,":")}},z:function(e,t,n){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wc(i,":");default:return"GMT"+kc(i,":")}},t:function(e,t,n){return bc(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return bc(+e,t.length)}};function wc(e,t=""){const n=e>0?"-":"+",i=Math.abs(e),r=Math.trunc(i/60),a=i%60;return 0===a?n+String(r):n+String(r)+t+bc(a,2)}function Ac(e,t){return e%60==0?(e>0?"-":"+")+bc(Math.abs(e)/60,2):kc(e,t)}function kc(e,t=""){const n=e>0?"-":"+",i=Math.abs(e);return n+bc(Math.trunc(i/60),2)+t+bc(i%60,2)}const $c=(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"})}},Ec=(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"})}},Tc={p:Ec,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return $c(e,t);let a;switch(i){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",$c(i,t)).replace("{{time}}",Ec(r,t))}},Sc=/^D+$/,Mc=/^Y+$/,Oc=["D","DD","YY","YYYY"];const Cc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zc=/^'([^]*?)'?$/,Lc=/''/g,Nc=/[a-zA-Z]/;function Ic(e,t,n){const i=pe(),r=n?.locale??i.locale??_e,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=fe(e,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(+fe(e)))}(o))throw new RangeError("Invalid time value");let l=t.match(Dc).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,Tc[t])(e,r.formatLong):e}).join("").match(Cc).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Rc(e)};if(xc[t])return{isToken:!0,value:e};if(t.match(Nc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(l=r.localize.preprocessor(o,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:r};return l.map(i=>{if(!i.isToken)return i.value;const a=i.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return Mc.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Sc.test(e)}(a))&&function(e,t,n){const i=function(e,t,n){const i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(i),Oc.includes(e))throw new RangeError(i)}(a,t,String(e)),(0,xc[a[0]])(o,a,r.localize,c)}).join("")}function Rc(e){const t=e.match(zc);return t?t[1].replace(Lc,"'"):e}const Pc=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function jc(e,t,n,i,r){const a=0===t,s=2===Number(Ic(new Date(e),"c")),o=1===Number(Ic(new Date(e),"q")),l=0!==t?n[t-1]:null;switch(i){case"15seconds":case"minute":case"30minutes":case"hourly":return a||function(e){const{s:t,m:n,H:i}=Bc(e);return 0===i&&0===n&&0===t}(e)||Vc(e,l)||Hc(e);case"daily":return r?a||s||Hc(e):a||Vc(e,l)||Hc(e);case"weekly":return a||s||Hc(e);case"monthly":return a||Hc(e);case"quarterly":return a||o;case"yearly":return!1;default:throw new Error(`${i} is not a valid time interval.`)}}function Fc(e,t,n,i,r,a){const s=r.showDayName,o="daily"===i&&s?"weekly":i,l=new Date(e),c=uc(r,"timeIntervalFormats")[o],u=uc(c,"primary"),h=uc(c,"secondary"),d=jc(e,t,n,i,s);let p=d?u:h;"15seconds"===i&&0!==l.getMilliseconds()&&(p=p.replace("pp","h:mm:ss.SSS a"));const f=r.localeObject,{code:g,optionsObject:m}=a,y=m[i].type,v=m[i][d?"primary":"secondary"][p];if("quarterly"!==i&&v)return a[y](l,g,v);{const e=Ic(l,p,{locale:f}).split("").map(e=>{const t=Number(e);return" "===e||Number.isNaN(t)?e:t?.toLocaleString?.(g)});return a[y](l,g,{},e.join(""))}}function Bc(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function Uc(e,t){if(ie[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=Pc.reduce((t,[,n],i)=>{const r=Pc[t][1];return Math.abs(r-e)<Math.abs(n-e)?t:i},0);return Pc[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 Vc(e,t){return Bc(e).M!==Bc(t).M}function Hc(e){const{M:t,d:n,s:i,m:r,H:a}=Bc(e);return 1===t&&1===n&&0===a&&0===r&&0===i}function Gc(e){return void 0===e?"":e.toISOString()}var Zc=(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))(Zc||{}),Wc=function(e,t){if(null==e)return e;if(!wt(e))return function(e,t){return e&&Vi(e,t,qt)}(e,t);for(var n=e.length,i=-1,r=Object(e);++i<n&&!1!==t(r[i],i,r););return e};function qc(e){return function(){return e}}function Yc(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Xc(e,t,n,i){for(var r=-1,a=null==e?0:e.length;++r<a;){var s=e[r];t(i,s,n(s),e)}return i}function Kc(e,t,n,i){return Wc(e,function(e,r,a){t(i,e,n(e),a)}),i}Array.prototype.slice;var Qc=Object.prototype.hasOwnProperty,Jc=function(e){return function(t,n){return(Ie(t)?Xc:Kc)(t,e,Ui(n),{})}}(function(e,t,n){Qc.call(e,n)?e[n].push(t):pt(e,n,[t])});function eu(e){return e}var tu=Array.prototype.slice;function nu(e){return()=>e}function iu(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 ru(e,t){if((r=e.length)>1)for(var n,i,r,a=1,s=e[t[0]],o=s.length;a<r;++a)for(i=s,s=e[t[a]],n=0;n<o;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function au(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function su(e,t){return e[t]}function ou(e){const t=[];return t.key=e,t}function lu(){var e=qc([]),t=au,n=ru,i=su;function r(r){var a,s,o=Array.from(e.apply(this,arguments),ou),l=o.length,c=-1;for(const e of r)for(a=0,++c;a<l;++a)(o[a][c]=[0,+i(e,o[a].key,c,r)]).data=e;for(a=0,s=Yc(t(o));a<l;++a)o[s[a]].index=a;return n(o,s),o}return r.keys=function(t){return arguments.length?(e="function"==typeof t?t:qc(Array.from(t)),r):e},r.value=function(e){return arguments.length?(i="function"==typeof e?e:qc(+e),r):i},r.order=function(e){return arguments.length?(t=null==e?au:"function"==typeof e?e:qc(Array.from(e)),r):t},r.offset=function(e){return arguments.length?(n=e??ru,r):n},r}function cu(e,t){if((o=e.length)>0)for(var n,i,r,a,s,o,l=0,c=e[t[0]].length;l<c;++l)for(a=s=0,n=0;n<o;++n)(r=(i=e[t[n]][l])[1]-i[0])>0?(i[0]=a,i[1]=a+=r):r<0?(i[1]=s,i[0]=s+=r):(i[0]=0,i[1]=r)}class uu{constructor(e){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=e}formatTable({headers:e,cells:t}){const n=this.getOptions(),{code:i,date:r,number:a}=uc(n,"locale"),s=uc(n,"tabularRepModal","tableHeadingFormatter"),o=uc(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services,c=l?.getDomainAxisScaleType();let u;return c===j.TIME&&(u=e=>r(e,i,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof s?s(e):e,..."function"==typeof o?o(t):t.map(e=>{u&&(e[1]=u(e[1]));for(const t in e){const n=e[t];"number"==typeof n&&(e[t]=a(n,i))}return e})]}getAllDataFromDomain(e){if(!this.getData())return null;const t=this.getOptions();let n=this.getData();const i=this.getDataGroups(),{groupMapsTo:r}=uc(t,"data"),a=uc(t,"axes");return e&&(n=n.filter(t=>e.includes(t[r]))),a&&Object.keys(a).forEach(e=>{const t=a[e].mapsTo,i=a[e].scaleType;if((i===j.LINEAR||i===j.LOG)&&(n=n.map(e=>({...e,[t]:null===e[t]?e[t]:Number(e[t])}))),t&&a[e].domain)if(i===j.LABELS)n=n.filter(n=>a[e].domain.includes(n[t]));else{const[i,r]=a[e].domain;n=n.filter(e=>!(t in e)||e[t]>=i&&e[t]<=r)}}),n.filter(e=>i.find(t=>t.name===e[r]))}getDisplayData(e){if(!this.get("data"))return null;const{ACTIVE:t}=ml.items.status,n=this.getDataGroups(e),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(e).filter(e=>n.find(n=>n.name===e[i]&&n.status===t))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(e){const t=this.sanitize(ki(e)),n=this.generateDataGroups(t);return this.set({data:t,dataGroups:n}),t}getDataGroups(e){return uc(this.getOptions(),"data","loading")?[]:e?this.get("dataGroups").filter(t=>e.includes(t.name)):this.get("dataGroups")}getActiveDataGroups(e){const{ACTIVE:t}=ml.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 Jc(e,"group")}getBinConfigurations(){const e=this.getDisplayData(),t=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),r=t.axes[n],{groupMapsTo:a}=t.data,{bins:s=gl.defaultBins}=r,o=Array.isArray(s),l=function(){var e=eu,t=sr,n=iu;function i(i){Array.isArray(i)||(i=Array.from(i));var r,a,s,o=i.length,l=new Array(o);for(r=0;r<o;++r)l[r]=e(i[r],r,i);var c=t(l),u=c[0],h=c[1],d=n(l,u,h);if(!Array.isArray(d)){const e=h,n=+d;if(t===sr&&([u,h]=function(e,t,n){let i;for(;;){const r=gr(e,t,n);if(r===i||0===r||!isFinite(r))return[e,t];r>0?(e=Math.floor(e/r)*r,t=Math.ceil(t/r)*r):r<0&&(e=Math.ceil(e*r)/r,t=Math.floor(t*r)/r),i=r}}(u,h,n)),(d=fr(u,h,n))[0]<=u&&(s=gr(u,h,n)),d[d.length-1]>=h)if(e>=h&&t===sr){const e=gr(u,h,n);isFinite(e)&&(e>0?h=(Math.floor(h/e)+1)*e:e<0&&(h=(Math.ceil(h*-e)+1)/-e))}else d.pop()}for(var p=d.length,f=0,g=p;d[f]<=u;)++f;for(;d[g-1]>h;)--g;(f||g<p)&&(d=d.slice(f,g),p=g-f);var m,y=new Array(p+1);for(r=0;r<=p;++r)(m=y[r]=[]).x0=r>0?d[r-1]:u,m.x1=r<p?d[r]:h;if(isFinite(s)){if(s>0)for(r=0;r<o;++r)null!=(a=l[r])&&u<=a&&a<=h&&y[Math.min(p,Math.floor((a-u)/s))].push(i[r]);else if(s<0)for(r=0;r<o;++r)if(null!=(a=l[r])&&u<=a&&a<=h){const e=Math.floor((u-a)*s);y[Math.min(p,e+(d[e]<=a))].push(i[r])}}else for(r=0;r<o;++r)null!=(a=l[r])&&u<=a&&a<=h&&y[ar(d,a,0,p)].push(i[r]);return y}return i.value=function(t){return arguments.length?(e="function"==typeof t?t:nu(t),i):e},i.domain=function(e){return arguments.length?(t="function"==typeof e?e:nu([e[0],e[1]]),i):t},i.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:nu(Array.isArray(e)?tu.call(e):e),i):n},i}().value(e=>e[i]).thresholds(s)(e);if(o)l[l.length-1].x1=s[s.length-1];else{const e=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+e}const c=o?[s[0],s[s.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(e.map(e=>e[a]))),h=[];return l.forEach(e=>{const t=`${e.x0}-${e.x1}`,n=this.aggregateBinDataByGroup(e);u.forEach(i=>{h.push({group:i,key:t,value:n[i]||0,bin:e.x0})})}),{bins:l,binsDomain:c}}getBinnedStackedData(){const e=this.getOptions(),{groupMapsTo:t}=e.data,n=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),r=this.getDataValuesGroupedByKeys({bins:i});return lu().keys(n)(r).map((e,i)=>Object.keys(e).filter(e=>!isNaN(e)).map(r=>{const a=e[r];return a[t]=n[i],a}))}getGroupedData(e){const t=this.getDisplayData(e),n={},{groupMapsTo:i}=this.getOptions().data;return t.map(e=>{const t=e[i];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(),i=this.getDisplayData(t);let r;r=e?e.map(e=>`${e.x0}:${e.x1}`):er(i.map(e=>{const t=this.services.cartesianScales.getDomainIdentifier(e);return e[t]instanceof Date?Gc(e[t]):e[t]&&"function"==typeof e[t].toString?e[t].toString():e[t]}));const a=this.services.cartesianScales.domainAxisPosition,s=n.axes[a].scaleType;return s===j.TIME?r.sort((e,t)=>new Date(e)-new Date(t)):(s===j.LOG||s===j.LINEAR)&&r.sort((e,t)=>e-t),r}getDataValuesGroupedByKeys({bins:e=null,groups:t=null}){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getDisplayData(t),a=this.getDataGroupNames(),s=this.getStackKeys({bins:e,groups:t});return e?s.map(t=>{const[n,r]=t.split(":"),s={x0:n,x1:r},o=e.find(e=>e.x0.toString()===n.toString());return a.forEach(e=>{s[e]=o.filter(t=>t[i]===e).length}),s}):s.map(e=>{const t={sharedStackKey:e};return a.forEach(n=>{const a=r.find(t=>{const r=this.services.cartesianScales.getDomainIdentifier(t);return t[i]===n&&Object.prototype.hasOwnProperty.call(t,r)&&(t[r]instanceof Date?Gc(t[r])===e:t[r].toString()===e)}),s=this.services.cartesianScales.getRangeIdentifier(t);t[n]=a?a[s]:null}),t})}getStackedData({percentage:e=!1,groups:t=null,divergent:n=!1}){const i=this.getOptions(),{groupMapsTo:r}=i.data,a=this.getActiveDataGroupNames(t),s=this.getDataValuesGroupedByKeys({groups:t});if(e){const e=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}(s.map(e=>[e.sharedStackKey,0]));s.forEach(t=>{a.forEach(n=>{e[t.sharedStackKey]+=t[n]})}),s.forEach(t=>{a.forEach(n=>{const i=e[t.sharedStackKey];e[t.sharedStackKey]?t[n]=t[n]/i*100:t[n]=0})})}return(n?lu().offset(cu):lu()).keys(a)(s).map((e,t)=>Object.keys(e).filter(e=>!isNaN(e)).map(n=>{const i=e[n];return i[r]=a[t],i}))}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();cc(t,e),this.set({options:Xi(t,e)})}update(e=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(C.Model.UPDATE,{animate:e}))}toggleDataLabel(e){const{ACTIVE:t,DISABLED:n}=ml.items.status,i=this.getDataGroups(),r=i.some(e=>e.status===n),a=i.filter(e=>e.status===t);if(r)if(1===a.length&&a[0].name===e)i.forEach((e,n)=>{i[n].status=t});else{const r=i.findIndex(t=>t.name===e);i[r].status=i[r].status===n?t:n}else i.forEach((r,a)=>{i[a].status=r.name===e?t:n});const s=i.filter(e=>e.status===t),o=this.getOptions();i.some(e=>e.status===n)?o.data.selectedGroups=s.map(e=>e.name):o.data.selectedGroups=[],this.services.events.dispatchEvent(C.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(e,t,n,i){const r=this.getOptions();return r.getIsFilled?r.getIsFilled(e,t,n,i):i}getFillColor(e,t,n){const i=this.getOptions(),r=uc(this.colorScale,e);return i.getFillColor?i.getFillColor(e,t,n,r):r}getStrokeColor(e,t,n){const i=this.getOptions(),r=uc(this.colorScale,e);return i.getStrokeColor?i.getStrokeColor(e,t,n,r):r}isUserProvidedColorScaleValid(){const e=uc(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(i=>n=e.originalClassName?`${n} ${i}-${t}`:`${i}-${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:i}=e;return n.forEach(e=>{e.data.forEach((n,r)=>{let a;const s=uc(e,"label");if(null===s){a=uc(i,r)||"Ungrouped"}else a=s;const o={group:a,key:i[r]};isNaN(n)?(o.value=n.value,o.date=n.date):o.value=n,t.push(o)})}),t}getTabularDataArray(){return[]}exportToCSV(){const e=this.getTabularDataArray().map(e=>e.map(e=>`"${("&ndash;"===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 i=uc(t,"fileDownload","fileName");"function"==typeof i?n=i("csv"):"string"==typeof i&&(n=i),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:i}=ml.items.status,r=this.getOptions(),a=er(e.map(e=>e[t]));r.data.selectedGroups.length&&(r.data.selectedGroups.every(e=>a.includes(e))||(r.data.selectedGroups=[]));const s=e=>!r.data.selectedGroups.length||r.data.selectedGroups.includes(e)?n:i;return a.map(e=>({name:e,status:s(e)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const e=this.getOptions(),t=uc(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=uc(this.getOptions(),"color","pairing");let t=uc(e,"numberOfVariants");(!t||t<this.allDataGroups.length)&&(t=this.allDataGroups.length);let n=uc(e,"option");const i=t>5?14:t;n=n<=fl[`${i}-color`]?n:1;const r=this.allDataGroups.map((e,t)=>`${i}-${n}-${t%14+1}`);this.colorClassNames=qo().range(r).domain(this.allDataGroups)}}class hu extends uu{constructor(e){super(e),this.axisFlavor=te.DEFAULT}assignRangeAndDomains(){const{cartesianScales:e}=this.services,t=this.getOptions(),n=e.isDualAxes(),i={primaryDomain:e.domainAxisPosition,primaryRange:e.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(i.secondaryDomain=e.secondaryDomainAxisPosition,i.secondaryRange=e.secondaryRangeAxisPosition),Object.keys(i).forEach(n=>{const r=i[n];e.scales[r]?i[n]={position:r,label:e.getScaleLabel(r),identifier:uc(t,"axes",r,"mapsTo")}:i[n]=null}),i}getTabularDataArray(){const e=this.getDisplayData(),t=this.getOptions(),{groupMapsTo:n}=t.data,{primaryDomain:i,primaryRange:r,secondaryDomain:a,secondaryRange:s}=this.assignRangeAndDomains(),{number:o,code:l}=uc(this.getOptions(),"locale"),c=["Group",i.label,r.label,...a?[a.label]:[],...s?[s.label]:[]],u=e.map(e=>[e[n],null===e[i.identifier]?"&ndash;":e[i.identifier],null===e[r.identifier]||isNaN(e[r.identifier])?"&ndash;":o(e[r.identifier],l),...a?[null===e[a.identifier]?"&ndash;":e[a.identifier]]:[],...s?[null===e[s.identifier]||isNaN(e[s.identifier])?"&ndash;":e[s.identifier]]:[]]);return super.formatTable({headers:c,cells:u})}setData(e){let t;if(e&&(t=super.setData(e),uc(this.getOptions(),"zoomBar",N.TOP,"enabled"))){const e=uc(this.getOptions(),"zoomBar",N.TOP,"data");this.setZoomBarData(e)}return t}setZoomBarData(e){const t=e?this.sanitize(ki(e)):this.getDisplayData();let n=t;const{cartesianScales:i}=this.services;if(t&&i.domainAxisPosition&&i.rangeAxisPosition){const e=i.getDomainIdentifier(),r=i.getRangeIdentifier();let a=t.map(t=>t[e].getTime());a=er(a).sort(),n=a.map(n=>{let i=0;const a={};return t.forEach(t=>{t[e].getTime()===n&&(i+=t[r])}),a[e]=new Date(n),a[r]=i,a})}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(e){const t=this.getOptions();if(!t.axes)return e;const n=[];return Object.keys(N).forEach(e=>{const i=N[e],r=t.axes[i];if(r&&r.scaleType===j.TIME){const e=r.mapsTo;(null!==e||void 0!==e)&&n.push(e)}}),n.length>0&&e.forEach(e=>{n.forEach(t=>{null===uc(e,t,"getTime")&&(e[t]=new Date(e[t]))})}),e}sanitize(e){return e=super.sanitize(e),this.sanitizeDateValues(e)}}var du=/\s/,pu=/^\s+/;var fu=/^[-+]0x[0-9a-f]+$/i,gu=/^0b[01]+$/i,mu=/^0o[0-7]+$/i,yu=parseInt;function vu(e){if("number"==typeof e)return e;if(Le(e))return NaN;if(Fe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Fe(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--&&du.test(e.charAt(t)););return t}(e)+1).replace(pu,"")}(e);var n=gu.test(e);return n||mu.test(e)?yu(e.slice(2),n?2:8):fu.test(e)?NaN:+e}var bu=function(){return ke.Date.now()},_u=Math.max,xu=Math.min;function wu(e){return"string"==typeof e?new Da([[document.querySelector(e)]],[document.documentElement]):new Da([[e]],Ca)}function Au(){var e,t,n=qo().unknown(void 0),i=n.domain,r=n.range,a=0,s=1,o=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<a,d=h?s:a,p=h?a:s;e=(p-d)/Math.max(1,n-l+2*c),o&&(e=Math.floor(e)),d+=(p-d-e*(n-l))*u,t=e*(1-l),o&&(d=Math.round(d),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(r);++i<r;)a[i]=e+i*n;return a}(n).map(function(t){return d+e*t});return r(h?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),h()):i()},n.range=function(e){return arguments.length?([a,s]=e,a=+a,s=+s,h()):[a,s]},n.rangeRound=function(e){return[a,s]=e,a=+a,s=+s,o=!0,h()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(o=!!e,h()):o},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),h()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),h()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,h()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),h()):u},n.copy=function(){return Au(i(),[a,s]).round(o).paddingInner(l).paddingOuter(c).align(u)},Zo.apply(h(),arguments)}function ku(e,t){var n,i=0,r=(e=e.slice()).length-1,a=e[i],s=e[r];return s<a&&(n=i,i=r,r=n,n=a,a=s,s=n),e[i]=t.floor(a),e[r]=t.ceil(s),e}const $u=new Date,Eu=new Date;function Tu(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,i,a)=>{const s=[];if(n=r.ceil(n),a=null==a?1:Math.floor(a),!(n<i&&a>0))return s;let o;do{s.push(o=new Date(+n)),t(n,a),e(n)}while(o<n&&n<i);return s},r.filter=n=>Tu(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}),n&&(r.count=(t,i)=>($u.setTime(+t),Eu.setTime(+i),e($u),e(Eu),Math.floor(n($u,Eu))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?t=>i(t)%e===0:t=>r.count(0,t)%e===0):r:null)),r}const Su=Tu(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Su.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Tu(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Su:null),Su.range;const Mu=1e3,Ou=6e4,Cu=60*Ou,Du=24*Cu,zu=7*Du,Lu=30*Du,Nu=365*Du,Iu=Tu(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Mu)},(e,t)=>(t-e)/Mu,e=>e.getUTCSeconds());Iu.range;const Ru=Tu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mu)},(e,t)=>{e.setTime(+e+t*Ou)},(e,t)=>(t-e)/Ou,e=>e.getMinutes());Ru.range;const Pu=Tu(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ou)},(e,t)=>(t-e)/Ou,e=>e.getUTCMinutes());Pu.range;const ju=Tu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mu-e.getMinutes()*Ou)},(e,t)=>{e.setTime(+e+t*Cu)},(e,t)=>(t-e)/Cu,e=>e.getHours());ju.range;const Fu=Tu(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Cu)},(e,t)=>(t-e)/Cu,e=>e.getUTCHours());Fu.range;const Bu=Tu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ou)/Du,e=>e.getDate()-1);Bu.range;const Uu=Tu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Du,e=>e.getUTCDate()-1);Uu.range;const Vu=Tu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Du,e=>Math.floor(e/Du));function Hu(e){return Tu(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())*Ou)/zu)}Vu.range;const Gu=Hu(0),Zu=Hu(1),Wu=Hu(2),qu=Hu(3),Yu=Hu(4),Xu=Hu(5),Ku=Hu(6);function Qu(e){return Tu(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)/zu)}Gu.range,Zu.range,Wu.range,qu.range,Yu.range,Xu.range,Ku.range;const Ju=Qu(0),eh=Qu(1),th=Qu(2),nh=Qu(3),ih=Qu(4),rh=Qu(5),ah=Qu(6);Ju.range,eh.range,th.range,nh.range,ih.range,rh.range,ah.range;const sh=Tu(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());sh.range;const oh=Tu(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());oh.range;const lh=Tu(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());lh.every=e=>isFinite(e=Math.floor(e))&&e>0?Tu(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,lh.range;const ch=Tu(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());ch.every=e=>isFinite(e=Math.floor(e))&&e>0?Tu(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,ch.range;const[uh,hh]=function(e,t,n,i,r,a){const s=[[Iu,1,Mu],[Iu,5,5e3],[Iu,15,15e3],[Iu,30,3e4],[a,1,Ou],[a,5,5*Ou],[a,15,15*Ou],[a,30,30*Ou],[r,1,Cu],[r,3,3*Cu],[r,6,6*Cu],[r,12,12*Cu],[i,1,Du],[i,2,2*Du],[n,1,zu],[t,1,Lu],[t,3,3*Lu],[e,1,Nu]];function o(t,n,i){const r=Math.abs(n-t)/i,a=ir(([,,e])=>e).right(s,r);if(a===s.length)return e.every(mr(t/Nu,n/Nu,i));if(0===a)return Su.every(Math.max(mr(t,n,i),1));const[o,l]=s[r/s[a-1][2]<s[a][2]/r?a-1:a];return o.every(l)}return[function(e,t,n){const i=t<e;i&&([e,t]=[t,e]);const r=n&&"function"==typeof n.range?n:o(e,t,n),a=r?r.range(e,+t+1):[];return i?a.reverse():a},o]}(lh,sh,Gu,Bu,ju,Ru);function dh(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 ph(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 fh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var gh,mh,yh={"-":"",_:" ",0:"0"},vh=/^\s*\d+/,bh=/^%/,_h=/[\\^$*+?|[\]().{}]/g;function xh(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a<n?new Array(n-a+1).join(t)+r:r)}function wh(e){return e.replace(_h,"\\$&")}function Ah(e){return new RegExp("^(?:"+e.map(wh).join("|")+")","i")}function kh(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function $h(e,t,n){var i=vh.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Eh(e,t,n){var i=vh.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Th(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function Sh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function Mh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function Oh(e,t,n){var i=vh.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Ch(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Dh(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function zh(e,t,n){var i=vh.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function Lh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function Nh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Ih(e,t,n){var i=vh.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Rh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ph(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function jh(e,t,n){var i=vh.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Fh(e,t,n){var i=vh.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Bh(e,t,n){var i=vh.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Uh(e,t,n){var i=bh.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function Vh(e,t,n){var i=vh.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Hh(e,t,n){var i=vh.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Gh(e,t){return xh(e.getDate(),t,2)}function Zh(e,t){return xh(e.getHours(),t,2)}function Wh(e,t){return xh(e.getHours()%12||12,t,2)}function qh(e,t){return xh(1+Bu.count(lh(e),e),t,3)}function Yh(e,t){return xh(e.getMilliseconds(),t,3)}function Xh(e,t){return Yh(e,t)+"000"}function Kh(e,t){return xh(e.getMonth()+1,t,2)}function Qh(e,t){return xh(e.getMinutes(),t,2)}function Jh(e,t){return xh(e.getSeconds(),t,2)}function ed(e){var t=e.getDay();return 0===t?7:t}function td(e,t){return xh(Gu.count(lh(e)-1,e),t,2)}function nd(e){var t=e.getDay();return t>=4||0===t?Yu(e):Yu.ceil(e)}function id(e,t){return e=nd(e),xh(Yu.count(lh(e),e)+(4===lh(e).getDay()),t,2)}function rd(e){return e.getDay()}function ad(e,t){return xh(Zu.count(lh(e)-1,e),t,2)}function sd(e,t){return xh(e.getFullYear()%100,t,2)}function od(e,t){return xh((e=nd(e)).getFullYear()%100,t,2)}function ld(e,t){return xh(e.getFullYear()%1e4,t,4)}function cd(e,t){var n=e.getDay();return xh((e=n>=4||0===n?Yu(e):Yu.ceil(e)).getFullYear()%1e4,t,4)}function ud(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xh(t/60|0,"0",2)+xh(t%60,"0",2)}function hd(e,t){return xh(e.getUTCDate(),t,2)}function dd(e,t){return xh(e.getUTCHours(),t,2)}function pd(e,t){return xh(e.getUTCHours()%12||12,t,2)}function fd(e,t){return xh(1+Uu.count(ch(e),e),t,3)}function gd(e,t){return xh(e.getUTCMilliseconds(),t,3)}function md(e,t){return gd(e,t)+"000"}function yd(e,t){return xh(e.getUTCMonth()+1,t,2)}function vd(e,t){return xh(e.getUTCMinutes(),t,2)}function bd(e,t){return xh(e.getUTCSeconds(),t,2)}function _d(e){var t=e.getUTCDay();return 0===t?7:t}function xd(e,t){return xh(Ju.count(ch(e)-1,e),t,2)}function wd(e){var t=e.getUTCDay();return t>=4||0===t?ih(e):ih.ceil(e)}function Ad(e,t){return e=wd(e),xh(ih.count(ch(e),e)+(4===ch(e).getUTCDay()),t,2)}function kd(e){return e.getUTCDay()}function $d(e,t){return xh(eh.count(ch(e)-1,e),t,2)}function Ed(e,t){return xh(e.getUTCFullYear()%100,t,2)}function Td(e,t){return xh((e=wd(e)).getUTCFullYear()%100,t,2)}function Sd(e,t){return xh(e.getUTCFullYear()%1e4,t,4)}function Md(e,t){var n=e.getUTCDay();return xh((e=n>=4||0===n?ih(e):ih.ceil(e)).getUTCFullYear()%1e4,t,4)}function Od(){return"+0000"}function Cd(){return"%"}function Dd(e){return+e}function zd(e){return Math.floor(+e/1e3)}function Ld(e){return new Date(e)}function Nd(e){return e instanceof Date?+e:+new Date(+e)}function Id(e,t,n,i,r,a,s,o,l,c){var u=il(),h=u.invert,d=u.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),_=c("%Y");function x(e){return(l(e)<e?p:o(e)<e?f:s(e)<e?g:a(e)<e?m:i(e)<e?r(e)<e?y:v:n(e)<e?b:_)(e)}return u.invert=function(e){return new Date(h(e))},u.domain=function(e){return arguments.length?d(Array.from(e,Nd)):d().map(Ld)},u.ticks=function(t){var n=d();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?x:c(t)},u.nice=function(e){var n=d();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?d(ku(n,e)):u},u.copy=function(){return tl(u,Id(e,t,n,i,r,a,s,o,l,c))},u}function Rd(){return Zo.apply(Id(uh,hh,lh,sh,Gu,Bu,ju,Ru,Iu,mh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}gh=function(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Ah(r),u=kh(r),h=Ah(a),d=kh(a),p=Ah(s),f=kh(s),g=Ah(o),m=kh(o),y=Ah(l),v=kh(l),b={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return o[e.getMonth()]},c:null,d:Gh,e:Gh,f:Xh,g:od,G:cd,H:Zh,I:Wh,j:qh,L:Yh,m:Kh,M:Qh,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Dd,s:zd,S:Jh,u:ed,U:td,V:id,w:rd,W:ad,x:null,X:null,y:sd,Y:ld,Z:ud,"%":Cd},_={a:function(e){return s[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return o[e.getUTCMonth()]},c:null,d:hd,e:hd,f:md,g:Td,G:Md,H:dd,I:pd,j:fd,L:gd,m:yd,M:vd,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Dd,s:zd,S:bd,u:_d,U:xd,V:Ad,w:kd,W:$d,x:null,X:null,y:Ed,Y:Sd,Z:Od,"%":Cd},x={a:function(e,t,n){var i=p.exec(t.slice(n));return i?(e.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(e,t,n){var i=y.exec(t.slice(n));return i?(e.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(e,t,n){var i=g.exec(t.slice(n));return i?(e.m=m.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(e,n,i){return k(e,t,n,i)},d:Nh,e:Nh,f:Bh,g:Ch,G:Oh,H:Rh,I:Rh,j:Ih,L:Fh,m:Lh,M:Ph,p:function(e,t,n){var i=c.exec(t.slice(n));return i?(e.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:zh,Q:Vh,s:Hh,S:jh,u:Eh,U:Th,V:Sh,w:$h,W:Mh,x:function(e,t,i){return k(e,n,t,i)},X:function(e,t,n){return k(e,i,t,n)},y:Ch,Y:Oh,Z:Dh,"%":Uh};function w(e,t){return function(n){var i,r,a,s=[],o=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++o<c;)37===e.charCodeAt(o)&&(s.push(e.slice(l,o)),null!=(r=yh[i=e.charAt(++o)])?i=e.charAt(++o):r="e"===i?" ":"0",(a=t[i])&&(i=a(n,r)),s.push(i),l=o+1);return s.push(e.slice(l,o)),s.join("")}}function A(e,t){return function(n){var i,r,a=fh(1900,void 0,1);if(k(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=ph(fh(a.y,0,1))).getUTCDay(),i=r>4||0===r?eh.ceil(i):eh(i),i=Uu.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=dh(fh(a.y,0,1))).getDay(),i=r>4||0===r?Zu.ceil(i):Zu(i),i=Bu.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?ph(fh(a.y,0,1)).getUTCDay():dh(fh(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ph(a)):dh(a)}}function k(e,t,n,i){for(var r,a,s=0,o=t.length,l=n.length;s<o;){if(i>=l)return-1;if(37===(r=t.charCodeAt(s++))){if(r=t.charAt(s++),!(a=x[r in yh?t.charAt(s++):r])||(i=a(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return b.x=w(n,b),b.X=w(i,b),b.c=w(t,b),_.x=w(n,_),_.X=w(i,_),_.c=w(t,_),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=A(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=A(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"]}),mh=gh.format,gh.parse,gh.utcFormat,gh.utcParse;const Pd=Math.abs,jd=Math.atan2,Fd=Math.cos,Bd=Math.max,Ud=Math.min,Vd=Math.sin,Hd=Math.sqrt,Gd=1e-12,Zd=Math.PI,Wd=Zd/2,qd=2*Zd;function Yd(e){return e>=1?Wd:e<=-1?-Wd:Math.asin(e)}function Xd(e){this._context=e}function Kd(e){return new Xd(e)}function Qd(){}function Jd(e){this._context=e}function ep(e){return new Jd(e)}Xd.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)}}},Jd.prototype={areaStart:Qd,areaEnd:Qd,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 tp=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${e}`)})();function np(e){const t=[];for(let n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function ip(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function rp(e,t={}){const n=t.width||function(e){const t=ip(e,"border-left-width"),n=ip(e,"border-right-width");return e.clientWidth+t+n}(e),i=t.height||function(e){const t=ip(e,"border-top-width"),n=ip(e,"border-bottom-width");return e.clientHeight+t+n}(e);return{width:n,height:i}}const ap=16384;function sp(e){return new Promise((t,n)=>{const i=new Image;i.decode=()=>t(i),i.onload=()=>t(i),i.onerror=n,i.crossOrigin="anonymous",i.decoding="async",i.src=e})}const op=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||op(n,t))};function lp(e,t,n){const i=window.getComputedStyle(e,n),r=i.getPropertyValue("content");if(""===r||"none"===r)return;const a=tp();try{t.className=`${t.className} ${a}`}catch{return}const s=document.createElement("style");s.appendChild(function(e,t,n){const i=`.${e}:${t}`,r=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return np(e).map(t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`).join(" ")}(n);return document.createTextNode(`${i}{${r}}`)}(a,n,i)),t.appendChild(s)}const cp="application/font-woff",up="image/jpeg",hp={woff:cp,woff2:cp,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:up,jpeg:up,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function dp(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return hp[t]||""}function pp(e){return-1!==e.search(/^(data:)/)}async function fp(e,t,n){const i=await fetch(e,t);if(404===i.status)throw new Error(`Resource "${i.url}" not found`);const r=await i.blob();return new Promise((e,t)=>{const a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:i,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(r)})}const gp={};async function mp(e,t,n){const i=function(e,t,n){let i=e.replace(/\?.*/,"");return n&&(i=e),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),t?`[${t}]${i}`:i}(e,t,n.includeQueryParams);if(null!=gp[i])return gp[i];let r;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const i=await fp(e,n.fetchRequestInit,({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n)));r=function(e,t){return`data:${t};base64,${e}`}(i,t)}catch(t){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;t&&(i="string"==typeof t?t:t.message),i&&console.warn(i)}return gp[i]=r,r}const yp=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function vp(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then(e=>async function(e,t){return op(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):sp(t)}(e):op(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,n?.drawImage(e,0,0,t.width,t.height),sp(t.toDataURL())}const n=e.poster,i=dp(n);return sp(await mp(n,i,t))}(e,t):op(e,HTMLIFrameElement)?async function(e){var t;try{if(null!==(t=e?.contentDocument)&&void 0!==t&&t.body)return await vp(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t)).then(n=>async function(e,t,n){var i,r;let a=[];return a=yp(e)&&e.assignedNodes?np(e.assignedNodes()):op(e,HTMLIFrameElement)&&null!==(i=e.contentDocument)&&void 0!==i&&i.body?np(e.contentDocument.body.childNodes):np((null!==(r=e.shadowRoot)&&void 0!==r?r:e).childNodes),0===a.length||op(e,HTMLVideoElement)||await a.reduce((e,i)=>e.then(()=>vp(i,n)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}(e,n,t)).then(t=>function(e,t){return op(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const i=window.getComputedStyle(e);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):np(i).forEach(r=>{let a=i.getPropertyValue(r);"font-size"===r&&a.endsWith("px")&&(a=Math.floor(parseFloat(a.substring(0,a.length-2)))-.1+"px"),op(e,HTMLIFrameElement)&&"display"===r&&"inline"===a&&(a="block"),"d"===r&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(r,a,i.getPropertyPriority(r))})}(e,t),function(e,t){lp(e,t,":before"),lp(e,t,":after")}(e,t),function(e,t){op(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),op(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(op(e,HTMLSelectElement)){const n=t,i=Array.from(n.children).find(t=>e.value===t.getAttribute("value"));i&&i.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 i={};for(let r=0;r<n.length;r++){const a=n[r].getAttribute("xlink:href");if(a){const n=e.querySelector(a),r=document.querySelector(a);!n&&r&&!i[a]&&(i[a]=await vp(r,t,!0))}}const r=Object.values(i);if(r.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 i=document.createElementNS(t,"defs");n.appendChild(i);for(let e=0;e<r.length;e++)i.appendChild(r[e]);e.appendChild(n)}return e}(e,t)):null}const bp=/url\((['"]?)([^'"]+?)\1\)/g,_p=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xp=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function wp(e){return-1!==e.search(bp)}async function Ap(e,t,n){if(!wp(e))return e;const i=function(e,{preferredFontFormat:t}){return t?e.replace(xp,e=>{for(;;){const[n,,i]=_p.exec(e)||[];if(!i)return"";if(i===t)return`src: ${n};`}}):e}(e,n);return function(e){const t=[];return e.replace(bp,(e,n,i)=>(t.push(i),e)),t.filter(e=>!pp(e))}(i).reduce((e,i)=>e.then(e=>async function(e,t,n,i,r){try{const a=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),t&&(i.href=t),r.href=e,r.href}(t,n):t,s=dp(t);let o;return r||(o=await mp(a,s,i)),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${o}$3`)}catch{}return e}(e,i,t,n)),Promise.resolve(i))}async function kp(e,t,n){var i;const r=null===(i=t.style)||void 0===i?void 0:i.getPropertyValue(e);if(r){const i=await Ap(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function $p(e,t){op(e,Element)&&(await async function(e,t){await kp("background",e,t)||await kp("background-image",e,t),await kp("mask",e,t)||await kp("mask-image",e,t)}(e,t),await async function(e,t){const n=op(e,HTMLImageElement);if((!n||pp(e.src))&&(!op(e,SVGImageElement)||pp(e.href.baseVal)))return;const i=n?e.src:e.href.baseVal,r=await mp(i,dp(i),t);await new Promise((t,i)=>{e.onload=t,e.onerror=i;const a=e;a.decode&&(a.decode=t),"lazy"===a.loading&&(a.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}(e,t),await async function(e,t){const n=np(e.childNodes).map(e=>$p(e,t));await Promise.all(n).then(()=>e)}(e,t))}const Ep={};async function Tp(e){let t=Ep[e];return null!=t||(t={url:e,cssText:await(await fetch(e)).text()},Ep[e]=t),t}async function Sp(e,t){let n=e.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,r=(n.match(/url\([^)]+\)/g)||[]).map(async r=>{let a=r.replace(i,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),fp(a,t.fetchRequestInit,({result:e})=>(n=n.replace(r,`url(${e})`),[r,e]))});return Promise.all(r).then(()=>n)}function Mp(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=i.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(i,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=r.exec(n);if(null===e){if(e=a.exec(n),null===e)break;r.lastIndex=a.lastIndex}else a.lastIndex=r.lastIndex;t.push(e[0])}return t}async function Op(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=np(e.ownerDocument.styleSheets),i=await async function(e,t){const n=[],i=[];return e.forEach(n=>{if("cssRules"in n)try{np(n.cssRules||[]).forEach((e,r)=>{if(e.type===CSSRule.IMPORT_RULE){let a=r+1;const s=Tp(e.href).then(e=>Sp(e,t)).then(e=>Mp(e).forEach(e=>{try{n.insertRule(e,e.startsWith("@import")?a+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})).catch(e=>{console.error("Error loading remote css",e.toString())});i.push(s)}})}catch(r){const a=e.find(e=>null==e.href)||document.styleSheets[0];null!=n.href&&i.push(Tp(n.href).then(e=>Sp(e,t)).then(e=>Mp(e).forEach(e=>{a.insertRule(e,n.cssRules.length)})).catch(e=>{console.error("Error loading remote stylesheet",e)})),console.error("Error inlining remote css file",r)}}),Promise.all(i).then(()=>(e.forEach(e=>{if("cssRules"in e)try{np(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=>wp(e.style.getPropertyValue("src")))}(i)}(e,t);return(await Promise.all(n.map(e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return Ap(e.cssText,n,t)}))).join("\n")}(e,t);if(n){const t=document.createElement("style"),i=document.createTextNode(n);t.appendChild(i),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function Cp(e,t={}){const{width:n,height:i}=rp(e,t),r=await vp(e,t,!0);return await Op(r,t),await $p(r,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 i=t.style;null!=i&&Object.keys(i).forEach(e=>{n[e]=i[e]})}(r,t),await async function(e,t,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),r.appendChild(a),a.appendChild(e),async function(e){return Promise.resolve().then(()=>(new XMLSerializer).serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}(r)}(r,n,i)}async function Dp(e,t={}){const{width:n,height:i}=rp(e,t),r=await Cp(e,t),a=await sp(r),s=document.createElement("canvas"),o=s.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||i;return s.width=c*l,s.height=u*l,t.skipAutoScale||function(e){(e.width>ap||e.height>ap)&&(e.width>ap&&e.height>ap?e.width>e.height?(e.height*=ap/e.width,e.width=ap):(e.width*=ap/e.height,e.height=ap):e.width>ap?(e.height*=ap/e.width,e.width=ap):(e.width*=ap/e.height,e.height=ap))}(s),s.style.width=`${c}`,s.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,s.width,s.height)),o.drawImage(a,0,0,s.width,s.height),s}let zp=class{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}},Lp=class e extends zp{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=wu(e));const n={width:0,height:0},i=e=>{e&&Object.keys(n).forEach(t=>{if(e[t]){const i=e[t],r=parseFloat(i);i&&r>n[t]&&-1===(""+i).indexOf("%")&&(n[t]=r)}})},r={width:e.attr("width"),height:e.attr("height")},a=e.node();let s,o,l,c,u;try{"function"==typeof a.getBBox&&(s=a.getBBox(),o={width:s.width,height:s.height})}catch(e){console.error(e)}try{"function"==typeof a?.getBoundingClientRect&&(l=a.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(e){console.error(e)}if(a instanceof SVGSVGElement&&(u={width:a.clientWidth,height:a.clientHeight}),t){if(t.useAttrs&&(i(r),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(i(u),n.width>0&&n.height>0))return u;if(t.useBBox&&(i(o),n.width>0&&n.height>0))return o;if(t.useBoundingRect&&(i(c),n.width>0&&n.height>0))return c}try{i({width:uc(e.node(),"width","baseVal","value"),height:uc(e.node(),"height","baseVal","value")})}catch{i(u),i(o),i(r)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let n,i,r=t.split("#");return 2===r.length?(n=r[0],r=r[1].split("."),i=r[0]):(r=t.split("."),n=r[0]),e.append(n).attr("id",i).attr("class",r.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},i=e.getBoundingClientRect(),r=t?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=i.left-r.left,n.top=i.top-r.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=uc(e,"style","prefix"),n=wu(this.getHolder()).append("div").classed(`${ol}--${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:i}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),wu(this.getHolder()).classed(`${ol}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.model.getOptions(),n=wu(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Dp(e,t)).toDataURL("image/jpeg",t.quality||1)}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then(function(i){let r="myChart";const a=uc(t,"fileDownload","fileName");"function"==typeof a?r=a("jpg"):"string"==typeof a&&(r=a),e.services.files?.downloadImage(i,`${r}.jpg`),n.classed("filled",!1)})}exportToPNG(){const e=this,t=this.model.getOptions(),n=wu(this.getHolder());n.classed("filled",!0),async function(e,t={}){return(await Dp(e,t)).toDataURL()}(this.getMainContainer(),{quality:1,filter:e=>!(e.classList&&e.classList.contains("cds--cc--toolbar"))}).then(function(i){let r="myChart";const a=uc(t,"fileDownload","fileName");"function"==typeof a?r=a("png"):"string"==typeof a&&(r=a),e.services.files?.downloadImage(i,`${r}.png`),n.classed("filled",!1)}).catch(function(e){console.error("oops, something went wrong!",e)})}isFullScreenMode(){return wu(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const e=this.getHolder();wu(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=wu(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=e.getSVGElementSize(wu(this.mainContainer),{useBBox:!0}),n=wu(this.mainContainer).attr("class"),i=wu(this.mainContainer).selectAll(`.${n} > svg`);let r=0;i.nodes().forEach(function(t){r+=Number(e.getSVGElementSize(wu(t),{useBBox:!0}).height)}),r<=t?wu(this.mainContainer).attr("height",r):wu(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&wu(e).on("mouseover",()=>{this.services.events?.dispatchEvent(C.Chart.MOUSEOVER)}).on("mouseout",()=>{this.services.events?.dispatchEvent(C.Chart.MOUSEOUT)})}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const i=function(e,t,n){var i,r,a,s,o,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,a=r;return i=r=void 0,c=t,s=e.apply(a,n)}function f(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=a}function g(){var e=bu();if(f(e))return m(e);o=setTimeout(g,function(e){var n=t-(e-l);return h?xu(n,a-(e-c)):n}(e))}function m(e){return o=void 0,d&&i?p(e):(i=r=void 0,s)}function y(){var e=bu(),n=f(e);if(i=arguments,r=this,l=e,n){if(void 0===o)return function(e){return c=e,o=setTimeout(g,t),u?p(e):s}(l);if(h)return clearTimeout(o),o=setTimeout(g,t),p(l)}return void 0===o&&(o=setTimeout(g,t)),s}return t=vu(t)||0,Fe(n)&&(u=!!n.leading,a=(h="maxWait"in n)?_u(vu(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==o&&clearTimeout(o),c=0,i=l=r=o=void 0},y.flush=function(){return void 0===o?s:m(bu())},y}(()=>{e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,this.services.events?.dispatchEvent(C.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(e)}},Np=class e extends zp{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 i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};var Ip=function(e){return function(t){return 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"}),Rp=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Pp=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),jp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bp="\\ud800-\\udfff",Up="\\u2700-\\u27bf",Vp="a-z\\xdf-\\xf6\\xf8-\\xff",Hp="A-Z\\xc0-\\xd6\\xd8-\\xde",Gp="\\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",Zp="["+Gp+"]",Wp="\\d+",qp="["+Up+"]",Yp="["+Vp+"]",Xp="[^"+Bp+Gp+Wp+Up+Vp+Hp+"]",Kp="(?:\\ud83c[\\udde6-\\uddff]){2}",Qp="[\\ud800-\\udbff][\\udc00-\\udfff]",Jp="["+Hp+"]",ef="(?:"+Yp+"|"+Xp+")",tf="(?:"+Jp+"|"+Xp+")",nf="(?:['’](?:d|ll|m|re|s|t|ve))?",rf="(?:['’](?:D|LL|M|RE|S|T|VE))?",af="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",sf="[\\ufe0e\\ufe0f]?",of=sf+af+"(?:\\u200d(?:"+["[^"+Bp+"]",Kp,Qp].join("|")+")"+sf+af+")*",lf="(?:"+[qp,Kp,Qp].join("|")+")"+of,cf=RegExp([Jp+"?"+Yp+"+"+nf+"(?="+[Zp,Jp,"$"].join("|")+")",tf+"+"+rf+"(?="+[Zp,Jp+ef,"$"].join("|")+")",Jp+"?"+ef+"+"+nf,Jp+"+"+rf,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wp,lf].join("|"),"g");var uf=RegExp("['’]","g");function hf(e){return function(t){return function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)n=t(n,e[i],i,e);return n}(function(e,t){return e=yn(e),void 0===t?function(e){return Fp.test(e)}(e)?function(e){return e.match(cf)||[]}(e):function(e){return e.match(jp)||[]}(e):e.match(t)||[]}(function(e){return(e=yn(e))&&e.replace(Rp,Ip).replace(Pp,"")}(t).replace(uf,"")),e,"")}}function df(e,t){var n;return Wc(e,function(e,i,r){return!(n=t(e,i,r))}),!!n}function pf(e,t,n){return(Ie(e)?Ei:df)(e,Ui(t))}_t(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,vu(t)||0,n)}),hf(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});class ff{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=t[i],a=e+r,s=Math.abs(e)<Math.abs(r)?e-(a-r):r-(a-e);s&&(t[n++]=s),e=a}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,i,r=this._n,a=0;if(r>0){for(a=e[--r];r>0&&(t=a,n=e[--r],a=t+n,i=n-(a-t),!i););r>0&&(i<0&&e[r-1]<0||i>0&&e[r-1]>0)&&(n=2*i,t=a+n,n==t-a&&(a=t))}return a}}function gf(e){return e}var mf=1e-6;function yf(e){return"translate("+e+",0)"}function vf(e){return"translate(0,"+e+")"}function bf(e){return t=>+e(t)}function _f(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function xf(){return!this.__axis}function wf(e,t){var n=[],i=null,r=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=1===e||4===e?-1:1,u=4===e||2===e?"x":"y",h=1===e||3===e?yf:vf;function d(d){var p=i??(t.ticks?t.ticks.apply(t,n):t.domain()),f=r??(t.tickFormat?t.tickFormat.apply(t,n):gf),g=Math.max(a,0)+o,m=t.range(),y=+m[0]+l,v=+m[m.length-1]+l,b=(t.bandwidth?_f:bf)(t.copy(),l),_=d.selection?d.selection():d,x=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(p,t).order(),A=w.exit(),k=w.enter().append("g").attr("class","tick"),$=w.select("line"),E=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),$=$.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),E=E.merge(k.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",1===e?"0em":3===e?"0.71em":"0.32em")),d!==_&&(x=x.transition(d),w=w.transition(d),$=$.transition(d),E=E.transition(d),A=A.transition(d).attr("opacity",mf).attr("transform",function(e){return isFinite(e=b(e))?h(e+l):this.getAttribute("transform")}),k.attr("opacity",mf).attr("transform",function(e){var t=this.parentNode.__axis;return h((t&&isFinite(t=t(e))?t:b(e))+l)})),A.remove(),x.attr("d",4===e||2===e?s?"M"+c*s+","+y+"H"+l+"V"+v+"H"+c*s:"M"+l+","+y+"V"+v:s?"M"+y+","+c*s+"V"+l+"H"+v+"V"+c*s:"M"+y+","+l+"H"+v),w.attr("opacity",1).attr("transform",function(e){return h(b(e)+l)}),$.attr(u+"2",c*a),E.attr(u,c*g).text(f),_.filter(xf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===e?"start":4===e?"end":"middle"),_.each(function(){this.__axis=b})}return d.scale=function(e){return arguments.length?(t=e,d):t},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),d):n.slice()},d.tickValues=function(e){return arguments.length?(i=null==e?null:Array.from(e),d):i&&i.slice()},d.tickFormat=function(e){return arguments.length?(r=e,d):r},d.tickSize=function(e){return arguments.length?(a=s=+e,d):a},d.tickSizeInner=function(e){return arguments.length?(a=+e,d):a},d.tickSizeOuter=function(e){return arguments.length?(s=+e,d):s},d.tickPadding=function(e){return arguments.length?(o=+e,d):o},d.offset=function(e){return arguments.length?(l=+e,d):l},d}function Af(e){return wf(1,e)}function kf(e){return wf(2,e)}function $f(e){return wf(3,e)}function Ef(e){return wf(4,e)}const Tf={capture:!0,passive:!1};function Sf(e){e.preventDefault(),e.stopImmediatePropagation()}const Mf=e=>+e,Of=e=>()=>e;function Cf(e,{sourceEvent:t,target:n,selection:i,mode:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function Df(e){e.preventDefault(),e.stopImmediatePropagation()}var zf={name:"drag"},Lf={name:"space"},Nf={name:"handle"},If={name:"center"};const{abs:Rf,max:Pf,min:jf}=Math;function Ff(e){return[+e[0],+e[1]]}function Bf(e){return[Ff(e[0]),Ff(e[1])]}var Uf={name:"x",handles:["w","e"].map(Yf),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]]}},Vf={},Hf={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"},Gf={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Zf={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Wf={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},qf={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Yf(e){return{type:e}}function Xf(e){return!e.ctrlKey&&!e.button}function Kf(){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 Qf(){return navigator.maxTouchPoints||"ontouchstart"in this}function Jf(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function eg(){return function(e){var t,n=Kf,i=Xf,r=Qf,a=!0,s=br("start","brush","end"),o=6;function l(t){var n=t.property("__brush",g).selectAll(".overlay").data([Yf("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Hf.overlay).merge(n).each(function(){var e=Jf(this).extent;wu(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([Yf("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Hf.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=t.selectAll(".handle").data(e.handles,function(e){return e.type});i.exit().remove(),i.enter().append("rect").attr("class",function(e){return"handle handle--"+e.type}).attr("cursor",function(e){return Hf[e.type]}),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=wu(this),t=Jf(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]-o/2:t[0][0]-o/2}).attr("y",function(e){return"s"===e.type[0]?t[1][1]-o/2:t[0][1]-o/2}).attr("width",function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+o:o}).attr("height",function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+o:o})):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 i=e.__brush.emitter;return!i||n&&i.clean?new h(e,t,n):i}function h(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function d(n){if((!t||n.touches)&&i.apply(this,arguments)){var r,s,o,l,h,d,p,f,g,m,y,v=this,b=n.target.__data__.type,_="selection"===(a&&n.metaKey?b="overlay":b)?zf:a&&n.altKey?If:Nf,x=e===Vf?null:Wf[b],w=e===Uf?null:qf[b],A=Jf(v),k=A.extent,$=A.selection,E=k[0][0],T=k[0][1],S=k[1][0],M=k[1][1],O=0,C=0,D=x&&w&&a&&n.shiftKey,z=Array.from(n.touches||[n],e=>{const t=e.identifier;return(e=La(e,v)).point0=e.slice(),e.identifier=t,e});ao(v);var L=u(v,arguments,!0).beforestart();if("overlay"===b){$&&(g=!0);const t=[z[0],z[1]||z[0]];A.selection=$=[[r=e===Vf?E:jf(t[0][0],t[1][0]),o=e===Uf?T:jf(t[0][1],t[1][1])],[h=e===Vf?S:Pf(t[0][0],t[1][0]),p=e===Uf?M:Pf(t[0][1],t[1][1])]],z.length>1&&j(n)}else r=$[0][0],o=$[0][1],h=$[1][0],p=$[1][1];s=r,l=o,d=h,f=p;var N=wu(v).attr("pointer-events","none"),I=N.selectAll(".overlay").attr("cursor",Hf[b]);if(n.touches)L.moved=P,L.ended=F;else{var R=wu(n.view).on("mousemove.brush",P,!0).on("mouseup.brush",F,!0);a&&R.on("keydown.brush",function(e){switch(e.keyCode){case 16:D=x&&w;break;case 18:_===Nf&&(x&&(h=d-O*x,r=s+O*x),w&&(p=f-C*w,o=l+C*w),_=If,j(e));break;case 32:(_===Nf||_===If)&&(x<0?h=d-O:x>0&&(r=s-O),w<0?p=f-C:w>0&&(o=l-C),_=Lf,I.attr("cursor",Hf.selection),j(e));break;default:return}Df(e)},!0).on("keyup.brush",function(e){switch(e.keyCode){case 16:D&&(m=y=D=!1,j(e));break;case 18:_===If&&(x<0?h=d:x>0&&(r=s),w<0?p=f:w>0&&(o=l),_=Nf,j(e));break;case 32:_===Lf&&(e.altKey?(x&&(h=d-O*x,r=s+O*x),w&&(p=f-C*w,o=l+C*w),_=If):(x<0?h=d:x>0&&(r=s),w<0?p=f:w>0&&(o=l),_=Nf),I.attr("cursor",Hf[b]),j(e));break;default:return}Df(e)},!0),function(e){var t=e.document.documentElement,n=wu(e).on("dragstart.drag",Sf,Tf);"onselectstart"in t?n.on("selectstart.drag",Sf,Tf):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(n.view)}c.call(v),L.start(n,_.name)}function P(e){for(const t of e.changedTouches||[e])for(const e of z)e.identifier===t.identifier&&(e.cur=La(t,v));if(D&&!m&&!y&&1===z.length){const e=z[0];Rf(e.cur[0]-e[0])>Rf(e.cur[1]-e[1])?y=!0:m=!0}for(const e of z)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);g=!0,Df(e),j(e)}function j(e){const t=z[0],n=t.point0;var i;switch(O=t[0]-n[0],C=t[1]-n[1],_){case Lf:case zf:x&&(O=Pf(E-r,jf(S-h,O)),s=r+O,d=h+O),w&&(C=Pf(T-o,jf(M-p,C)),l=o+C,f=p+C);break;case Nf:z[1]?(x&&(s=Pf(E,jf(S,z[0][0])),d=Pf(E,jf(S,z[1][0])),x=1),w&&(l=Pf(T,jf(M,z[0][1])),f=Pf(T,jf(M,z[1][1])),w=1)):(x<0?(O=Pf(E-r,jf(S-r,O)),s=r+O,d=h):x>0&&(O=Pf(E-h,jf(S-h,O)),s=r,d=h+O),w<0?(C=Pf(T-o,jf(M-o,C)),l=o+C,f=p):w>0&&(C=Pf(T-p,jf(M-p,C)),l=o,f=p+C));break;case If:x&&(s=Pf(E,jf(S,r-O*x)),d=Pf(E,jf(S,h+O*x))),w&&(l=Pf(T,jf(M,o-C*w)),f=Pf(T,jf(M,p+C*w)))}d<s&&(x*=-1,i=r,r=h,h=i,i=s,s=d,d=i,b in Gf&&I.attr("cursor",Hf[b=Gf[b]])),f<l&&(w*=-1,i=o,o=p,p=i,i=l,l=f,f=i,b in Zf&&I.attr("cursor",Hf[b=Zf[b]])),A.selection&&($=A.selection),m&&(s=$[0][0],d=$[1][0]),y&&(l=$[0][1],f=$[1][1]),($[0][0]!==s||$[0][1]!==l||$[1][0]!==d||$[1][1]!==f)&&(A.selection=[[s,l],[d,f]],c.call(v),L.brush(e,_.name))}function F(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,i=wu(e).on("dragstart.drag",null);t&&(i.on("click.drag",Sf,Tf),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(e.view,g),R.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),I.attr("cursor",Hf.overlay),A.selection&&($=A.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}($)&&(A.selection=null,c.call(v)),L.end(e,_.name)}}function p(e){u(this,arguments).moved(e)}function f(e){u(this,arguments).ended(e)}function g(){var t=this.__brush||{selection:null};return t.extent=Bf(n.apply(this,arguments)),t.dim=e,t}return l.move=function(t,n,i){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,i=t.__brush,r=u(t,arguments),a=i.selection,s=e.input("function"==typeof n?n.apply(this,arguments):n,i.extent),o=Es(a,s);function l(e){i.selection=1===e&&null===s?null:o(e),c.call(t),r.brush()}return null!==a&&null!==s?l:l(1)}):t.each(function(){var t=this,r=arguments,a=t.__brush,s=e.input("function"==typeof n?n.apply(t,r):n,a.extent),o=u(t,r).beforestart();ao(t),a.selection=null===s?null:s,c.call(t),o.start(i).brush(i).end(i)})},l.clear=function(e,t){l.move(e,null,t)},h.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,i){var r=wu(this.that).datum();s.call(t,this.that,new Cf(t,{sourceEvent:n,target:l,selection:e.output(this.state.selection),mode:i,dispatch:s}),r)}},l.extent=function(e){return arguments.length?(n="function"==typeof e?e:Of(Bf(e)),l):n},l.filter=function(e){return arguments.length?(i="function"==typeof e?e:Of(!!e),l):i},l.touchable=function(e){return arguments.length?(r="function"==typeof e?e:Of(!!e),l):r},l.handleSize=function(e){return arguments.length?(o=+e,l):o},l.keyModifiers=function(e){return arguments.length?(a=!!e,l):a},l.on=function(){var e=s.on.apply(s,arguments);return e===s?l:e},l}(Uf)}const tg=Math.PI,ng=2*tg,ig=1e-6,rg=ng-ig;function ag(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}let sg=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?ag:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ag;const n=10**t;return function(e){this._+=e[0];for(let t=1,i=e.length;t<i;++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,i){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,t,n,i,r,a){this._append`C${+e},${+t},${+n},${+i},${this._x1=+r},${this._y1=+a}`}arcTo(e,t,n,i,r){if(e=+e,t=+t,n=+n,i=+i,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,o=n-e,l=i-t,c=a-e,u=s-t,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(h>ig)if(Math.abs(u*o-l*c)>ig&&r){let d=n-a,p=i-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(h),v=r*Math.tan((tg-Math.acos((f+h-g)/(2*m*y)))/2),b=v/y,_=v/m;Math.abs(b-1)>ig&&this._append`L${e+b*c},${t+b*u}`,this._append`A${r},${r},0,0,${+(u*d>c*p)},${this._x1=e+_*o},${this._y1=t+_*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,i,r,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),o=n*Math.sin(i),l=e+s,c=t+o,u=1^a,h=a?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>ig||Math.abs(this._y1-c)>ig)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%ng+ng),h>rg?this._append`A${n},${n},0,1,${u},${e-s},${t-o}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>ig&&this._append`A${n},${n},0,${+(h>=tg)},${u},${this._x1=e+n*Math.cos(r)},${this._y1=t+n*Math.sin(r)}`)}rect(e,t,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};var og=Math.PI,lg=2*og,cg=og/180,ug=Math.abs,hg=(Math.atan,Math.atan2,Math.cos),dg=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function pg(e,t){return ug(e)>og&&(e-=Math.round(e/lg)*lg),[e,t]}function fg(){}function gg(e,t){return[e,t]}pg.invert=pg,new ff,new ff,new ff,fg.prototype={constructor:fg,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()}},hg(30*cg),gg.invert=gg;dg(3);function mg(e){var t=0,n=e.children,i=n&&n.length;if(i)for(;--i>=0;)t+=n[i].value;else t=1;e.value=t}function yg(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=bg)):void 0===t&&(t=vg);for(var n,i,r,a,s,o=new wg(e),l=[o];n=l.pop();)if((r=t(n.data))&&(s=(r=Array.from(r)).length))for(n.children=r,a=s-1;a>=0;--a)l.push(i=r[a]=new wg(r[a])),i.parent=n,i.depth=n.depth+1;return o.eachBefore(xg)}function vg(e){return e.children}function bg(e){return Array.isArray(e)?e[1]:null}function _g(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function xg(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function wg(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ag(e,t,n,i,r){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-t)/e.value;++o<l;)(a=s[o]).y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*c}function kg(e,t,n,i,r){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(r-n)/e.value;++o<l;)(a=s[o]).x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*c}function $g(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 sg(t)}function Eg(e){return e.innerRadius}function Tg(e){return e.outerRadius}function Sg(e){return e.startAngle}function Mg(e){return e.endAngle}function Og(e){return e&&e.padAngle}function Cg(e,t,n,i,r,a,s){var o=e-n,l=t-i,c=(s?a:-a)/Hd(o*o+l*l),u=c*l,h=-c*o,d=e+u,p=t+h,f=n+u,g=i+h,m=(d+f)/2,y=(p+g)/2,v=f-d,b=g-p,_=v*v+b*b,x=r-a,w=d*g-f*p,A=(b<0?-1:1)*Hd(Bd(0,x*x*_-w*w)),k=(w*b-v*A)/_,$=(-w*v-b*A)/_,E=(w*b+v*A)/_,T=(-w*v+b*A)/_,S=k-m,M=$-y,O=E-m,C=T-y;return S*S+M*M>O*O+C*C&&(k=E,$=T),{cx:k,cy:$,x01:-u,y01:-h,x11:k*(r/x-1),y11:$*(r/x-1)}}function Dg(e){return e[0]}function zg(e){return e[1]}function Lg(e,t){var n=qc(!0),i=null,r=Kd,a=null,s=$g(o);function o(o){var l,c,u,h=(o=Yc(o)).length,d=!1;for(null==i&&(a=r(u=s())),l=0;l<=h;++l)!(l<h&&n(c=o[l],l,o))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(c,l,o),+t(c,l,o));if(u)return a=null,u+""||null}return e="function"==typeof e?e:void 0===e?Dg:qc(e),t="function"==typeof t?t:void 0===t?zg:qc(t),o.x=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),o):e},o.y=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),o):t},o.defined=function(e){return arguments.length?(n="function"==typeof e?e:qc(!!e),o):n},o.curve=function(e){return arguments.length?(r=e,null!=i&&(a=r(i)),o):r},o.context=function(e){return arguments.length?(null==e?i=a=null:a=r(i=e),o):i},o}function Ng(e,t,n){var i=null,r=qc(!0),a=null,s=Kd,o=null,l=$g(c);function c(c){var u,h,d,p,f,g=(c=Yc(c)).length,m=!1,y=new Array(g),v=new Array(g);for(null==a&&(o=s(f=l())),u=0;u<=g;++u){if(!(u<g&&r(p=c[u],u,c))===m)if(m=!m)h=u,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),d=u-1;d>=h;--d)o.point(y[d],v[d]);o.lineEnd(),o.areaEnd()}m&&(y[u]=+e(p,u,c),v[u]=+t(p,u,c),o.point(i?+i(p,u,c):y[u],n?+n(p,u,c):v[u]))}if(f)return o=null,f+""||null}function u(){return Lg().defined(r).curve(s).context(a)}return e="function"==typeof e?e:void 0===e?Dg:qc(+e),t="function"==typeof t?t:qc(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?zg:qc(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),i=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),c):e},c.x1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:qc(+e),c):i},c.y=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:qc(+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(i).y(t)},c.defined=function(e){return arguments.length?(r="function"==typeof e?e:qc(!!e),c):r},c.curve=function(e){return arguments.length?(s=e,null!=a&&(o=s(a)),c):s},c.context=function(e){return arguments.length?(null==e?a=o=null:o=s(a=e),c):a},c}function Ig(e){this._curve=e}wg.prototype=yg.prototype={constructor:wg,count:function(){return this.eachAfter(mg)},each:function(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this},eachAfter:function(e,t){for(var n,i,r,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),n=a.children)for(i=0,r=n.length;i<r;++i)s.push(n[i]);for(;a=o.pop();)e.call(t,a,++l,this);return this},eachBefore:function(e,t){for(var n,i,r=this,a=[r],s=-1;r=a.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;i>=0;--i)a.push(n[i]);return this},find:function(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].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(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i},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 yg(this).eachBefore(_g)},[Symbol.iterator]:function*(){var e,t,n,i,r=this,a=[r];do{for(e=a.reverse(),a=[];r=e.pop();)if(yield r,t=r.children)for(n=0,i=t.length;n<i;++n)a.push(t[n])}while(a.length)}},Object.create(wg.prototype),function e(t){function n(e,n,i,r,a){!function(e,t,n,i,r,a){for(var s,o,l,c,u,h,d,p,f,g,m,y=[],v=t.children,b=0,_=0,x=v.length,w=t.value;b<x;){l=r-n,c=a-i;do{u=v[_++].value}while(!u&&_<x);for(h=d=u,m=u*u*(g=Math.max(c/l,l/c)/(w*e)),f=Math.max(d/m,m/h);_<x;++_){if(u+=o=v[_].value,o<h&&(h=o),o>d&&(d=o),m=u*u*g,(p=Math.max(d/m,m/h))>f){u-=o;break}f=p}y.push(s={value:u,dice:l<c,children:v.slice(b,_)}),s.dice?Ag(s,n,i,r,w?i+=c*u/w:a):kg(s,n,i,w?n+=l*u/w:r,a),w-=u,b=_}}(t,e,n,i,r,a)}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 Ig(e(t))}t._curve=e}(Kd),Ig.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 Rg=class{constructor(e,t,n){if(this.type="",this.renderType=D.HTML,this.id="",this.parent=void 0,this.configs={},this.model=e,this.services=t,n&&(this.configs=n,this.configs.id)){const e=uc(this.model.getOptions(),"style","prefix");this.id=`${e}--${this.configs.id}`}this.parent||this.setParent(wu(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){const t=this.parent;if(this.parent=e,(!t||t.node()!==e.node())&&this.type){const e=uc(this.model.getOptions(),"style","prefix");this.parent?.classed(`${ol}--${e}--${this.type}`,!0),t&&t.classed(`${ol}--${e}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(e={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const t=uc(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",i=Lp.appendOrSelect(this.parent,`${this.renderType===D.SVG?"svg":"div"}${n}.${ol}--${t}--${this.type}`);if(e.ariaLabel&&i.attr("aria-label",e.ariaLabel),e.isPresentational&&i.attr("role","presentation"),e.withinChartClip){const e=this.model.get("chartClipId");if(e){const t=wu(`#${e}`).select("rect");if(0!==t.size()){const n=parseFloat(t.attr("height")),r=parseFloat(t.attr("width"));!isNaN(n)&&!isNaN(r)&&n>0&&r>0&&i.attr("clip-path",`url(#${e})`)}}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?Xi({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:Pg,setPrototypeOf:jg,isFrozen:Fg,getPrototypeOf:Bg,getOwnPropertyDescriptor:Ug}=Object;let{freeze:Vg,seal:Hg,create:Gg}=Object,{apply:Zg,construct:Wg}=typeof Reflect<"u"&&Reflect;Vg||(Vg=function(e){return e}),Hg||(Hg=function(e){return e}),Zg||(Zg=function(e,t,n){return e.apply(t,n)}),Wg||(Wg=function(e,t){return new e(...t)});const qg=lm(Array.prototype.forEach),Yg=lm(Array.prototype.lastIndexOf),Xg=lm(Array.prototype.pop),Kg=lm(Array.prototype.push),Qg=lm(Array.prototype.splice),Jg=lm(String.prototype.toLowerCase),em=lm(String.prototype.toString),tm=lm(String.prototype.match),nm=lm(String.prototype.replace),im=lm(String.prototype.indexOf),rm=lm(String.prototype.trim),am=lm(Object.prototype.hasOwnProperty),sm=lm(RegExp.prototype.test),om=function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Wg(e,n)}}(TypeError);function lm(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Zg(e,t,i)}}function cm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Jg;jg&&jg(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Fg(t)||(t[i]=e),r=e)}e[r]=!0}return e}function um(e){for(let t=0;t<e.length;t++)am(e,t)||(e[t]=null);return e}function hm(e){const t=Gg(null);for(const[n,i]of Pg(e))am(e,n)&&(Array.isArray(i)?t[n]=um(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=hm(i):t[n]=i);return t}function dm(e,t){for(;null!==e;){const n=Ug(e,t);if(n){if(n.get)return lm(n.get);if("function"==typeof n.value)return lm(n.value)}e=Bg(e)}return function(){return null}}const pm=Vg(["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"]),fm=Vg(["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"]),gm=Vg(["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"]),mm=Vg(["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"]),ym=Vg(["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"]),vm=Vg(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bm=Vg(["#text"]),_m=Vg(["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"]),xm=Vg(["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"]),wm=Vg(["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"]),Am=Vg(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),km=Hg(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$m=Hg(/<%[\w\W]*|[\w\W]*%>/gm),Em=Hg(/\$\{[\w\W]*/gm),Tm=Hg(/^data-[\-\w.\u00B7-\uFFFF]+$/),Sm=Hg(/^aria-[\-\w]+$/),Mm=Hg(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Om=Hg(/^(?:\w+script|data):/i),Cm=Hg(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dm=Hg(/^html$/i),zm=Hg(/^[a-z][.\w]*(-[.\w]+)+$/i);var Lm=Object.freeze({__proto__:null,ARIA_ATTR:Sm,ATTR_WHITESPACE:Cm,CUSTOM_ELEMENT:zm,DATA_ATTR:Tm,DOCTYPE_NAME:Dm,ERB_EXPR:$m,IS_ALLOWED_URI:Mm,IS_SCRIPT_OR_DATA:Om,MUSTACHE_EXPR:km,TMPLIT_EXPR:Em});var Nm=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.6",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,a=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,g=c.prototype,m=dm(g,"cloneNode"),y=dm(g,"remove"),v=dm(g,"nextSibling"),b=dm(g,"childNodes"),_=dm(g,"parentNode");if("function"==typeof o){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let x,w="";const{implementation:A,createNodeIterator:k,createDocumentFragment:$,getElementsByTagName:E}=i,{importNode:T}=r;let S={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Pg&&"function"==typeof _&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:O,TMPLIT_EXPR:C,DATA_ATTR:D,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:I}=Lm;let{IS_ALLOWED_URI:R}=Lm,P=null;const j=cm({},[...pm,...fm,...gm,...ym,...bm]);let F=null;const B=cm({},[..._m,...xm,...wm,...Am]);let U=Object.seal(Gg(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}})),V=null,H=null,G=!0,Z=!0,W=!1,q=!0,Y=!1,X=!0,K=!1,Q=!1,J=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,ae=!0,se=!1,oe={},le=null;const ce=cm({},["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 he=cm({},["audio","video","img","source","image","track"]);let de=null;const pe=cm({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let ye=me,ve=!1,be=null;const _e=cm({},[fe,ge,me],em);let xe=cm({},["mi","mo","mn","ms","mtext"]),we=cm({},["annotation-xml"]);const Ae=cm({},["title","style","font","a","script"]);let ke=null;const $e=["application/xhtml+xml","text/html"];let Ee=null,Te=null;const Se=i.createElement("form"),Me=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if((!e||"object"!=typeof e)&&(e={}),e=hm(e),ke=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===ke?em:Jg,P=am(e,"ALLOWED_TAGS")?cm({},e.ALLOWED_TAGS,Ee):j,F=am(e,"ALLOWED_ATTR")?cm({},e.ALLOWED_ATTR,Ee):B,be=am(e,"ALLOWED_NAMESPACES")?cm({},e.ALLOWED_NAMESPACES,em):_e,de=am(e,"ADD_URI_SAFE_ATTR")?cm(hm(pe),e.ADD_URI_SAFE_ATTR,Ee):pe,ue=am(e,"ADD_DATA_URI_TAGS")?cm(hm(he),e.ADD_DATA_URI_TAGS,Ee):he,le=am(e,"FORBID_CONTENTS")?cm({},e.FORBID_CONTENTS,Ee):ce,V=am(e,"FORBID_TAGS")?cm({},e.FORBID_TAGS,Ee):hm({}),H=am(e,"FORBID_ATTR")?cm({},e.FORBID_ATTR,Ee):hm({}),oe=!!am(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,Z=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=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,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||Mm,ye=e.NAMESPACE||me,xe=e.MATHML_TEXT_INTEGRATION_POINTS||xe,we=e.HTML_INTEGRATION_POINTS||we,U=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Me(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Me(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),Y&&(Z=!1),te&&(ee=!0),oe&&(P=cm({},bm),F=[],!0===oe.html&&(cm(P,pm),cm(F,_m)),!0===oe.svg&&(cm(P,fm),cm(F,xm),cm(F,Am)),!0===oe.svgFilters&&(cm(P,gm),cm(F,xm),cm(F,Am)),!0===oe.mathMl&&(cm(P,ym),cm(F,wm),cm(F,Am))),e.ADD_TAGS&&(P===j&&(P=hm(P)),cm(P,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(F===B&&(F=hm(F)),cm(F,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&cm(de,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=hm(le)),cm(le,e.FORBID_CONTENTS,Ee)),ae&&(P["#text"]=!0),K&&cm(P,["html","head","body"]),P.table&&(cm(P,["tbody"]),delete V.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw om('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw om('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(f,a)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Vg&&Vg(e),Te=e}},Ce=cm({},[...fm,...gm,...mm]),De=cm({},[...ym,...vm]),ze=function(e){Kg(n.removed,{element:e});try{_(e).removeChild(e)}catch{y(e)}},Le=function(e,t){try{Kg(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Kg(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{ze(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Ne=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=tm(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ke&&ye===me&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=x?x.createHTML(e):e;if(ye===me)try{t=(new p).parseFromString(r,ke)}catch{}if(!t||!t.documentElement){t=A.createDocument(ye,"template",null);try{t.documentElement.innerHTML=ve?w:r}catch{}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),ye===me?E.call(t,K?"html":"body")[0]:K?t.documentElement:a},Ie=function(e){return k.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof h)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Pe=function(e){return"function"==typeof l&&e instanceof l};function je(e,t,i){qg(e,e=>{e.call(n,t,i,Te)})}const Fe=function(e){let t=null;if(je(S.beforeSanitizeElements,e,null),Re(e))return ze(e),!0;const i=Ee(e.nodeName);if(je(S.uponSanitizeElement,e,{tagName:i,allowedTags:P}),X&&e.hasChildNodes()&&!Pe(e.firstElementChild)&&sm(/<[/\w!]/g,e.innerHTML)&&sm(/<[/\w!]/g,e.textContent)||7===e.nodeType||X&&8===e.nodeType&&sm(/<[/\w]/g,e.data))return ze(e),!0;if(!P[i]||V[i]){if(!V[i]&&Ue(i)&&(U.tagNameCheck instanceof RegExp&&sm(U.tagNameCheck,i)||U.tagNameCheck instanceof Function&&U.tagNameCheck(i)))return!1;if(ae&&!le[i]){const t=_(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t)for(let i=n.length-1;i>=0;--i){const r=m(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,v(e))}}return ze(e),!0}return e instanceof c&&!function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:ye,tagName:"template"});const n=Jg(e.tagName),i=Jg(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===me?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||xe[i]):!!Ce[n]:e.namespaceURI===fe?t.namespaceURI===me?"math"===n:t.namespaceURI===ge?"math"===n&&we[i]:!!De[n]:e.namespaceURI===me?!(t.namespaceURI===ge&&!we[i]||t.namespaceURI===fe&&!xe[i])&&!De[n]&&(Ae[n]||!Ce[n]):!("application/xhtml+xml"!==ke||!be[e.namespaceURI]))}(e)||("noscript"===i||"noembed"===i||"noframes"===i)&&sm(/<\/no(script|embed|frames)/i,e.innerHTML)?(ze(e),!0):(Y&&3===e.nodeType&&(t=e.textContent,qg([M,O,C],e=>{t=nm(t,e," ")}),e.textContent!==t&&(Kg(n.removed,{element:e.cloneNode()}),e.textContent=t)),je(S.afterSanitizeElements,e,null),!1)},Be=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in Se))return!1;if((!Z||H[t]||!sm(D,t))&&(!G||!sm(z,t)))if(!F[t]||H[t]){if(!(Ue(e)&&(U.tagNameCheck instanceof RegExp&&sm(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&sm(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&sm(U.tagNameCheck,n)||U.tagNameCheck instanceof Function&&U.tagNameCheck(n))))return!1}else if(!de[t]&&!sm(R,nm(n,N,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==im(n,"data:")||!ue[e])&&(!W||sm(L,nm(n,N,"")))&&n)return!1;return!0},Ue=function(e){return"annotation-xml"!==e&&tm(e,I)},Ve=function(e){je(S.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let r=t.length;for(;r--;){const a=t[r],{name:s,namespaceURI:o,value:l}=a,c=Ee(s),u=l;let h="value"===s?u:rm(u);if(i.attrName=c,i.attrValue=h,i.keepAttr=!0,i.forceKeepAttr=void 0,je(S.uponSanitizeAttribute,e,i),h=i.attrValue,re&&("id"===c||"name"===c)&&(Le(s,e),h="user-content-"+h),X&&sm(/((--!?|])>)|<\/(style|title)/i,h)){Le(s,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Le(s,e);continue}if(!q&&sm(/\/>/i,h)){Le(s,e);continue}Y&&qg([M,O,C],e=>{h=nm(h,e," ")});const d=Ee(e.nodeName);if(Be(d,c,h)){if(x&&"object"==typeof f&&"function"==typeof f.getAttributeType&&!o)switch(f.getAttributeType(d,c)){case"TrustedHTML":h=x.createHTML(h);break;case"TrustedScriptURL":h=x.createScriptURL(h)}if(h!==u)try{o?e.setAttributeNS(o,s,h):e.setAttribute(s,h),Re(e)?ze(e):Xg(n.removed)}catch{Le(s,e)}}else Le(s,e)}je(S.afterSanitizeAttributes,e,null)},He=function e(t){let n=null;const i=Ie(t);for(je(S.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)je(S.uponSanitizeShadowNode,n,null),Fe(n),Ve(n),n.content instanceof s&&e(n.content);je(S.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,o=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Pe(e)){if("function"!=typeof e.toString)throw om("toString is not a function");if("string"!=typeof(e=e.toString()))throw om("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||Oe(t),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ee(e.nodeName);if(!P[t]||V[t])throw om("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=Ne("\x3c!----\x3e"),a=i.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!ee&&!Y&&!K&&-1===e.indexOf("<"))return x&&ne?x.createHTML(e):e;if(i=Ne(e),!i)return ee?null:ne?w:""}i&&J&&ze(i.firstChild);const u=Ie(se?e:i);for(;o=u.nextNode();)Fe(o),Ve(o),o.content instanceof s&&He(o.content);if(se)return e;if(ee){if(te)for(c=$.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(F.shadowroot||F.shadowrootmode)&&(c=T.call(r,c,!0)),c}let h=K?i.outerHTML:i.innerHTML;return K&&P["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&sm(Dm,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),Y&&qg([M,O,C],e=>{h=nm(h,e," ")}),x&&ne?x.createHTML(h):h},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Te=null,Q=!1},n.isValidAttribute=function(e,t,n){Te||Oe({});const i=Ee(e),r=Ee(t);return Be(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Kg(S[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Yg(S[e],t);return-1===n?void 0:Qg(S[e],n,1)[0]}return Xg(S[e])},n.removeHooks=function(e){S[e]=[]},n.removeAllHooks=function(){S={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const Im=e=>Nm.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Rm=e=>Nm.sanitize(e,{ALLOWED_TAGS:[]}),Pm=class e extends Rg{constructor(){super(...arguments),this.type="toolbar",this.renderType=D.HTML}init(){const e=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(C.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",e)}),this.services.events.addEventListener(C.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",e)})}render(e=!0){const t=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(uc(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 i=t.selectAll("div.toolbar-control").data(e,e=>e.id);i.exit().remove();const r=i.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),a=this;r.merge(i).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\ttype="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-${Rm(e.id)}`)}" aria-label="${Rm(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=>Nm.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){wu(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"),wu(this).select("button").on("mouseover focus",function(t){const n=wu(this);n.classed("hovered",!0),a.services.events.dispatchEvent(C.Toolbar.SHOW_TOOLTIP,{event:t,hoveredElement:n,content:e.title,noWrap:!0,placements:["top","bottom"]})}).on("mouseout blur",function(){a.services.events.dispatchEvent(C.Toolbar.HIDE_TOOLTIP)}).on("click",t=>{e.shouldBeDisabled()||a.triggerFunctionAndEvent(e,t,this)}).on("keydown",n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),a.triggerFunctionAndEvent(e,n,this)):n.key&&"ArrowLeft"===n.key?a.focusOnPreviousEnabledToolbarItem(t):n.key&&"ArrowRight"===n.key&&a.focusOnNextEnabledToolbarItem(t)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:e}=this.getControlConfigs(),t=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(e,e=>uc(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("type","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),wu(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",e).classed("cds--overflow-menu--open",e)),e?this.services.events.dispatchEvent(C.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(C.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(e){const t=this.getToolbarButtonItems();let n=t.length;for(let i=e-1;i>=0;i--)if(!t[i].shouldBeDisabled()){n=i;break}if(n<t.length){const e=wu(`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 i=e+1;i<t.length;i++)if(!t[i].shouldBeDisabled()){n=i;break}if(n>-1){const e=wu(`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 i=e-1;i>=0;i--)if(!t[i].shouldBeDisabled()){n=i;break}if(n<t.length){const e=wu(`#${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 i=e+1;i<t.length;i++)if(!t[i].shouldBeDisabled()){n=i;break}if(n>-1){const e=wu(`#${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,i)=>{const r=wu(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==r&&(r.on("click",()=>{t.triggerFunctionAndEvent(n,e,r.node()),t.updateOverflowMenu(!1)}),r.on("keydown",a=>{a&&"Enter"===a.key?t.triggerFunctionAndEvent(n,e,r.node()):a&&"ArrowUp"===a.key?t.focusOnPreviousEnabledMenuItem(i):a&&"ArrowDown"===a.key?t.focusOnNextEnabledMenuItem(i):a&&"Escape"===a.key&&t.updateOverflowMenu(!1),a.preventDefault()}))}),t.focusOnNextEnabledMenuItem(-1)}e&&e.stopImmediatePropagation()}triggerFunctionAndEvent(e,t,n){"function"==typeof e.shouldBeDisabled&&e.shouldBeDisabled()||("function"==typeof e.clickFunction&&e.clickFunction(t),this.services.events.dispatchEvent(C.Toolbar.BUTTON_CLICK,{control:e,event:t,element:n}))}getControlConfigs(){const t=uc(this.getOptions(),"toolbar","numberOfIcons")-1,n=uc(this.getOptions(),"toolbar","controls"),i=[],r=[],a=[];return n.forEach(n=>{let s=null;if(n.type===K.CUSTOM)null===uc(n,"id")&&(n.id="toolbar-button-"+e.buttonID++),null===uc(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),s=n;else{const e=this.services.domUtils.isFullScreenMode();n.type===K.MAKE_FULLSCREEN&&e?n.type=K.EXIT_FULLSCREEN:n.type===K.EXIT_FULLSCREEN&&!e&&(n.type=K.MAKE_FULLSCREEN),s=this.getControlConfigByType(n.type)}s&&(s.text=n.text?n.text:n.type,-1!==s.id.indexOf("toolbar-export")?i.push(s):r.length<t?null===uc(s,"iconSVG","content")?a.push(s):r.push(s):a.push(s))}),a.push(...i),a.length?{buttonList:r,overflowMenuItemList:a}:{buttonList:r}}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}=uc(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(),i=this.model.getOptions(),{exportAsCSV:r,exportAsJPG:a,exportAsPNG:s,zoomIn:o,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:h,showAsTable:d}=uc(i,"locale","translations","toolbar");let p;switch(e){case K.ZOOM_IN:t&&(p={id:"toolbar-zoomIn",title:o,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomIn()});break;case K.ZOOM_OUT:t&&(p={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.zoomOut()});break;case K.RESET_ZOOM:t&&(p={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case K.MAKE_FULLSCREEN:p={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case K.EXIT_FULLSCREEN:p={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(e),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case K.SHOW_AS_DATATABLE:p={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(e)},title:d,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(C.Modal.SHOW)};break;case K.EXPORT_CSV:p={id:"toolbar-export-CSV",title:r,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.model.exportToCSV()};break;case K.EXPORT_PNG:p={id:"toolbar-export-PNG",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case K.EXPORT_JPG:p={id:"toolbar-export-JPG",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(e)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+e)}return p}getControlIconByType(e){switch(e){case K.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 K.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 K.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 K.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 K.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 K.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 K.EXPORT_CSV:case K.EXPORT_JPG:case K.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)}}};Pm.buttonID=0;let jm=Pm;const Fm=class e extends Rg{constructor(t,n,i,r){super(t,n,r),this.type="layout",this.configs=r,this.children=i,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=uc(e,"growth");return t===G.PREFERRED||t===G.FIXED}).each(function(e){t+=e.size}),t}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(e=>uc(e,"growth")===G.STRETCH).size()}render(e=!0){const t=this.model.getOptions(),n=this.parent,{width:i,height:r}=Lp.getHTMLElementSize(n.node()),a=this.configs.direction===H.ROW||this.configs.direction===H.ROW_REVERSE,s=uc(this.model.getOptions(),"style","prefix"),o=n.classed(`${ol}--${s}--layout-row`,this.configs.direction===H.ROW).classed(`${ol}--${s}--layout-row-reverse`,this.configs.direction===H.ROW_REVERSE).classed(`${ol}--${s}--layout-column`,this.configs.direction===H.COLUMN).classed(`${ol}--${s}--layout-column-reverse`,this.configs.direction===H.COLUMN_REVERSE).classed(`${ol}--${s}--layout-alignitems-center`,this.configs.alignItems===Z.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,e=>e.id);o.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(i=>{const r=wu(this),a=uc(n,"renderType")===D.SVG;i.setParent(a?Lp.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r),a&&!r.select("svg.layout-svg-wrapper").attr("aria-label")&&r.select("svg.layout-svg-wrapper").attr("aria-label",t?.accessibility?.svgAriaLabel||t?.title);const s=uc(n,"growth");(s===G.PREFERRED||s===G.FIXED)&&i.render(e)})}),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(e){const t=uc(e,"growth"),n=uc(e,"renderType")===D.SVG?Lp.getSVGElementSize(wu(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Lp.getHTMLElementSize(this);if(t===G.PREFERRED){const t=a?n.width:n.height,s=a?i:r;e.size=t/s*100}}),o.exit().remove(),this.children.filter(e=>uc(e,"growth")===G.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);a?l.style("width",e=>e.size/100*i+"px").style("height","100%"):l.style("height",e=>e.size/100*r+"px").style("width","100%"),l.each(function(t){t.components.forEach(n=>{uc(t,"growth")===G.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())})}};Fm.instanceID=Math.floor(99999999999*Math.random());let Bm=Fm;class Um extends Rg{constructor(){super(...arguments),this.type="spacer"}render(e=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||bl}px`).style("height",`${this.configs.size||bl}px`).attr("opacity",0)}}class Vm extends Rg{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(C.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(C.Modal.SHOW,this.handleShowModal)}getModalHTML(){const e=this.services.domUtils.getChartID(),t=this.model.getOptions(),{title:n,downloadAsCSV:i}=uc(t,"locale","translations","tabularRep"),r=uc(t,"style","prefix"),a=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">${Rm(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${xn(a,0).map(e=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${Rm(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>${a.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>${Rm(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="${ol}--${r}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>\n\t\t\t</div>\n\t\t</div>`}render(e=!1){const t=this.model.getOptions();if(!this.isEventListenerAdded){const e=wu(this.services.domUtils.getHolder()),n=uc(t,"style","prefix");this.modal=Lp.appendOrSelect(e,`div.${ol}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Hm extends Rg{constructor(){super(...arguments),this.type="title",this.renderType=D.HTML}render(e=!1){const t=this.getComponentContainer(),n=uc(this.getOptions(),"title"),i=t.selectAll("p.title").data([n]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(e=>Rm(e)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const e=this;i.on("mouseover",function(t){e.services.events.dispatchEvent(C.Tooltip.SHOW,{event:t,hoveredElement:i,content:i.text()})}).on("mousemove",function(t){e.services.events.dispatchEvent(C.Tooltip.MOVE,{event:t})}).on("mouseout",function(){e.services.events.dispatchEvent(C.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(e,t){if(t<=0)return;const n=e.text();if(e.node().getComputedTextLength()>t){e.append("tspan").text("...");const i=Lp.appendOrSelect(e,"tspan").node().getComputedTextLength(),r=e.text(),a=this.getSubstringIndex(e.node(),0,r.length-1,t-i);e.html(r.substring(0,a-1)).append("tspan").text("...");const s=this;e.on("mouseover",function(t){s.services.events.dispatchEvent(C.Tooltip.SHOW,{event:t,hoveredElement:e,content:n})}).on("mousemove",function(e){s.services.events.dispatchEvent(C.Tooltip.MOVE,{event:e})}).on("mouseout",function(){s.services.events.dispatchEvent(C.Tooltip.HIDE)})}}getMaxTitleWidth(){return Lp.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(e,t,n,i){const r=Math.floor((n+t)/2);return e.getSubStringLength(0,r)>i?this.getSubstringIndex(e,t,r,i):e.getSubStringLength(0,r)<i?e.getSubStringLength(0,r+1)>i?r:this.getSubstringIndex(e,r,n,i):r}}class Gm extends Rg{constructor(){super(...arguments),this.type="legend",this.renderType=D.HTML}render(e=!1){const t=this.getOptions(),n=uc(t,"legend"),i=uc(n,"alignment"),r=uc(t,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:s}=ml.items.status,o=a.some(e=>e.status===s),l=uc(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===B.CENTER).classed("right-aligned",i===B.RIGHT).classed(r||"horizontal",!0).classed("has-deactivated-items",o).attr("role",Zc.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));const u=c.selectAll("div.legend-item").data(a,e=>e.name),h=u.enter().append("div").attr("class","legend-item");h.merge(c.selectAll("div.legend-item")).classed("active",function(e){return e.status===ml.items.status.ACTIVE});const d=uc(this.getOptions(),"legend","clickable");c.classed("clickable",d&&a.length>1);const p=ml.checkbox.radius,f=h.append("div").classed("checkbox",!0),g=f.merge(u.select("div.checkbox")).attr("role",Zc.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-labelledby",(e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${t}-title`)).attr("aria-checked",({status:e})=>e===ml.items.status.ACTIVE).attr("width",2*p).attr("height",2*p).attr("class",e=>this.model.getColorClassName({classNameTypes:[L.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})).style("background",e=>e.status===ml.items.status.ACTIVE?this.model.getFillColor(e.name)||this.model.getStrokeColor(e.name):null).classed("active",function(e){return e.status===ml.items.status.ACTIVE});f.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"),h.append("p").merge(u.select("p"));const m=uc(t,"legend","additionalItems");if(m&&a.length){const e=this,t=c.selectAll("div.additional-item").data(m);t.exit().remove();const n=t.enter().append("div").merge(t).classed("legend-item",!0).classed("additional",!0).attr("role","img").attr("aria-labelledby",(e,t)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${g.size()+t}-title`));n.selectAll("*").remove();let i,r=1;n.append("svg").classed("icon",!0).each(function(t){const n=wu(this);i&&i==t.type?r++:(i=t.type,r=1),e.addAdditionalItem(n,t,r)}),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&h.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:i,height:r}=ml.area;if(t.type===J.RADIUS?e.style("width",`${r}px`).style("height",`${r}px`):e.style("width",`${i}px`).style("height",`${r}px`),t.type===J.RADIUS){const{iconData:n,fill:i,stroke:r}=ml.radius;e.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",Zc.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:i).style("stroke",t.stroke?t.stroke:r)}else if(t.type===J.LINE){const r=ml.line;e.select("line.line").empty()&&e.append("line").classed(`line-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","line").attr("x1",0).attr("y1",r.yPosition).attr("x2",i).attr("y2",r.yPosition).style("stroke",t.stroke?t.stroke:r.stroke).style("stroke-width",r.strokeWidth)}else if(t.type===J.AREA)e.select("rect.area").empty()&&e.append("rect").classed(`area-${n}`,!0).attr("role",Zc.IMG).attr("aria-label","area").attr("width",i).attr("height",r).style("fill",n>3&&!t.fill?ml.area.fill:t.fill).style("stroke",t.stroke);else if(t.type===J.SIZE){const{iconData:n,fill:i,stroke:r}=ml.size;e.attr("fill","none").attr("role",Zc.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:i).style("stroke",t.stroke?t.stroke:r).style("stroke-width",1)}else if(t.type===J.QUARTILE){const{iconData:t}=ml.quartile;e.selectAll("rect").attr("role",Zc.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===J.ZOOM){const{iconData:n,color:i}=uc(ml,"zoom"),r=e.attr("role",Zc.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();r.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:i),r.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:i)}}truncateLegendText(){const e=this.getComponentContainer(),t=uc(this.getOptions(),"legend","truncation"),n=uc(t,"type"),i=uc(t,"threshold"),r=uc(t,"numCharacter"),a=e.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),n!==R.NONE?a.html(function(e){const t=Rm(e.name);return t.length>i&&t.length!==r?lc(t,n,r):t}):a.html(e=>Rm(e.name))}addEventListeners(){const e=this,t=this.getComponentContainer(),n=this.getOptions(),i=uc(n,"legend"),r=uc(i,"truncation");t.selectAll("div.legend-item").on("mouseover",function(t){e.services.events.dispatchEvent(C.Legend.ITEM_HOVER,{hoveredElement:wu(this)});const n=wu(this);n.select("div.checkbox").classed("hovered",!0);const i=n.datum();i.name.length>r.threshold&&r.numCharacter<i.name.length&&r.type!==R.NONE&&e.services.events.dispatchEvent(C.Tooltip.SHOW,{event:t,hoveredElement:n,content:i.name})}).on("mousemove",function(t){wu(this).datum().name.length>r.threshold&&r.type!==R.NONE&&e.services.events.dispatchEvent(C.Tooltip.MOVE,{event:t})}).on("click",function(){e.services.events.dispatchEvent(C.Legend.ITEM_CLICK,{clickedElement:wu(this)});const t=wu(this).datum();e.model.toggleDataLabel(t.name)}).on("mouseout",function(){const t=wu(this);t.select("div.checkbox").classed("hovered",!1),t.datum().name.length>r.threshold&&r.type!==R.NONE&&e.services.events.dispatchEvent(C.Tooltip.HIDE),e.services.events.dispatchEvent(C.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(C.Legend.ITEM_HOVER,{hoveredElement:wu(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(C.Legend.ITEM_MOUSEOUT,{hoveredElement:wu(this)})}),t.selectAll("g.additional-item").on("mouseover",function(t){const n=wu(this),i=n.datum();i.name.length>r.threshold&&e.services.events.dispatchEvent(C.Tooltip.SHOW,{event:t,hoveredElement:n,content:i.name})})}}class Zm extends Rg{constructor(e,t,n){super(e,t,n),this.type="chart-clip",this.renderType=D.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(),i=t.getMainYScale(),[r,a]=n.range(),[s,o]=i.range();if(!e)throw new Error("svg is undefined");this.chartClipPath=Lp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Lp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-r>0&&l.attr("x",r).attr("y",o).attr("width",a-r).attr("height",s-o),this.chartClipPath.merge(l).lower()}}class Wm extends Zm{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}=Lp.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Lp.appendOrSelect(e,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=Lp.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",t).attr("height",n),this.chartClipPath.merge(i).lower()}}var qm,Ym;!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(Ym||(Ym={}));var Xm=((qm={})[Ym.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)}},qm[Ym.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)}},qm[Ym.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)}},qm[Ym.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)}},qm),Km=typeof window<"u"?window:{innerHeight:0,innerWidth:0},Qm=function(){function e(e){void 0===e&&(e={}),this.positions=Xm,this.positions=Object.assign({},Xm,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 i=getComputedStyle(t.offsetParent);"static"===i.position&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(n.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(n.left+=parseInt(i.marginLeft,10))),t=t.offsetParent}var r=e.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:r.top-a.top+n.top,left:r.left-a.left+n.left}},e.prototype.findRelative=function(e,t,n){var i=this.getRelativeOffset(e),r=e.getBoundingClientRect();return this.calculatePosition(i,r,t,n)},e.prototype.findAbsolute=function(e,t,n){var i=this.getAbsoluteOffset(e),r=e.getBoundingClientRect();return this.calculatePosition(i,r,t,n)},e.prototype.findPosition=function(e,t,n,i){void 0===i&&(i=this.getAbsoluteOffset.bind(this));var r=i(e),a=e.getBoundingClientRect();return this.calculatePosition(r,a,t,n)},e.prototype.findPositionAt=function(e,t,n){return this.calculatePosition(e,{top:0,left:0,height:0,width:0},t,n)},e.prototype.getPlacementBox=function(e,t){var n=e.offsetHeight+t.top,i=e.offsetWidth+t.left;return{top:t.top,bottom:n,left:t.left,right:i}},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,i,r){var a=this;void 0===i&&(i=this.defaultContainerFunction.bind(this)),void 0===r&&(r=this.findPosition.bind(this));var s=n.map(function(n){var s=r(e,t,n),o=a.getPlacementBox(t,s),l=0,c=0,u=i();o.top<u.top?l=u.top-o.top:o.bottom>u.height&&(l=o.bottom-u.height),o.left<u.left?c=u.left-o.left:o.right>u.width&&(c=o.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var h=t.offsetHeight*t.offsetWidth;return{placement:n,weight:(h-l*c)/h}});return s.sort(function(e,t){return t.weight-e.weight}),s[0].placement},e.prototype.findBestPlacementAt=function(e,t,n,i){var r=this;return void 0===i&&(i=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,t,n,i,function(t,n,i){return r.findPositionAt(e,n,i)})},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Km.innerHeight,width:Km.innerWidth}},e.prototype.calculatePosition=function(e,t,n,i){return this.positions[i]?this.positions[i](e,n,t):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new Qm;class Jm extends Rg{constructor(e,t,n){super(e,t,n),this.type="tooltip",this.renderType=D.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new Qm,this.handleShowTooltip=e=>{const t=e.detail.data||e.detail.items,n=wu(e.detail.event.target).datum();let i;const r=this.formatItems(this.getItems(e));i=e.detail.content?`<div class="title-tooltip"><p>${Im(e.detail.content)}</p></div>`:Im(this.getTooltipHTML(r));const a=Lp.appendOrSelect(this.tooltip,"div.content-box");if(uc(this.getOptions(),"tooltip","customHTML"))if(e.detail.content){const t=`<div class="title-tooltip"><p>${Im(e.detail.content)}</p></div>`;a.html(t)}else a.html(`<div class="title-tooltip"><p>${Im(this.model.getOptions().tooltip.customHTML(t,i,n))}</p></div>`);else a.html(i);a.selectAll(".datapoint-tooltip").each(function(e,t){const n=r[t];r[t]&&r[t].color&&wu(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(C.Tooltip.MOVE,e=>{this.lastTriggeredEventType!==C.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(e)}),this.services.events.addEventListener(C.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(C.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(C.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(C.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(C.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(C.Tooltip.MOVE,null),this.services.events.removeEventListener(C.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(C.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(C.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(C.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(C.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(e){return e.detail.items?e.detail.items:[]}formatItems(e){const t=this.getOptions(),n=uc(t,"tooltip","truncation","type"),i=uc(t,"tooltip","truncation","threshold"),r=uc(t,"tooltip","truncation","numCharacter");return n!==R.NONE?e.map(e=>{const t=e.labelIcon?12:0;return e.value=this.valueFormatter(e.value,e.label),e.label&&e.label.length+t>i&&(e.label=lc(e.label,n,r)),e.value&&e.value.length>i&&(e.value=lc(e.value,n,r)),e}):e.map(e=>(e.value=this.valueFormatter(e.value,e.label),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(),i=uc(n,"tooltip","valueFormatter"),{code:r,number:a,date:s}=uc(n,"locale");if(i)return i(e,t);if(this.isDate(e))return s(e,r,{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 s(new Date(e),r,{month:"short",day:"numeric",year:"numeric"})}catch{}return a(e,r)}render(e=!1){const t=this.getOptions(),n=uc(t,"tooltip","enabled");if(n){const e=wu(this.services.domUtils.getHolder()),n=uc(t,"style","prefix");this.tooltip=Lp.appendOrSelect(e,`div.${ol}--${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 i=Object.assign({},e);return t==Ym.LEFT?i.left-=n:t==Ym.RIGHT?i.left+=n:t==Ym.TOP?i.top-=n:t==Ym.BOTTOM&&(i.top+=n),i}positionTooltip(e){const t=this.services.domUtils.getHolder(),n=t.offsetWidth,i=t.offsetHeight,r=this.tooltip.node(),a=this.getOptions(),s=uc(a,"zoomBar","top","enabled"),o=!!uc(e,"detail","noWrap"),l=Array.isArray(uc(e,"detail","placements")),c=l?uc(e,"detail","placements"):[Ym.RIGHT,Ym.LEFT,Ym.TOP,Ym.BOTTOM];let u,{horizontalOffset:h}=_l;const{defaultOffset:d}=_l;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",o),l){const t=uc(e,"detail","event","target"),a=this.services.domUtils.getElementOffset(t,!0);u=this.positionService.findBestPlacementAt(a,r,c,()=>({top:0,left:0,width:n,height:i}));let s=this.positionService.findPosition(t,r,u,()=>this.services.domUtils.getElementOffset(t));return s=this.addOffsetByPlacement(s,u,d),void this.positionService.setElement(r,s)}let p=uc(e,"detail","mousePosition");if(p){const e=uc(a,"zoomBar","top","type"),t=wl.height[e];s&&(p[1]+=t+wl.spacerHeight)}else p=La(uc(e,"detail","event"),t);u=p[0]/n>.9?Ym.LEFT:p[0]/n<.1?Ym.RIGHT:this.positionService.findBestPlacementAt({left:p[0],top:p[1]},r,c,()=>({top:void 0,left:void 0,width:n,height:i})),u===Ym.LEFT&&(h*=-1);const f=this.positionService.findPositionAt({left:p[0]+h,top:p[1]},r,u);this.positionService.setElement(r,f)}}const ey=class e extends Rg{constructor(){super(...arguments),this.type="grid-brush",this.renderType=D.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,i=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const r=Lp.appendOrSelect(n,"svg.chart-grid-backdrop"),a=Lp.appendOrSelect(r,`g.${this.type}`),s=Lp.appendOrSelect(a,this.selectionSelector),{width:o,height:l}=Lp.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),h=c.getMainXScale(),[d]=h.range();i.attr("transform",`translate(${d},0)`);const p=Lp.appendOrSelect(i,this.frontSelectionSelector);if(h&&u===j.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 i="0,"+n.toString();const r=Math.floor(l/e.DASH_LENGTH),a=r*e.DASH_LENGTH;for(let t=0;t<r;t++)i+=","+e.DASH_LENGTH;i+=","+(l-a),r%2==1&&(i+=",0"),i+=","+n.toString(),i+=","+l.toString(),p.attr("stroke-dasharray",i)},i=e=>{const t=e.selection;null===t||t[0]===t[1]||(p.attr("x",parseFloat(s.attr("x"))+parseFloat(r.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),n(t))},c=(e,n)=>{const i=Rd().range([0,o]).domain(t);let r=[i.invert(e),i.invert(n)];r[0].valueOf()===r[1].valueOf()&&(r=this.services.zoom.getDefaultZoomBarDomain()),(t[0].valueOf()!==r[0].valueOf()||t[1].valueOf()!==r[1].valueOf())&&this.services.zoom.handleDomainChange(r)};let u;const h=e=>{const t=e.selection;null!==t&&(c(t[0],t[1]),a.call(u.move,null),p.style("display","none"))};0!=l&&0!=o&&(u=eg().extent([[0,0],[o-1,l]]).on("start brush end",i).on("end.brushed",h),a.call(u));const d=this.services.zoom.getZoomRatio();r.on("click",function(e){if(e.shiftKey){const e=this.services.domUtils.getHolder(),t=La(a.node(),e)[0];let n=t-o*d/2;n<0&&(n=0);let i=t+o*d/2;i>o&&(i=o),c(n,i)}})}}};ey.DASH_LENGTH=4;let ty=ey;class ny extends Rg{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=D.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=eg(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(C.ZoomBar.UPDATE,this.render.bind(this));const e=uc(this.getOptions(),"zoomBar",N.TOP,"data");this.model.setZoomBarData(e)}render(e=!0){const t=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(N.TOP),i=this.services.zoom.isZoomBarLocked(N.TOP),r=uc(this.getOptions(),"zoomBar",N.TOP,"type"),a=uc(this.getOptions(),"axes",N.BOTTOM,"highlights"),s=wl.height[r],{width:o}=Lp.getSVGElementSize(this.parent,{useAttrs:!0});if(0===o)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Lp.appendOrSelect(t,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1).attr("role","presentation");if(Lp.appendOrSelect(t,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",wl.spacerHeight).attr("opacity",1).attr("fill","none"),r===I.GRAPH_VIEW?Lp.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",o-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):r===I.SLIDER_VIEW&&Lp.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",o-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,o);const{cartesianScales:h}=this.services,d=h.getMainXScale(),p=h.getMainYScale(),f=h.getMainXScaleType();if(d&&f===j.TIME){let e=this.services.zoom.getZoomBarData();if(function(e){if(null==e)return!0;if(wt(e)&&(Ie(e)||"string"==typeof e||"function"==typeof e.splice||zt(e)||Bt(e)||Mt(e)))return!e.length;var t=si(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(kt(e))return!Wt(e).length;for(var n in e)if(Yi.call(e,n))return!1;return!0}(e)||1===e.length)return;this.xScale=d.copy(),this.yScale=p.copy();const n=this.services.zoom.getDefaultZoomBarDomain(e);e=this.compensateDataForDefaultDomain(e,n);const c=this.model.get("initialZoomDomain"),h=uc(this.getOptions(),"zoomBar",N.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||c&&c[0].valueOf()===h[0].valueOf()&&c[1].valueOf()===h[1].valueOf()?null===h&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:Xi([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Xi([],h),zoomDomain:h?Xi([],h):n},{skipUpdate:!0}),this.xScale.range([l,o]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(sr(e,e=>e.value));const f=this.model.get("zoomDomain");if(r===I.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,o),a)){const e=a.highlightStartMapsTo,t=a.highlightEndMapsTo,n=a.color,i=a.labelMapsTo;a.data.forEach((r,a)=>{Lp.appendOrSelect(u,`rect.highlight-${a}`).attr("height",s-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(r[e])).attr("width",this.xScale(r[t])-this.xScale(r[e])).style("fill",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(f,l,o);const g=Lp.appendOrSelect(t,this.brushSelector).call(this.brush);if(void 0!==f)if(f[0].valueOf()===f[1].valueOf())g.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const e=f.map(e=>this.xScale(e));e[1]-e[0]<this.MIN_SELECTION_DIFF||(g.call(this.brush.move,e),this.updateBrushHandle(this.getComponentContainer(),e))}i&&(this.brush.filter(()=>!1),g.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(e,t,n){const i=uc(this.getOptions(),"zoomBar",N.TOP,"type"),r=wl.height[i];this.brush.extent([[t,0],[n,r]]).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,i){const r=[n.invert(i[0]),n.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),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]!==r[0]||t[1]!==r[1])&&this.services.zoom.handleDomainChange(r,{dispatchEvent:!1}),"start"===e.type?n=C.ZoomBar.SELECTION_START:"brush"===e.type?n=C.ZoomBar.SELECTION_IN_PROGRESS:"end"===e.type&&(n=C.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(C.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(n,{selection:i,newDomain:r})}}updateBrushHandle(e,t){const n=this,i=wl.handleWidth,r=uc(this.getOptions(),"zoomBar",N.TOP,"type"),a=wl.height[r],s=-i/2,o=wl.handleBarWidth,l=r===I.GRAPH_VIEW?wl.handleBarHeight:6,c=-o/2,u=(a-l)/2;e.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(e){return"w"===e.type?Math.max(t[0]+s,n.maxSelectionRange[0]):"e"===e.type?Math.min(t[1]+s,n.maxSelectionRange[1]-i):void 0}).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);const h=e.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",function(e){return"handle-bar handle-bar--"+e.type}),h.attr("x",function(e){return"w"===e.type?Math.max(t[0]+c,n.maxSelectionRange[0]-s+c):"e"===e.type?Math.min(t[1]+c,n.maxSelectionRange[1]+s+c):void 0}).attr("y",u).attr("width",o).attr("height",l).attr("cursor","ew-resize"),r===I.SLIDER_VIEW&&this.updateSliderSelectedArea(t),this.updateClipPath(e,this.clipId,t[0],0,t[1]-t[0],a)}updateSliderSelectedArea(e){const t=uc(this.getOptions(),"zoomBar",N.TOP,"type"),n=wl.height[t],i=this.getComponentContainer().select("svg.zoom-container");Lp.appendOrSelect(i,"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,i){const{cartesianScales:r}=this.services,a=r.getMainXAxisPosition(),s=r.getMainYAxisPosition(),o=r.getMainXScaleType(),l=r.getMainYScaleType(),c=(e,t,n)=>i=>r.getValueFromScale(e,t,n,i),u=c(this.xScale,o,a),h=c(this.yScale,l,s),d=uc(this.getOptions(),"zoomBar",N.TOP,"type"),p=wl.height[d],f=Ng().x(e=>u(e)).y0(p).y1(e=>p-h(e)),g=Lp.appendOrSelect(e,t).datum(n).attr("d",f);i&&g.attr("clip-path",`url(#${i})`)}updateClipPath(e,t,n,i,r,a){const s=Lp.appendOrSelect(e,"clipPath").attr("id",t);Lp.appendOrSelect(s,"rect").attr("x",n).attr("y",i).attr("width",r).attr("height",a)}compensateDataForDefaultDomain(e,t){if(!e||e.length<2)return;const n=ki(e),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier();if(Number(t[0])<Number(n[0][i])){const e={};e[i]=t[0],e[r]=0,n.unshift(e)}if(Number(t[1])>Number(n[n.length-1][i])){const e={};e[i]=t[1],e[r]=0,n.push(e)}return n}renderZoomBarBaseline(e,t,n,i=!1){const r=uc(this.model.getOptions(),"zoomBar",N.TOP,"type"),a=wl.height[r],s=Lg()([[t,a],[n,a]]);Lp.appendOrSelect(e,"path.zoom-bg-baseline").attr("d",s).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`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),Lp.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),uc(this.getOptions(),"zoomBar",N.TOP,"type")===I.GRAPH_VIEW&&this.renderZoomBarBaseline(e,t,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(C.ZoomBar.UPDATE,this.render.bind(this))}}class iy extends Rg{constructor(e,t){super(e,t),this.type="threshold",this.renderType=D.SVG,this.positionService=new Qm}render(e=!1){const t=uc(this.getOptions(),"axes"),n=[];Object.keys(t).forEach(e=>{if(Object.values(N).includes(e)){const i=t[e];i.thresholds&&i.thresholds.length>0&&n.push({axisPosition:e,thresholds:i.thresholds,correspondingDatasets:i?.correspondingDatasets,mapsTo:i?.mapsTo})}});const i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,e=>e.axisPosition);i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",e=>`axis-thresholds ${e.axisPosition}`);const a=r.selectAll("g.threshold-group").data(e=>e.thresholds.map(t=>(t.axisPosition=e.axisPosition,t.datum=this.constructDatumObj(e,t),t)));a.exit().attr("opacity",0).remove();const s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");const o=this;r.each(function({axisPosition:t}){const n=o.services.cartesianScales.getScaleByPosition(t),i=o.services.cartesianScales.getScaleTypeByPosition(t);let r=null,a=null;t===N.LEFT||t===N.RIGHT?(a=n,r=o.services.cartesianScales.getMainXScale()):(r=n,a=o.services.cartesianScales.getMainYScale());const s=i===j.LABELS,[l,c]=r.range(),[u,h]=a.range(),{cartesianScales:d}=o.services,p=d.getOrientation(),[f,g]=dc(e=>d.getDomainValue(e),e=>d.getRangeValue(e),p),m=wu(this);t===N.TOP||t===N.BOTTOM?(m.selectAll("line.threshold-line").transition().call(t=>o.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e})).attr("y1",h).attr("y2",u).attr("x1",({datum:e})=>f(e)+(s?n.step()/2:0)).attr("x2",({datum:e})=>f(e)+(s?n.step()/2:0)).style("stroke",({fillColor:e})=>e),m.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:e})=>-f(e)).attr("width",Math.abs(u-h)).classed("rotate",!0)):(m.selectAll("line.threshold-line").transition().call(t=>o.services.transitions.setupTransition({transition:t,name:"threshold-line-update",animate:e})).attr("x1",l).attr("x2",c).attr("y1",({datum:e})=>g(e)+(s?n.step()/2:0)).attr("y2",({datum:e})=>g(e)+(s?n.step()/2:0)).style("stroke",({fillColor:e})=>e),m.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",({datum:e})=>g(e)).attr("width",Math.abs(c-l)).classed("rotate",!1))}),this.services.events.addEventListener(C.Threshold.SHOW,e=>{this.setThresholdLabelPosition(e.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(C.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(e){const{value:t,axisPosition:n}=e,i=this.getOptions(),r=this.services.cartesianScales.getScaleTypeByPosition(n),{code:a,number:s}=uc(i,"locale");if(r===j.TIME){const e=[N.LEFT,N.RIGHT].includes(n),r=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=e?a:r,o=uc(i,"timeScale"),l=Uc(s.ticks(),uc(o,"timeInterval"));return Fc(t,0,s.ticks(),l,o,i.locale)}return s(t,a)}appendThresholdLabel(){const e=wu(this.services.domUtils.getHolder()),t=uc(this.getOptions(),"style","prefix");this.label=Lp.appendOrSelect(e,`div.${ol}--${t}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:e,datum:t}){const n=this.services.domUtils.getHolder(),i=La(e,n),r=t.valueFormatter?t.valueFormatter(t.value):this.getFormattedValue(t);this.label.html(Rm(`${t.label||"Threshold"}: ${r}`)).style("background-color",t.fillColor);const a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[Ym.RIGHT,Ym.LEFT,Ym.TOP,Ym.BOTTOM],()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight})),o=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,o)}constructDatumObj(e,t){const n={};return e.correspondingDatasets&&(n.group=uc(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){wu(this.parentNode).select("line.threshold-line").classed("active",!0),e.services.events.dispatchEvent(C.Threshold.SHOW,{event:t,hoveredElement:wu(this),datum:wu(this).datum()})}).on("mouseout",function(t){wu(this.parentNode).select("line.threshold-line").classed("active",!1),e.services.events.dispatchEvent(C.Threshold.HIDE,{event:t,hoveredElement:wu(this),datum:wu(this).datum()})})}}class ry extends Rg{constructor(e,t){super(e,t),this.type="highlight",this.renderType=D.SVG,this.positionService=new Qm,this.highlightStrokeWidth=1}render(e=!1){const t=uc(this.getOptions(),"axes"),n=[];Object.keys(t).forEach(e=>{if(Object.values(N).includes(e)){const i=t[e];i.highlights&&i.highlights.data.length>0&&n.push({axisPosition:e,highlightStartMapsTo:i.highlights.highlightStartMapsTo,highlightEndMapsTo:i.highlights.highlightEndMapsTo,labelMapsTo:i.highlights.labelMapsTo,highlight:i.highlights.data,color:i.highlights.color})}});const i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(n,e=>e.axisPosition);i.exit().attr("opacity",0).remove();const r=i.enter().append("g").merge(i);r.attr("class",e=>`axis-highlight ${e.axisPosition}`);const a=r.selectAll("g.highlight-group").data(e=>e.highlight.map(t=>(t.axisPosition=e.axisPosition,t.highlightStartMapsTo=e.highlightStartMapsTo,t.labelMapsTo=e.labelMapsTo,t.color=e.color,t.highlightEndMapsTo=e.highlightEndMapsTo,t)));a.exit().attr("opacity",0).remove();const s=a.enter().append("g");s.append("rect").attr("class","highlight-bar"),s.append("line").attr("class","highlight-line"),s.merge(a).attr("class","highlight-group");const o=this;r.each(function({axisPosition:t}){const n=o.services.cartesianScales.getMainXScale(),i=o.services.cartesianScales.getMainYScale(),[r,a]=n.range(),[s,l]=i.range(),{cartesianScales:c}=o.services,u=c.getOrientation(),[h,d]=dc(e=>c.getDomainValue(e),e=>c.getRangeValue(e),u),p=wu(this);t===N.TOP||t===N.BOTTOM?p.selectAll("rect.highlight-bar").transition().call(t=>o.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e})).attr("y",Math.max(l+o.highlightStrokeWidth,0)).attr("height",Math.max(s-2*o.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:e,...t})=>h(t[e])).attr("width",({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(h(n[t])-h(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",o.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null):p.selectAll("rect.highlight-bar").transition().call(t=>o.services.transitions.setupTransition({transition:t,name:"highlight-bar-update",animate:e})).attr("x",r).attr("width",Math.max(a-r,0)).attr("y",({highlightEndMapsTo:e,...t})=>d(t[e])).attr("height",({highlightStartMapsTo:e,highlightEndMapsTo:t,...n})=>Math.max(d(n[e])-d(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",o.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:e,labelMapsTo:t,...n})=>e&&e.scale[n[t]]?e.scale[n[t]]:null)})}}class ay extends Jm{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:i}=this.services,r=i.getDomainIdentifier(),a=i.isDualAxes(),{groupMapsTo:s}=n.data,o=i.getDomainLabel();let l=i.getRangeLabel();const c=t[0][r];let u;if(1===t.length){const r=t[0],h=i.getRangeIdentifier(r);if(a){const e=i.getRangeAxisPosition({datum:r,groups:[r[s]]});l=i.getScaleLabel(e)}const d=r[h];u=[{label:o,value:c},...Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:l,value:r[h]}]],e.detail.additionalItems&&e.detail.additionalItems.forEach(e=>u.push({label:e.label,value:e.value})),u.push({label:xn(n,"locale.translations.group")||xn(n,"tooltip.groupLabel"),value:r[s],color:this.model.getFillColor(r[s]),class:this.model.getColorClassName({classNameTypes:[L.TOOLTIP],dataGroupName:r[s]})})}else if(t.length>1&&(u=[{label:o,value:c}],u=u.concat(t.map(e=>{const t=e[i.getRangeIdentifier(e)];return{label:e[s],value:Array.isArray(t)&&2===t.length?`${t[0]} - ${t[1]}`:t,color:this.model.getFillColor(e[s]),class:this.model.getColorClassName({classNameTypes:[L.TOOLTIP],dataGroupName:e[s]})}}).sort((e,t)=>t.value-e.value)),!a&&!0===uc(n,"tooltip","showTotal"))){const e=i.getRangeIdentifier();u.push({label:xn(n,"locale.translations.total")||xn(n,"tooltip.totalLabel")||"Total",value:t.reduce((t,n)=>t+n[e],0),bold:!0})}return u}}var sy=Math.PI,oy=2*sy,ly=1e-6,cy=oy-ly;function uy(){this._x0=this._y0=this._x1=this._y1=null,this._=""}uy.prototype=function(){return new uy}.prototype={constructor:uy,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,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var a=this._x1,s=this._y1,o=n-e,l=i-t,c=a-e,u=s-t,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>ly)if(Math.abs(u*o-l*c)>ly&&r){var d=n-a,p=i-s,f=o*o+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(h),v=r*Math.tan((sy-Math.acos((f+h-g)/(2*m*y)))/2),b=v/y,_=v/m;Math.abs(b-1)>ly&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*p)+","+(this._x1=e+_*o)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,i,r,a){e=+e,t=+t,a=!!a;var s=(n=+n)*Math.cos(i),o=n*Math.sin(i),l=e+s,c=t+o,u=1^a,h=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>ly||Math.abs(this._y1-c)>ly)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%oy+oy),h>cy?this._+="A"+n+","+n+",0,1,"+u+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>ly&&(this._+="A"+n+","+n+",0,"+ +(h>=sy)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;class hy extends Rg{constructor(){super(...arguments),this.type="grid",this.renderType=D.SVG}render(e=!0){const t=uc(this.getOptions(),"grid","x","enabled"),n=uc(this.getOptions(),"grid","y","enabled");this.drawBackdrop(t,n),(t||n)&&(t&&(Lp.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(e)),n&&(Lp.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(e)))}drawXGrid(e){const t=this.parent,n=this.backdrop.attr("height"),i=$f(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(uc(this.getOptions(),"grid","x","alignWithAxisTicks")){const e=this.services.cartesianScales.getDomainAxisPosition(),t=uc(this.getOptions(),"axes",e,"ticks","values");t&&i.tickValues(t)}else{const e=uc(this.getOptions(),"grid","x","numberOfTicks");i.ticks(e)}const r=t.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);e?r.transition().call(t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e})).call(i):r.call(i),this.cleanGrid(r)}drawYGrid(e){const t=this.parent,n=this.backdrop.attr("width"),i=Ef(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(uc(this.getOptions(),"grid","y","alignWithAxisTicks")){const e=this.services.cartesianScales.getRangeAxisPosition(),t=uc(this.getOptions(),"axes",e,"ticks","values");t&&i.tickValues(t)}else{const e=uc(this.getOptions(),"grid","y","numberOfTicks");i.ticks(e)}const r=t.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);e?r.transition().call(t=>this.services.transitions.setupTransition({transition:t,name:"grid-update",animate:e})).call(i):r.call(i),this.cleanGrid(r)}getGridlineThreshold(e){const t=this.parent,n=t.selectAll(".x.grid .tick").nodes().sort((e,t)=>Number(oc(e).tx)-Number(oc(t).tx));let i=-1;if(!n.length)return;n.forEach(t=>{e[0]>=+oc(t).tx&&i++});const r=i+1<n.length?i+1:n.length,a=n[i],s=n[r];let o;if(a)if(s)o=+oc(s).tx-+oc(a).tx;else{const e=t.select("rect.chart-grid-backdrop").node();o=Lp.getSVGElementSize(e).width-+oc(a).tx}else o=+oc(s).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return o*l}getActiveGridline(e){const t=uc(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(e);return this.parent.selectAll(".x.grid .tick").filter(function(){const n=oc(this),i=Number(n.tx)-t,r=Number(n.tx)+t;return i<=e[0]&&e[0]<=r})}drawBackdrop(e,t){const n=this.parent,i=this.services.cartesianScales.getMainXScale(),r=this.services.cartesianScales.getMainYScale(),[a,s]=i.range(),[o,l]=r.range();this.backdrop=Lp.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Lp.appendOrSelect(this.backdrop,e||t?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",a).attr("y",l).attr("width",Math.abs(s-a)).attr("height",Math.abs(o-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(e){e.selectAll("text").remove(),e.select(".domain").remove()}}class dy extends Rg{constructor(){super(...arguments),this.type="line",this.renderType=D.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?yl:vl)},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",vl)}}init(){const{events:e}=this.services;e.addEventListener(C.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(C.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(e=!0){const t=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,n=void 0!==this.model.get("zoomDomain"),i=t&&n?this.getComponentContainer({ariaLabel:"lines",withinChartClip:!1}):this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:r,curves:a}=this.services,[s,o]=dc(e=>r.getDomainValue(e),e=>r.getRangeValue(e),r.getOrientation()),l=this.getOptions(),c=Lg().x(s).y(o).curve(a.getD3Curve()).defined(e=>null!=e[r.getRangeIdentifier(e)]);let u=[];if(this.configs.stacked){const e=Object.keys(l.axes).some(e=>l.axes[e].percentage),{groupMapsTo:t}=l.data;u=this.model.getStackedData({groups:this.configs.groups,percentage:e}).map(e=>{const n=this.services.cartesianScales.getDomainIdentifier(e),i=this.services.cartesianScales.getRangeIdentifier(e);return{name:uc(e,0,t),data:e.map(e=>({[n]:e.data.sharedStackKey,[t]:e[t],[i]:e[1]})),hidden:!pf(e,e=>e[0]!==e[1])}})}else u=this.model.getGroupedData(this.configs.groups);const h=i.selectAll("path.line").data(u,e=>e.name);h.exit().attr("opacity",0).remove();const d=h.enter().append("path").classed("line",!0).attr("opacity",0).merge(h).data(u,e=>e.name).attr("class",e=>this.model.getColorClassName({classNameTypes:[L.STROKE],dataGroupName:e.name,originalClassName:"line"})).style("stroke",e=>this.model.getStrokeColor(e.name,null,e.data)).attr("role",Zc.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(",")});if(t&&n){const e=r.getMainXScale(),t=r.getMainYScale();if(e&&t){const[n,r]=e.range(),[a,s]=t.range();i.style("overflow","hidden").style("clip",`rect(${s}px, ${r}px, ${a}px, ${n}px)`)}}d.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 c(t)})}destroy(){const e=this.services.events;e.removeEventListener(C.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(C.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class py extends Rg{constructor(){super(...arguments),this.type="ruler",this.renderType=D.SVG,this.isXGridEnabled=uc(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=uc(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(e=!1){const t=uc(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 i=this.parent,r=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),s=this.services.cartesianScales.getRangeScale(),[o,l]=s.range(),c=r===P.HORIZONTAL?n:t,u=Lp.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),h=Lp.appendOrSelect(u,"line.ruler-line"),d=i.selectAll("[role=graphics-symbol]"),p=a.map(e=>({domainValue:this.services.cartesianScales.getDomainValue(e),originalData:e})).filter(e=>function(e,t){return e>t-5&&e<t+5}(e.domainValue,c));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map(e=>e.domainValue).join()===this.pointsWithinLine.map(e=>e.domainValue).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(C.Tooltip.MOVE,{mousePosition:[t,n]});this.pointsWithinLine=p;const f=this.pointsWithinLine.reduce((e,t)=>{if(0===e.length)return e.push(t),e;const n=e[0].domainValue,i=Math.abs(c-t.domainValue),r=Math.abs(c-n);return i>r||(i<r?e=[t]:e.push(t)),e},[]);if(f.length>0){const i=f.map(e=>e.originalData).filter(e=>null!=e[this.services.cartesianScales.getRangeIdentifier(e)]),a=f.map(e=>e.domainValue),s=d.filter(e=>{const t=this.services.cartesianScales.getDomainValue(e);return a.includes(t)});this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!function(e,t){return Pi(e,t)}(this.elementsToHighlight,s)&&this.hideRuler(),s.dispatch("mouseover"),this.elementsToHighlight=s,this.services.events.dispatchEvent(C.Tooltip.SHOW,{event:e,mousePosition:[t,n],hoveredElement:h,data:this.formatTooltipData(i)}),u.attr("opacity",1);const c=f[0];"horizontal"===r?h.attr("x1",l).attr("x2",o).attr("y1",c.domainValue).attr("y2",c.domainValue):h.attr("y1",l).attr("y2",o).attr("x1",c.domainValue).attr("x2",c.domainValue)}else this.hideRuler()}hideRuler(){const e=this.parent,t=Lp.appendOrSelect(e,"g.ruler");e.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(C.Tooltip.HIDE),t.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const e=this,t=this.services.domUtils.getHolder(),n=this.model.getDisplayData();let i=function(t){const n=La(t,e.parent.node());e.showRuler(t,n)};n.length>100&&(i=function(e,t,n){let i=null;return function(...r){const a=this;a.mousePosition=La(r[0],n),clearTimeout(i),i=setTimeout(function(){e.apply(a,r)},t)}}(function(t){const{mousePosition:n}=this;e.showRuler(t,n)},n.length%50*12.5,t)),this.backdrop.on("mousemove mouseover",i).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const e=this.parent;this.backdrop=Lp.appendOrSelect(e,"svg.chart-grid-backdrop")}}let fy=class extends Rg{constructor(){super(...arguments),this.type="scatter",this.renderType=D.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call(e=>this.services.transitions?.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=>this.services.transitions?.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=>this.services.transitions?.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=>this.services.transitions?.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(C.Legend.ITEM_HOVER,this.handleLegendOnHover),e.addEventListener(C.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:t}=this.configs;t&&(e.addEventListener(C.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.addEventListener(C.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),i=this.model.get("zoomDomain");return void 0!==i?e.filter(e=>e[n].getTime()>=i[0].getTime()&&e[n].getTime()<=i[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(!uc(this.getOptions(),"points","enabled")&&!uc(this.getOptions(),"bubble","enabled"))return;const t=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),n=this.getOptions(),{groupMapsTo:i}=n.data,{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales are undefined.");const a=r.getDomainIdentifier(),s=t.selectAll("circle.dot").data(this.getScatterData(),e=>`${e[i]}-${e[a]}`);s.exit().attr("opacity",0).remove();const o=s.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(s);this.styleCircles(o,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 i=n.getOrientation(),[r,a]=dc(n.getHighestDomainThreshold(),n.getHighestRangeThreshold(),i),[s,o]=dc(e=>n.getDomainValue(e),e=>n.getRangeValue(e),i),l=s(e),c=o(e);return a&&r?c<=a.scaleValue&&l>=r.scaleValue:a?c<=a.scaleValue:!!r&&l>=r.scaleValue}styleCircles(e,t){const n=this.getOptions(),{filled:i,fillOpacity:r}=n.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:s}=n.data,[o,l]=dc(e=>a.getDomainValue(e),e=>a.getRangeValue(e),a.getOrientation()),{fadeInOnChartHolderMouseover:c}=this.configs;e.raise().classed("dot",!0).attr("class",e=>{const t=a.getDomainIdentifier(e),n=this.model.getIsFilled(e[s],e[t],e,i)?[L.FILL,L.STROKE]:[L.STROKE];return this.model.getColorClassName({classNameTypes:n,dataGroupName:e[s],originalClassName:"dot"})||""}).classed("threshold-anomaly",e=>this.isDatapointThresholdAnomaly(e)).classed("filled",e=>{const t=a.getDomainIdentifier(e);return this.model.getIsFilled(e[s],e[t],e,i)}).classed("unfilled",e=>{const t=a.getDomainIdentifier(e);return!this.model.getIsFilled(e[s],e[t],e,i)}).transition().call(e=>this.services.transitions?.setupTransition({transition:e,name:"scatter-update-enter",animate:t})).attr("cx",o).attr("cy",l).attr("r",n.points.radius).style("fill",e=>{const t=a.getDomainIdentifier(e);if(this.model.getIsFilled(e[s],e[t],e,i))return this.model.getFillColor(e[s],e[t],e)}).style("stroke",e=>{const t=a.getDomainIdentifier(e);return this.model.getStrokeColor(e[s],e[t],e)}).attr("fill-opacity",i?r:1).attr("opacity",c?0:1).attr("role",Zc.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",e=>e[a.getRangeIdentifier(e)]),this.addEventListeners()}getTooltipAdditionalItems(e){return null}addEventListeners(){const e=this,{groupMapsTo:t}=e.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",function(n,i){const r=wu(this);r.classed("hovered",!0).attr("class",n=>e.model.getColorClassName({classNameTypes:[L.FILL],dataGroupName:n[t],originalClassName:r.attr("class")})).style("fill",n=>{const i=e.services.cartesianScales?.getDomainIdentifier(n);return e.model.getFillColor(n[t],n[i],n)}).classed("unfilled",!1),e.services.events?.dispatchEvent(C.Tooltip.SHOW,{event:n,hoveredElement:r,data:[i],additionalItems:e.getTooltipAdditionalItems(i)}),e.services.events?.dispatchEvent(C.Scatter.SCATTER_MOUSEOVER,{event:n,element:r,datum:i})}).on("mousemove",function(t,n){const i=wu(this);e.services.events?.dispatchEvent(C.Scatter.SCATTER_MOUSEMOVE,{event:t,element:i,datum:n}),e.services.events?.dispatchEvent(C.Tooltip.MOVE,{event:t})}).on("click",function(t,n){e.services.events?.dispatchEvent(C.Scatter.SCATTER_CLICK,{event:t,element:wu(this),datum:n})}).on("mouseout",function(n,i){const r=wu(this);if(r.classed("hovered",!1),!e.configs.filled){const{filled:n}=e.getOptions().points,a=e.services.cartesianScales?.getDomainIdentifier(i),s=e.model.getIsFilled(i[t],i[a],i,n);r.classed("unfilled",!s).style("fill",i=>s||n?e.model.getFillColor(i[t],i[a],i):null)}e.services.events?.dispatchEvent(C.Scatter.SCATTER_MOUSEOUT,{event:n,element:r,datum:i}),e.services.events?.dispatchEvent(C.Tooltip.HIDE,{hoveredElement:r})})}destroy(){this.parent?.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:e}=this.services;if(!e)throw new Error("Services events undefined");e.removeEventListener(C.Legend.ITEM_HOVER,this.handleLegendOnHover),e.removeEventListener(C.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),e.removeEventListener(C.Chart.MOUSEOVER,this.handleChartHolderOnHover),e.removeEventListener(C.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class gy extends Rg{constructor(e,t,n){super(e,t,n),this.type="axes",this.renderType=D.SVG,this.truncation={[N.LEFT]:!1,[N.RIGHT]:!1,[N.TOP]:!1,[N.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(e=!0){const{position:t}=this.configs,n=this.getOptions(),i=uc(n,"axes",t,"visible"),r=this.getComponentContainer({ariaLabel:"axes"}),{width:a,height:s}=Lp.getSVGElementSize(r,{useAttrs:!0}),o=Lp.appendOrSelect(r,`g.axis.${t}`);let l,c;if(t===N.BOTTOM||t===N.TOP?(l=this.configs.axes[N.LEFT]?this.margins.left:0,c=this.configs.axes[N.RIGHT]?a-this.margins.right:a):(l=s-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(t);let h;switch(this.scaleType===j.LABELS||this.scaleType===j.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),t){case N.LEFT:h=Ef;break;case N.BOTTOM:h=$f;break;case N.RIGHT:h=kf;break;case N.TOP:h=Af}o.attr("aria-label",`${t} axis`);const d=!o.select("g.ticks").empty();let p=Lp.appendOrSelect(o,"g.ticks");d||(p.attr("role",`${Zc.GRAPHICS_OBJECT} ${Zc.GROUP}`),p.attr("aria-label",`${t} ticks`));const f=Lp.appendOrSelect(o,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${t} ticks`),g=uc(n,"axes",t),m=this.scaleType===j.TIME||g.scaleType===j.TIME,y=t===N.LEFT||t===N.RIGHT,v=this.model.get("zoomDomain");if(v&&m&&!y&&u.domain(v),!i)return void p.attr("aria-hidden",!0);const b=uc(g,"scaleType"),_=uc(n,"data","loading"),x=uc(g,"ticks","number"),w=uc(g,"ticks","values"),A=uc(g,"truncation","type"),k=uc(g,"truncation","threshold"),$=uc(g,"truncation","numCharacter"),E=null!==x,T=uc(n,"timeScale"),S=Lp.appendOrSelect(f,"g.tick"),M=Lp.appendOrSelect(S,"text").text("0"),O=Lp.getSVGElementSize(M.node(),{useBBox:!0}).height;S.remove();const C=this.scaleType||g.scaleType||j.LINEAR,D=h(u).tickSizeOuter(0);if(u.ticks){let e;if(E?e=x:(e=ll,y&&(e=this.getNumberOfFittingTicks(s,O,cl))),1===u.ticks().length&&0===u.ticks()[0]&&(e=0),D.ticks(e),m)if(u.ticks(e).length){const i=uc(n,"timeScale","addSpaceOnEdges"),r=uc(n,"axes",t,"domain"),a=u.copy();i&&!r&&a.nice(e);const s=a.ticks(e);i&&s.length>2&&!r&&(s.splice(s.length-1,1),s.splice(0,1)),D.tickValues(s)}else D.tickValues([])}let z;const L=uc(g,"ticks","formatter"),{code:I,number:P}=uc(n,"locale");if(m){const e=Uc(D.tickValues(),uc(n,"timeScale","timeInterval"));z=null===L?(t,i)=>Fc(t,i,D.tickValues(),e,T,n.locale):(t,i)=>{const r=Fc(t,i,D.tickValues(),e,T,n.locale);return L(t,i,r)}}else null===L?C===j.LINEAR&&(z=e=>P(e,I)):z=L;D.tickFormat(z);const[F,B]=this.services.cartesianScales.getScaleByPosition(t).domain();let U;if(w){if(m)w.forEach((e,t)=>{void 0===e.getTime&&(w[t]=new Date(e))}),U=w.filter(e=>{const t=e.getTime();return t>=new Date(F).getTime()&&t<=new Date(B).getTime()});else if(b===j.LABELS){const e=this.services.cartesianScales.getScaleByPosition(t).domain();U=w.filter(t=>e.includes(t))}else U=w.filter(e=>e>=F&&e<=B);D.tickValues(U)}switch(t){case N.LEFT:p.attr("transform",`translate(${this.margins.left}, 0)`);break;case N.BOTTOM:p.attr("transform",`translate(0, ${s-this.margins.bottom})`);break;case N.RIGHT:p.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case N.TOP:p.attr("transform",`translate(0, ${this.margins.top})`)}const V=this.model.isDataEmpty();if(g.title){const e=Lp.appendOrSelect(o,"text.axis-title").html(V||_?"":Rm(g.title)),n=uc(g,"titleOrientation");let i;switch(t){case N.LEFT:n===Q.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 N.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${s+4})`).style("text-anchor","middle");break;case N.RIGHT:n===Q.LEFT?e.attr("transform","rotate(-90)").attr("y",a).attr("x",-u.range()[0]/2).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-a).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case N.TOP:i=Lp.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${i/2})`).style("text-anchor","middle")}}if(m){const t=Uc(D.tickValues(),uc(n,"timeScale","timeInterval")),i=T.showDayName,r=p;e&&(p=p.transition().call(t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e}))),p=p.call(D),r.selectAll(".tick").data(D.tickValues(),u).order().select("text").attr("class",(e,n)=>jc(e,n,D.tickValues(),t,i)?"tick-label--primary":"tick-label")}else p=e&&d?p.transition().call(t=>this.services.transitions.setupTransition({transition:t,name:"axis-update",animate:e})).call(D):p.call(D);if(f.call(D),t===N.BOTTOM||t===N.TOP){let e=!1;const n=uc(g,"ticks","rotation");if(n===Y.ALWAYS)e=!0;else if(n===Y.NEVER)e=!1;else if(!n||n===Y.AUTO)if(u.step)e=f.selectAll("g.tick text").nodes().some(e=>Lp.getSVGElementSize(e,{useBBox:!0}).width>=u.step());else{e=!1;const t=f.append("text").text("A"),n=Lp.getSVGElementSize(t.node(),{useBBox:!0}).width;let i;f.selectAll("g.tick").each(function(){const t=wu(this),r=parseFloat(uc(oc(this),"tx"));null!==r&&i+t.text().length*n*.8>=r&&(e=!0),i=r}),t.remove()}e?(E||(D.ticks(this.getNumberOfFittingTicks(a,O,ul)),f.call(D),p.call(D)),o.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",t===N.TOP?"start":"end")):o.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(_?o.attr("opacity",0):o.attr("opacity",1),p.selectAll("g.tick").attr("aria-label",e=>e),f.selectAll("g.tick").attr("aria-label",e=>e),A!==R.NONE&&b===j.LABELS&&!w){const e=this.services.cartesianScales.getScaleDomain(t);if(e.length>0){const n=r.select(`g.axis.${t} g.ticks g.tick`).html();o.selectAll("g.ticks g.tick").html(n);const i=this;o.selectAll("g.tick text").data(e).text(function(e){return e.length>k?(i.truncation[t]=!0,lc(e,A,$)):e}),this.getInvisibleAxisRef().selectAll("g.tick text").data(e).text(function(e){return e.length>k?lc(e,A,$):e}),o.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),o.selectAll("g.tick text").data(e)}}this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Lp.appendOrSelect(e,`g.axis.${t}`),i=this.getOptions(),r=uc(i,"axes",t),a=uc(r,"scaleType"),s=uc(r,"truncation","threshold"),o=this;n.selectAll("g.tick text").on("mouseover",function(e,t){o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEOVER,{event:e,element:wu(this),datum:t}),a===j.LABELS&&t.length>s&&o.services.events.dispatchEvent(C.Tooltip.SHOW,{event:e,hoveredElement:wu(this),content:t})}).on("mousemove",function(e,t){o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEMOVE,{event:e,element:wu(this),datum:t}),a===j.LABELS&&t.length>s&&o.services.events.dispatchEvent(C.Tooltip.MOVE,{event:e})}).on("click",function(e,t){o.services.events.dispatchEvent(C.Axis.LABEL_CLICK,{event:e,element:wu(this),datum:t})}).on("mouseout",function(e,t){o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEOUT,{event:e,element:wu(this),datum:t}),a===j.LABELS&&o.services.events.dispatchEvent(C.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=vu(n))==n?n:0),void 0!==t&&(t=(t=vu(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}(vu(e),t,n)}(Math.floor(e/(t*n)),2,ll)}destroy(){const e=this.getComponentContainer(),{position:t}=this.configs;Lp.appendOrSelect(e,`g.axis.${t}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class my extends gy{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"}),i=Lp.appendOrSelect(n,`g.axis.${t}`),r=this;i.selectAll("g.tick").each(function(e,n){const i=wu(this);i.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const a=i.select("text"),{width:s,height:o}=Lp.getSVGElementSize(a,{useBBox:!0}),l=Lp.appendOrSelect(i,"rect.axis-holder");let c=0,u=0;switch(t){case N.LEFT:c=-s+Number(a.attr("x")),u=-o/2;break;case N.RIGHT:c=Math.abs(Number(a.attr("x"))),u=-o/2;break;case N.TOP:c=-s/2,u=-o+Number(a.attr("y"))/2,r.truncation[t]&&(c=0,l.attr("transform","rotate(-45)"));break;case N.BOTTOM:c=-s/2,u=o/2-2,r.truncation[t]&&(c=-s,l.attr("transform","rotate(-45)"))}l.attr("x",c-dl).attr("y",u).attr("width",s+2*dl).attr("height",o).lower()}),this.addEventListeners()}addEventListeners(){const e=this.getComponentContainer(),{position:t}=this.configs,n=Lp.appendOrSelect(e,`g.axis.${t}`),i=this.getOptions(),r=uc(i,"axes",t),a=uc(r,"scaleType"),s=uc(r,"truncation","threshold"),o=this;n.selectAll("g.tick.tick-hover").on("mouseover",function(e){const t=wu(this).select("text"),n=t.datum();o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEOVER,{event:e,element:t,datum:n}),a===j.LABELS&&n.length>s&&o.services.events.dispatchEvent(C.Tooltip.SHOW,{event:e,element:t,datum:n})}).on("mousemove",function(e){const t=wu(this).select("text"),n=t.datum();o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEMOVE,{event:e,element:t,datum:n}),o.services.events.dispatchEvent(C.Tooltip.MOVE,{event:e})}).on("click",function(e){o.services.events.dispatchEvent(C.Axis.LABEL_CLICK,{event:e,element:wu(this).select("text"),datum:wu(this).select("text").datum()})}).on("mouseout",function(e){o.services.events.dispatchEvent(C.Axis.LABEL_MOUSEOUT,{event:e,element:wu(this).select("text"),datum:wu(this).select("text").datum()}),a===j.LABELS&&o.services.events.dispatchEvent(C.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}o.services.events.dispatchEvent(C.Axis.LABEL_FOCUS,{event:{...e,...t},element:wu(this),datum:wu(this).select("text").datum()})}).on("blur",function(e){o.services.events.dispatchEvent(C.Axis.LABEL_BLUR,{event:e,element:wu(this),datum:wu(this).select("text").datum()})}).on("keydown",function(e){e.key&&"Escape"===e.key&&(o.services.events.dispatchEvent(C.Tooltip.HIDE),o.services.events.dispatchEvent(C.Axis.LABEL_BLUR,{event:e,element:wu(this),datum:wu(this).select("text").datum()})),t===N.LEFT||t===N.RIGHT?e.key&&"ArrowUp"===e.key?o.goNext(this,e):e.key&&"ArrowDown"===e.key&&o.goPrevious(this,e):e.key&&"ArrowLeft"===e.key?o.goPrevious(this,e):e.key&&"ArrowRight"===e.key&&o.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;Lp.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 yy extends Rg{constructor(){super(...arguments),this.type="2D-axes",this.renderType=D.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(e=!1){const t={},n=Object.keys(N),i=uc(this.getOptions(),"axes");n.forEach(e=>{i[N[e]]&&(t[N[e]]=!0)}),this.configs.axes=t,n.forEach(e=>{const t=N[e];if(this.configs.axes[t]&&!this.children[t]){const e={position:t,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===te.DEFAULT?new gy(this.model,this.services,e):new my(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 r={};Object.keys(this.children).forEach(e=>{const t=this.children[e],n=t.configs.position,i=t.getInvisibleAxisRef(),{width:a,height:s}=Lp.getSVGElementSize(i,{useBBox:!0});let o;switch(t.getTitleRef().empty()?o=0:(o=Lp.getSVGElementSize(t.getTitleRef(),{useBBox:!0}).height,(n===N.LEFT||n===N.RIGHT)&&(o+=5)),n){case N.TOP:r.top=s+o;break;case N.BOTTOM:r.bottom=s+o;break;case N.LEFT:r.left=a+o;break;case N.RIGHT:r.right=a+o}}),this.services.events.dispatchEvent(C.Axis.RENDER_COMPLETE),Object.keys(r).some(e=>this.margins[e]!==r[e])&&(this.margins=Object.assign(this.margins,r),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(C.ZoomBar.UPDATE),Object.keys(this.children).forEach(e=>{this.children[e].margins=this.margins}),this.render(!0))}}class vy extends Rg{constructor(){super(...arguments),this.type="skeleton"}render(e=!0){const t=uc(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()}renderSkeleton(e){if(this.configs.skeleton===W.GRID)this.renderGridSkeleton(e);else if(this.configs.skeleton===W.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(e);else if(this.configs.skeleton===W.PIE)this.renderPieSkeleton(e);else{if(this.configs.skeleton!==W.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===P.VERTICAL&&this.drawYGrid(e),t===P.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=al().domain([0,1]).range(e),this.yScale=al().domain([0,1]).range(t)}drawBackdrop(e){const t=this.parent,{width:n,height:i}=Lp.getSVGElementSize(t,{useAttrs:!0});this.backdrop=Lp.appendOrSelect(t,"svg.chart-skeleton.DAII").attr("role","presentation").attr("width",n).attr("height",i);const r=Lp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");r.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,s]=this.yScale.range();this.backdrop.merge(r).attr("x",a).attr("y",s),r.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=uc(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(n).map(e=>e*t),r=Lp.appendOrSelect(this.backdrop,"g.x.skeleton"),a=r.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",e=>e).attr("x2",e=>e).attr("y1",0).attr("y2","100%"),r.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"),i=uc(this.getOptions(),"grid","y","numberOfTicks"),r=this.xScale.ticks(i).map(e=>e*t),a=Lp.appendOrSelect(this.backdrop,"g.y.skeleton"),s=a.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",e=>e).attr("y2",e=>e),a.selectAll("line").classed("shimmer-effect-lines",e).classed("empty-state-lines",!e).style("stroke",e?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(e,t,n=!0){const i=this.parent,{width:r,height:a}=Lp.getSVGElementSize(i,{useAttrs:!0}),s=Lp.appendOrSelect(i,"svg.chart-skeleton").attr("width",r).attr("height",a).attr("role","presentation"),o=0===t?"pie":"donut",l=uc(this.getOptions(),o,"alignment");Lp.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",r).attr("height",a).attr("fill","none");const c=function(){var e=Eg,t=Tg,n=qc(0),i=null,r=Sg,a=Mg,s=Og,o=null,l=$g(c);function c(){var c,u,h=+e.apply(this,arguments),d=+t.apply(this,arguments),p=r.apply(this,arguments)-Wd,f=a.apply(this,arguments)-Wd,g=Pd(f-p),m=f>p;if(o||(o=c=l()),d<h&&(u=d,d=h,h=u),d>Gd)if(g>qd-Gd)o.moveTo(d*Fd(p),d*Vd(p)),o.arc(0,0,d,p,f,!m),h>Gd&&(o.moveTo(h*Fd(f),h*Vd(f)),o.arc(0,0,h,f,p,m));else{var y,v,b=p,_=f,x=p,w=f,A=g,k=g,$=s.apply(this,arguments)/2,E=$>Gd&&(i?+i.apply(this,arguments):Hd(h*h+d*d)),T=Ud(Pd(d-h)/2,+n.apply(this,arguments)),S=T,M=T;if(E>Gd){var O=Yd(E/h*Vd($)),C=Yd(E/d*Vd($));(A-=2*O)>Gd?(x+=O*=m?1:-1,w-=O):(A=0,x=w=(p+f)/2),(k-=2*C)>Gd?(b+=C*=m?1:-1,_-=C):(k=0,b=_=(p+f)/2)}var D=d*Fd(b),z=d*Vd(b),L=h*Fd(w),N=h*Vd(w);if(T>Gd){var I,R=d*Fd(_),P=d*Vd(_),j=h*Fd(x),F=h*Vd(x);if(g<Zd)if(I=function(e,t,n,i,r,a,s,o){var l=n-e,c=i-t,u=s-r,h=o-a,d=h*l-u*c;if(!(d*d<Gd))return[e+(d=(u*(t-a)-h*(e-r))/d)*l,t+d*c]}(D,z,j,F,R,P,L,N)){var B=D-I[0],U=z-I[1],V=R-I[0],H=P-I[1],G=1/Vd(function(e){return e>1?0:e<-1?Zd:Math.acos(e)}((B*V+U*H)/(Hd(B*B+U*U)*Hd(V*V+H*H)))/2),Z=Hd(I[0]*I[0]+I[1]*I[1]);S=Ud(T,(h-Z)/(G-1)),M=Ud(T,(d-Z)/(G+1))}else S=M=0}k>Gd?M>Gd?(y=Cg(j,F,D,z,d,M,m),v=Cg(R,P,L,N,d,M,m),o.moveTo(y.cx+y.x01,y.cy+y.y01),M<T?o.arc(y.cx,y.cy,M,jd(y.y01,y.x01),jd(v.y01,v.x01),!m):(o.arc(y.cx,y.cy,M,jd(y.y01,y.x01),jd(y.y11,y.x11),!m),o.arc(0,0,d,jd(y.cy+y.y11,y.cx+y.x11),jd(v.cy+v.y11,v.cx+v.x11),!m),o.arc(v.cx,v.cy,M,jd(v.y11,v.x11),jd(v.y01,v.x01),!m))):(o.moveTo(D,z),o.arc(0,0,d,b,_,!m)):o.moveTo(D,z),h>Gd&&A>Gd?S>Gd?(y=Cg(L,N,R,P,h,-S,m),v=Cg(D,z,j,F,h,-S,m),o.lineTo(y.cx+y.x01,y.cy+y.y01),S<T?o.arc(y.cx,y.cy,S,jd(y.y01,y.x01),jd(v.y01,v.x01),!m):(o.arc(y.cx,y.cy,S,jd(y.y01,y.x01),jd(y.y11,y.x11),!m),o.arc(0,0,h,jd(y.cy+y.y11,y.cx+y.x11),jd(v.cy+v.y11,v.cx+v.x11),m),o.arc(v.cx,v.cy,S,jd(v.y11,v.x11),jd(v.y01,v.x01),!m))):o.arc(0,0,h,w,x,m):o.lineTo(L,N)}else o.moveTo(0,0);if(o.closePath(),c)return o=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-Zd/2;return[Fd(i)*n,Vd(i)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:qc(+e),c):n},c.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:qc(+e),c):i},c.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:qc(+e),c):r},c.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:qc(+e),c):a},c.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:qc(+e),c):s},c.context=function(e){return arguments.length?(o=e??null,c):o},c}().innerRadius(t).outerRadius(e).startAngle(0).endAngle(2*Math.PI),u=e+Math.abs(-15),h=e+(Math.min(r,a)-2*e)/2,d=Lp.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${h})`).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 p=e+30;l===B.CENTER?p=r/2:l===B.RIGHT&&(p=r-e-30);const f=e+20;d.attr("transform",`translate(${p}, ${f})`)}computeOuterRadius(){const{width:e,height:t}=Lp.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:i}=Lp.getSVGElementSize(this.parent,{useAttrs:!0}),r=i,a=Lp.appendOrSelect(n,"defs").lower(),s=Lp.appendOrSelect(a,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(e)).attr("class",e).attr("x1",0-3*.2*i).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),o=`\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`;s.html(o),function e(){s.attr("gradientTransform",`translate(${0-3*.2*i}, 0)`).transition().duration(2e3).delay(1e3).ease(Mf).attr("gradientTransform",`translate(${r+3*.2*i}, 0)`).on("end",e)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class by extends Rg{constructor(){super(...arguments),this.type="zero-line",this.renderType=D.SVG}render(e){const t=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(t),[i,r]=n.domain(),a=i>0&&r<0||i<0&&r>0,s=this.getComponentContainer({isPresentational:!0});if(!a)return void s.selectAll("line.domain").remove();const[o,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=hc({x0:o,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Lp.appendOrSelect(s,"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 _y extends vy{constructor(){super(...arguments),this.type="skeleton-lines"}render(e=!0){const t=uc(this.getOptions(),"data","loading"),n=!(uc(this.getOptions(),"grid","x","enabled")||uc(this.getOptions(),"grid","y","enabled")||uc(this.getOptions(),"axes","bottom","visible")||uc(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=Lp.appendOrSelect(this.backdrop,"g.y.skeleton"),i=n.selectAll("line").data([100]);i.enter().append("line").merge(i).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=Lp.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("role","presentation"),Lp.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}function xy(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?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 i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}var wy={value:function(){}};function Ay(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new ky(i)}function ky(e){this._=e}function $y(e,t){for(var n,i=0,r=e.length;i<r;++i)if((n=e[i]).name===t)return n.value}function Ey(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=wy,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}ky.prototype=Ay.prototype={constructor:ky,on:function(e,t){var n,i=this._,r=function(e,t){return e.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");if(i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}(e+"",i),a=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=r[a]).type)i[n]=Ey(i[n],e.name,t);else if(null==t)for(n in i)i[n]=Ey(i[n],e.name,null);return this}for(;++a<s;)if((n=(e=r[a]).type)&&(n=$y(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ky(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(i=this._[e]).length;a<n;++a)i[a].value.apply(t,r)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)}};const Ty=xy(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Ay},Symbol.toStringTag,{value:"Module"})));var Sy,My;function Oy(e){return null!=e&&e.length?$n(e,1):[]}function Cy(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}function Dy(e,t){return null==(e=function(e,t){return t.length<2?e:_n(e,Cy(t,0,-1))}(e,t=vn(t,e)))||delete e[bn(qi(t))]}function zy(e){return Dn(e)?void 0:e}!function(){if(My)return Sy;My=1;const e=Ty.dispatch,t=Math.PI/180,n={archimedean:f,rectangular:function(e){var t=4*e[0]/e[1],n=0,i=0;return function(e){var r=e<0?-1:1;switch(Math.sqrt(1+4*r*e)-r&3){case 0:n+=t;break;case 1:i+=4;break;case 2:n-=t;break;default:i-=4}return[n,i]}}},i=2048;function r(e){return e.text}function a(){return"serif"}function s(){return"normal"}function o(e){return Math.sqrt(e.value)}function l(){return 30*(~~(6*random())-3)}function c(){return 1}function u(e,n,r,a){if(!n.sprite){var s=e.context,o=e.ratio;s.clearRect(0,0,2048/o,i/o);var l=0,c=0,u=0,h=r.length;for(--a;++a<h;){n=r[a],s.save(),s.font=n.style+" "+n.weight+" "+~~((n.size+1)/o)+"px "+n.font;const e=s.measureText(n.text),h=-Math.floor(e.width/2);let v=(e.width+1)*o,b=n.size<<1;if(n.rotate){var d=Math.sin(n.rotate*t),p=Math.cos(n.rotate*t),f=v*p,g=v*d,m=b*p,y=b*d;v=Math.max(Math.abs(f+y),Math.abs(f-y))+31>>5<<5,b=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else v=v+31>>5<<5;if(b>u&&(u=b),l+v>=2048&&(l=0,c+=u,u=0),c+b>=i)break;s.translate((l+(v>>1))/o,(c+(b>>1))/o),n.rotate&&s.rotate(n.rotate*t),s.fillText(n.text,h,0),n.padding&&(s.lineWidth=2*n.padding,s.strokeText(n.text,h,0)),s.restore(),n.width=v,n.height=b,n.xoff=l,n.yoff=c,n.x1=v>>1,n.y1=b>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,l+=v}for(var v=s.getImageData(0,0,2048/o,i/o).data,b=[];--a>=0;)if((n=r[a]).hasText){for(var _=n.width,x=_>>5,w=n.y1-n.y0,A=0;A<w*x;A++)b[A]=0;if(null==(l=n.xoff))return;c=n.yoff;for(var k=0,$=-1,E=0;E<w;E++){for(A=0;A<_;A++){var T=x*E+(A>>5),S=v[2048*(c+E)+(l+A)<<2]?1<<31-A%32:0;b[T]|=S,k|=S}k?$=E:(n.y0++,w--,E--,c++)}n.y1=n.y0+$,n.sprite=b.slice(0,(n.y1-n.y0)*x)}}}function h(e,t,n){n>>=5;for(var i,r=e.sprite,a=e.width>>5,s=e.x-(a<<4),o=127&s,l=32-o,c=e.y1-e.y0,u=(e.y+e.y0)*n+(s>>5),h=0;h<c;h++){i=0;for(var d=0;d<=a;d++)if((i<<l|(d<a?(i=r[h*a+d])>>>o:0))&t[u+d])return!0;u+=n}return!1}function d(e,t){var n=e[0],i=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>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function p(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 f(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function g(){return document.createElement("canvas")}function m(e){return"function"==typeof e?e:function(){return e}}Sy=function(){var t=[256,256],y=r,v=a,b=o,_=s,x=s,w=l,A=c,k=f,$=[],E=1/0,T=e("word","end"),S=null,M=Math.random,O={},C=g;function D(e,n,i){t[0],t[1];for(var r,a,s,o=n.x,l=n.y,c=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=k(t),d=M()<.5?1:-1,f=-d;(r=u(f+=d))&&(a=~~r[0],s=~~r[1],!(Math.min(Math.abs(a),Math.abs(s))>=c));)if(n.x=o+a,n.y=l+s,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!i||p(n,i))&&!h(n,e,t[0])){for(var g,m=n.sprite,y=n.width>>5,v=t[0]>>5,b=n.x-(y<<4),_=127&b,x=32-_,w=n.y1-n.y0,A=(n.y+n.y0)*v+(b>>5),$=0;$<w;$++){g=0;for(var E=0;E<=y;E++)e[A+E]|=g<<x|(E<y?(g=m[$*y+E])>>>_:0);A+=v}return!0}return!1}return O.canvas=function(e){return arguments.length?(C=m(e),O):C},O.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=i/n,t.fillStyle=t.strokeStyle="red",{context:t,ratio:n}}(C()),n=function(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}((t[0]>>5)*t[1]),r=null,a=$.length,s=-1,o=[],l=$.map(function(e,t){return e.text=y.call(this,e,t),e.font=v.call(this,e,t),e.style=_.call(this,e,t),e.weight=x.call(this,e,t),e.rotate=w.call(this,e,t),e.size=~~b.call(this,e,t),e.padding=A.call(this,e,t),e}).sort(function(e,t){return t.size-e.size});return S&&clearInterval(S),S=setInterval(c,0),c(),O;function c(){for(var i=Date.now();Date.now()-i<E&&++s<a&&S;){var c=l[s];c.x=t[0]*(M()+.5)>>1,c.y=t[1]*(M()+.5)>>1,u(e,c,l,s),c.hasText&&D(n,c,r)&&(o.push(c),T.call("word",O,c),r?d(r,c):r=[{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)}s>=a&&(O.stop(),T.call("end",O,o,r))}},O.stop=function(){S&&(clearInterval(S),S=null);for(const e of $)delete e.sprite;return O},O.timeInterval=function(e){return arguments.length?(E=e??1/0,O):E},O.words=function(e){return arguments.length?($=e,O):$},O.size=function(e){return arguments.length?(t=[+e[0],+e[1]],O):t},O.font=function(e){return arguments.length?(v=m(e),O):v},O.fontStyle=function(e){return arguments.length?(_=m(e),O):_},O.fontWeight=function(e){return arguments.length?(x=m(e),O):x},O.rotate=function(e){return arguments.length?(w=m(e),O):w},O.text=function(e){return arguments.length?(y=m(e),O):y},O.spiral=function(e){return arguments.length?(k=n[e]||e,O):k},O.fontSize=function(e){return arguments.length?(b=m(e),O):b},O.padding=function(e){return arguments.length?(A=m(e),O):A},O.random=function(e){return arguments.length?(M=e,O):M},O.on=function(){var e=T.on.apply(T,arguments);return e===T?O:e},O}}();var Ly=function(e){return lt(bt(e,void 0,Oy),e+"")}(function(e,t){var n={};if(null==e)return n;var i=!1;t=Ne(t,function(t){return t=vn(t,e),i||(i=t.length>1),t}),yt(e,Zn(e),n),i&&(n=Ai(n,7,zy));for(var r=t.length;r--;)Dy(n,t[r]);return n});function Ny(e){return Math.log(e)}function Iy(e){return Math.exp(e)}function Ry(e){return-Math.log(-e)}function Py(e){return-Math.exp(-e)}function jy(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Fy(e){return(t,n)=>-e(-t,n)}function By(){const e=function(e){const t=e(Ny,Iy),n=t.domain;let i,r,a=10;function s(){return i=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),r=function(e){return 10===e?jy:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(i=Fy(i),r=Fy(r),e(Ry,Py)):e(Ny,Iy),t}return t.base=function(e){return arguments.length?(a=+e,s()):a},t.domain=function(e){return arguments.length?(n(e),s()):n()},t.ticks=e=>{const t=n();let s=t[0],o=t[t.length-1];const l=o<s;l&&([s,o]=[o,s]);let c,u,h=i(s),d=i(o);const p=null==e?10:+e;let f=[];if(!(a%1)&&d-h<p){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(c=1;c<a;++c)if(u=h<0?c/r(-h):c*r(h),!(u<s)){if(u>o)break;f.push(u)}}else for(;h<=d;++h)for(c=a-1;c>=1;--c)if(u=h>0?c/r(-h):c*r(h),!(u<s)){if(u>o)break;f.push(u)}2*f.length<p&&(f=fr(s,o,p))}else f=fr(h,d,Math.min(d-h,p)).map(r);return l?f.reverse():f},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(!(a%1)&&null==(n=Io(n)).precision&&(n.trim=!0),n=Uo(n)),e===1/0)return n;const s=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/r(Math.round(i(e)));return t*a<a-.5&&(t*=a),t<=s?n(e):""}},t.nice=()=>n(ku(n(),{floor:e=>r(Math.floor(i(e))),ceil:e=>r(Math.ceil(i(e)))})),t}(nl()).domain([1,10]);return e.copy=()=>tl(e,By()).base(e.base()),Zo.apply(e,arguments),e}function Uy(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 Vy(e){this._context=e}function Hy(e){return new Vy(e)}function Gy(e){this._context=e}function Zy(e){return new Gy(e)}function Wy(e){this._context=e}function qy(e){return new Wy(e)}function Yy(e,t){this._basis=new Vy(e),this._beta=t}Vy.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:Uy(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:Uy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Gy.prototype={areaStart:Qd,areaEnd:Qd,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:Uy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Wy.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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Uy(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Yy.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 i,r=e[0],a=t[0],s=e[n]-r,o=t[n]-a,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(r+i*s),this._beta*t[l]+(1-this._beta)*(a+i*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Xy=function e(t){function n(e){return 1===t?new Vy(e):new Yy(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function Ky(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 Qy(e,t){this._context=e,this._k=(1-t)/6}Qy.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:Ky(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:Ky(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 Jy=function e(t){function n(e){return new Qy(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ev(e,t){this._context=e,this._k=(1-t)/6}ev.prototype={areaStart:Qd,areaEnd:Qd,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:Ky(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 tv=function e(t){function n(e){return new ev(e,t)}return n.tension=function(t){return e(+t)},n}(0);function nv(e,t){this._context=e,this._k=(1-t)/6}nv.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:Ky(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 iv=function e(t){function n(e){return new nv(e,t)}return n.tension=function(t){return e(+t)},n}(0);function rv(e,t,n){var i=e._x1,r=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Gd){var o=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);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Gd){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,a,s,e._x2,e._y2)}function av(e,t){this._context=e,this._alpha=t}av.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:rv(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 sv=function e(t){function n(e){return t?new av(e,t):new Qy(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ov(e,t){this._context=e,this._alpha=t}ov.prototype={areaStart:Qd,areaEnd:Qd,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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._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:rv(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 lv=function e(t){function n(e){return t?new ov(e,t):new ev(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function cv(e,t){this._context=e,this._alpha=t}cv.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:rv(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 uv=function e(t){function n(e){return t?new cv(e,t):new nv(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function hv(e){return e<0?-1:1}function dv(e,t,n){var i=e._x1-e._x0,r=t-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),s=(n-e._y1)/(r||i<0&&-0),o=(a*r+s*i)/(i+r);return(hv(a)+hv(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function pv(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fv(e,t,n){var i=e._x0,r=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,r+o*t,a-o,s-o*n,a,s)}function gv(e){this._context=e}function mv(e){this._context=new yv(e)}function yv(e){this._context=e}function vv(e){return new gv(e)}function bv(e){return new mv(e)}function _v(e){this._context=e}function xv(e){var t,n,i=e.length-1,r=new Array(i),a=new Array(i),s=new Array(i);for(r[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<i-1;++t)r[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(r[i-1]=2,a[i-1]=7,s[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)n=r[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(r[i-1]=s[i-1]/a[i-1],t=i-2;t>=0;--t)r[t]=(s[t]-r[t+1])/a[t];for(a[i-1]=(e[i]+r[i-1])/2,t=0;t<i-1;++t)a[t]=2*e[t+1]-r[t+1];return[r,a]}function wv(e){return new _v(e)}function Av(e,t){this._context=e,this._t=t}function kv(e){return new Av(e,.5)}function $v(e){return new Av(e,0)}function Ev(e){return new Av(e,1)}gv.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:fv(this,this._t0,pv(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,fv(this,pv(this,n=dv(this,e,t)),n);break;default:fv(this,this._t0,n=dv(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(mv.prototype=Object.create(gv.prototype)).point=function(e,t){gv.prototype.point.call(this,t,e)},yv.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,i,r,a){this._context.bezierCurveTo(t,e,i,n,a,r)}},_v.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 i=xv(e),r=xv(t),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],e[s],t[s]);(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)}},Av.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 Tv extends zp{zoomIn(e,t,n){let i,r,a;const s=n||pl;e&&(i=e.x,r=e.y,a=2);const{width:o,height:l}=Lp.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});t.transition().duration(s.duration).ease(s.ease).attr("transform",`translate(${o/2}, ${l/2}) scale(${a}) translate(${-i},${-r})`),this.services.events.dispatchEvent(C.CanvasZoom.CANVAS_ZOOM_IN,{element:wu(e)})}zoomOut(e,t){const n=t||pl;e.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(C.CanvasZoom.CANVAS_ZOOM_OUT)}}class Sv extends zp{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 Mv extends zp{constructor(e,t){super(e,t)}downloadCSV(e,t){const n=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([e],{type:i}),t);else if(URL&&"download"in n){const r=URL.createObjectURL(new Blob([e],{type:i}));n.href=r,n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}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 Ov extends zp{constructor(){super(...arguments),this.pendingTransitions={}}init(){this.services.events?.addEventListener(C.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(uc(xl,t,"duration")||xl.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Cv(e,t){const n=+fe(e)-+fe(t);return n<0?-1:n>0?1:n}function Dv(e,t,n){const i=fe(e,n?.in);if(isNaN(t))return ue(e,NaN);if(!t)return i;const r=i.getDate(),a=ue(e,i.getTime());return a.setMonth(i.getMonth()+t+1,0),r>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),r),i)}function zv(e,t,n){return Dv(e,12*t,n)}function Lv(e,t,n){return zv(e,-t,n)}function Nv(e,t,n){const[i,r,a]=he(0,e,e,t),s=Cv(r,a),o=Math.abs(function(e,t){const[n,i]=he(0,e,t);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}(r,a));if(o<1)return 0;1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*o);let l=Cv(r,a)===-s;(function(e,t){const n=fe(e,t?.in);return+function(e,t){const n=fe(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)==+function(e,t){const n=fe(e,t?.in),i=n.getMonth();return n.setFullYear(n.getFullYear(),i+1,0),n.setHours(23,59,59,999),n}(n,t)})(i)&&1===o&&1===Cv(i,a)&&(l=!1);const c=s*(o-+l);return 0===c?0:c}function Iv(e,t,n){return Dv(e,-t,n)}function Rv(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 Pv(e,t,n){const i=fe(e,n?.in);return isNaN(t)?ue(e,NaN):(t&&i.setDate(i.getDate()+t),i)}function jv(e,t,n){return Pv(e,-t,n)}function Fv(e){return e=>{const t=(0,Math.trunc)(e);return 0===t?0:t}}function Bv(e,t,n){return ue(e,+fe(e)+t)}function Uv(e,t,n){return Bv(e,t*le)}function Vv(e,t,n){return Uv(e,-t)}function Hv(e,t){return+fe(e)-+fe(t)}function Gv(e,t,n){const i=Hv(e,t)/6e4;return Fv()(i)}function Zv(e,t,n){const i=fe(e,n?.in);return i.setTime(i.getTime()+6e4*t),i}function Wv(e,t,n){return Zv(e,-t,n)}function qv(e,t,n){const i=Hv(e,t)/1e3;return Fv()(i)}function Yv(e,t,n){return Bv(e,1e3*t)}function Xv(e,t,n){return Yv(e,-t)}class Kv extends zp{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,i=uc(t,"axes",this.secondaryDomainAxisPosition),r=e[n];if(i?.correspondingDatasets&&i.correspondingDatasets.includes(r))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:e=null,groups:t=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:i}=n.data,r=uc(n,"axes",this.secondaryRangeAxisPosition);let a;if(null!==e?a=e[i]:t&&t.length>0&&(a=t[0]),r?.correspondingDatasets&&r.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(e){return uc(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===N.BOTTOM||e===N.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(N).map(e=>N[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!==N.LEFT&&this.rangeAxisPosition!==N.RIGHT||this.domainAxisPosition!==N.BOTTOM&&this.domainAxisPosition!==N.TOP?this.orientation=P.HORIZONTAL:this.orientation=P.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){const e=this.model.getOptions(),t=uc(e,"axes");(t[N.LEFT]?.correspondingDatasets&&t[N.RIGHT]||t[N.RIGHT]?.correspondingDatasets&&t[N.LEFT]||t[N.TOP]?.correspondingDatasets&&t[N.BOTTOM]||t[N.BOTTOM]?.correspondingDatasets&&t[N.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(e){const t=uc(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]===j.LINEAR||this.scaleTypes[e]===j.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=[N.BOTTOM,N.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(t=>e.indexOf(t)>-1)}getMainYAxisPosition(){const e=[N.LEFT,N.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,i){const r=this.model.getOptions(),a=uc(r,"axes")[n],{mapsTo:s}=a,o=null!==uc(i,s)?i[s]:i;let l;switch(t){case j.LABELS:l=e(o)+e.step()/2;break;case j.TIME:l=e(new Date(o));break;default:l=e(o)}return l}getBoundedScaledValues(e){const{bounds:t}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:e}),i=this.scales[n],r=this.model.getOptions(),a=uc(r,"axes")[n],{mapsTo:s}=a,o=void 0!==e[s]?e[s]:e;return[i(null!==uc(e,t.upperBoundMapsTo)?e[t.upperBoundMapsTo]:o),i(null!==uc(e,t.lowerBoundMapsTo)?e[t.lowerBoundMapsTo]:o)]}getValueThroughAxisPosition(e,t){const n=this.scaleTypes[e],i=this.scales[e];return this.getValueFromScale(i,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 uc(t,"axes",this.getDomainAxisPosition({datum:e}),"mapsTo")}getRangeIdentifier(e){const t=this.model.getOptions();return uc(t,"axes",this.getRangeAxisPosition({datum:e}),"mapsTo")}extendsDomain(e,t){const n=this.model.getOptions(),i=uc(n,"axes",e);return i.scaleType===j.TIME?function(e,t){const n=new Date(e[0]),i=new Date(e[1]);return function(e,t){const[n,i]=he(0,e,t),r=Cv(n,i),a=Math.abs(function(e,t){const[n,i]=he(0,e,t);return n.getFullYear()-i.getFullYear()}(n,i));n.setFullYear(1584),i.setFullYear(1584);const s=r*(a-+(Cv(n,i)===-r));return 0===s?0:s}(i,n)>1?[Lv(n,t),zv(i,t)]:Nv(i,n)>1?[Iv(n,t),Dv(i,t)]:function(e,t){const[n,i]=he(0,e,t),r=Rv(n,i),a=Math.abs(gc(n,i));n.setDate(n.getDate()-r*a);const s=r*(a-+(Rv(n,i)===-r));return 0===s?0:s}(i,n)>1?[jv(n,t),Pv(i,t)]:function(e,t){const[n,i]=he(0,e,t),r=(+n-+i)/le;return Fv()(r)}(i,n)>1?[Vv(n,t),Uv(i,t)]:Gv(i,n)>30?[Wv(n,30*t),Zv(i,30*t)]:Gv(i,n)>1?[Wv(n,t),Zv(i,t)]:qv(i,n)>15?[Xv(n,15*t),Yv(i,15*t)]:qv(i,n)>1?[Xv(n,t),Yv(i,t)]:[n,i]}(t,uc(n,"timeScale","addSpaceOnEdges")):function([e,t],n,i){const r=(t-e)*n,a=t<=0&&t+r>0?0:t+r;let s=e>=0&&e-r<0?0:e-r;if(i===j.LOG&&s<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=e}return[s,a]}(t,.1,i.scaleType)}findVerticalAxesPositions(){const e=this.model.getOptions(),t=uc(e,"axes"),n=this.isDualAxes();return null===uc(t,N.LEFT)&&null!==uc(t,N.RIGHT)||!0===uc(t,N.RIGHT,"main")||n&&uc(t,N.LEFT,"correspondingDatasets")?{primary:N.RIGHT,secondary:N.LEFT}:{primary:N.LEFT,secondary:N.RIGHT}}findHorizontalAxesPositions(){const e=this.model.getOptions(),t=uc(e,"axes"),n=this.isDualAxes();return null===uc(t,N.BOTTOM)&&null!==uc(t,N.TOP)||!0===uc(t,N.TOP,"main")||n&&uc(t,N.BOTTOM,"correspondingDatasets")?{primary:N.TOP,secondary:N.BOTTOM}:{primary:N.BOTTOM,secondary:N.TOP}}findDomainAndRangeAxesPositions(e,t){const n=this.model.getOptions(),i=uc(n,"axes",e.primary),r=uc(n,"axes",t.primary),a=i.scaleType||j.LINEAR,s=r.scaleType||j.LINEAR,o={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return o.primaryDomainAxisPosition=t.primary,o.primaryRangeAxisPosition=e.primary,o.secondaryDomainAxisPosition=t.secondary,o.secondaryRangeAxisPosition=e.secondary,(!(s===j.LABELS||s===j.TIME)&&a===j.LABELS||a===j.TIME)&&(o.primaryDomainAxisPosition=e.primary,o.primaryRangeAxisPosition=t.primary,o.secondaryDomainAxisPosition=e.secondary,o.secondaryRangeAxisPosition=t.secondary),o}getScaleDomain(e){const t=this.model.getOptions(),n=uc(t,"axes",e),i=uc(t,"bounds"),{includeZero:r}=n,a=uc(n,"scaleType")||j.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:e}=this.model.getBinConfigurations();return[0,yr(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 s=this.model.getDisplayData(),{extendLinearDomainBy:o,mapsTo:l,percentage:c,thresholds:u}=n,{reference:h,compareTo:d}=hl;if(n.domain)return a===j.LABELS?n.domain:(a===j.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&&a===j.LABELS)return er(s.map(e=>e[l]));let p,f;const g=this.model.getDataGroupNames();if(a===j.LABELS_RATIO)return s.map(e=>`${e[h]}/${e[d]}`);if(a===j.TIME)f=s.map(e=>+new Date(e[l]));else if(i&&t.axes)f=[],s.forEach(e=>{f.push(e[l]),e[i.upperBoundMapsTo]&&f.push(e[i.upperBoundMapsTo]),e[i.lowerBoundMapsTo]&&f.push(e[i.lowerBoundMapsTo])});else if(!0===n.stacked&&g&&e===this.getRangeAxisPosition()){const{groupMapsTo:e}=t.data,n=this.model.getDataValuesGroupedByKeys({groups:g}),i=s.filter(t=>!g.includes(t[e])),r=[];n.forEach(e=>{const{...t}=e;let n=0,i=0;Object.values(Ly(t,"sharedStackKey")).forEach(e=>{isNaN(e)||(e<0?i+=e:n+=e)}),r.push([i,n])}),f=[...Oy(r),...i.map(e=>e[l])]}else f=[],s.forEach(e=>{const t=e[l];Array.isArray(t)&&2===t.length?(f.push(t[0]),f.push(t[1])):(o&&f.push(Math.max(e[l],e[o])),f.push(t))});return a!==j.TIME&&a!==j.LOG&&r&&f.push(0),u&&u.length>0&&u.forEach(e=>{const t=uc(e,"value");null!==t&&f.push(t)}),p=sr(f),p=this.extendsDomain(e,p),p}createScale(e){const t=this.model.getOptions(),n=uc(t,"axes",e);if(!n)return null;const i=uc(n,"scaleType")||j.LINEAR;let r;return this.scaleTypes[e]=i,r=i===j.TIME?Rd():i===j.LOG?By().base(n.base||10):i===j.LABELS||i===j.LABELS_RATIO?Au():al(),r.domain(this.getScaleDomain(e)),r}getDomainLowerBound(e){let t,n=0;return t=this.getOrientation()===P.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===uc(this.model.getOptions(),"axes",e,"includeZero")&&t[0]>0&&t[1]>0&&(n=t[0]),n}getHighestDomainThreshold(){const e=uc(this.model.getOptions(),"axes"),t=this.getDomainAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getDomainScale(),r=n.sort((e,t)=>t.value-e.value)[0];return this.getScaleTypeByPosition(t)===j.TIME&&("string"==typeof r.value||void 0===r.value.getTime)&&(r.value=new Date(r.value)),{threshold:r,scaleValue:i(r.value)}}getHighestRangeThreshold(){const e=uc(this.model.getOptions(),"axes"),t=this.getRangeAxisPosition(),{thresholds:n}=e[t];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const i=this.getRangeScale(),r=n.sort((e,t)=>t.value-e.value)[0];return{threshold:r,scaleValue:i(r.value)}}}class Qv extends zp{constructor(){super(...arguments),this.curveTypes={curveLinear:Kd,curveLinearClosed:ep,curveBasis:Hy,curveBasisClosed:Zy,curveBasisOpen:qy,curveBundle:Xy,curveCardinal:Jy,curveCardinalClosed:tv,curveCardinalOpen:iv,curveCatmullRom:sv,curveCatmullRomClosed:lv,curveCatmullRomOpen:uv,curveMonotoneX:vv,curveMonotoneY:bv,curveNatural:wv,curveStep:kv,curveStepAfter:Ev,curveStepBefore:$v}}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 Jv extends zp{isZoomBarEnabled(){if(!this.services.cartesianScales||!uc(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const e=this.services.cartesianScales.getMainXAxisPosition(),t=uc(this.model.getOptions(),"axes",e,"scaleType");return e===N.BOTTOM&&t===j.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 i=n.getMainXAxisPosition(),r=n.getDomainIdentifier(),a=uc(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(a)&&2===a.length)return a;if(!i)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(i,sr(t,e=>e[r]))}handleDomainChange(e,t={dispatchEvent:!0}){this.model.set({zoomDomain:e},{animate:!1}),t.dispatchEvent&&this.services.events?.dispatchEvent(C.ZoomDomain.CHANGE,{newDomain:e})}getZoomRatio(){return uc(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(e,t){const n=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},t),r=uc(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&r&&n){const t=i.stacked?"sharedStackKey":this.services.cartesianScales?.getDomainIdentifier(),r=e.filter(e=>new Date(e[t])>=n[0]&&new Date(e[t])<=n[1]);if(r.length>0)return r}return e}zoomIn(e=this.getZoomRatio()){const t=this.model.get("zoomDomain"),n=wl.handleWidth,i=this.services.cartesianScales?.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const r=i(t[0]),a=i(t[1]);if(a-r<n+1)return;const s=i.range(),o=a-r,l=Math.min((s[1]-s[0])/2*(e/2),o/2);let c=r+l,u=a-l;c>=u&&(c=r+o/2-n/2,u=a-o/2+n/2);const h=[i.invert(c),i.invert(u)];(t[0].valueOf()!==h[0].valueOf()||t[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 i=n(t[0]),r=n(t[1]),a=n.range(),s=(a[1]-a[0])/2*(e/2),o=Math.max(i-s,a[0]),l=Math.min(r+s,a[1]),c=[n.invert(o),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())<uc(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 uc(this.model.getOptions(),"zoomBar",e,"loading")}isZoomBarLocked(e){return uc(this.model.getOptions(),"zoomBar",e,"locked")}}var eb=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function tb(e){return eb.test(e)}var nb="\\ud800-\\udfff",ib="["+nb+"]",rb="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ab="\\ud83c[\\udffb-\\udfff]",sb="[^"+nb+"]",ob="(?:\\ud83c[\\udde6-\\uddff]){2}",lb="[\\ud800-\\udbff][\\udc00-\\udfff]",cb="(?:"+rb+"|"+ab+")?",ub="[\\ufe0e\\ufe0f]?",hb=ub+cb+"(?:\\u200d(?:"+[sb,ob,lb].join("|")+")"+ub+cb+")*",db="(?:"+[sb+rb+"?",rb,ob,lb,ib].join("|")+")",pb=RegExp(ab+"(?="+ab+")|"+db+hb,"g");var fb=function(e){var t=tb(e=yn(e))?function(e){return tb(e)?function(e){return e.match(pb)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,n=t?t[0]:e.charAt(0),i=t?function(e,t,n){var i=e.length;return Cy(e,1,n=void 0===n?i:n)}(t).join(""):e.slice(1);return n.toUpperCase()+i};hf(function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return fb(yn(e).toLowerCase())}(t):t)});class gb{constructor(e,t){this.components=[],this.services={canvasZoom:Tv,domUtils:Lp,events:Sv,files:Mv,gradientUtils:Np,transitions:Ov},this.model=new uu(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(C.Model.UPDATE,e=>{const t=!!uc(e,"detail","animate");this.update(t)}),this.model.setData(t.data),this.services.events.addEventListener(C.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(C.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(),i=uc(n,"toolbar","enabled"),r={id:"legend",components:[new Gm(this.model,this.services)],growth:G.PREFERRED},a=uc(n,"canvasZoom","enabled");a&&!0===a&&e.push(new Wm(this.model,this.services));const s=!!this.model.getOptions().title,o={id:"title",components:[new Hm(this.model,this.services)],growth:G.STRETCH},l={id:"toolbar",components:[new jm(this.model,this.services)],growth:G.PREFERRED},c={id:"header",components:[new Bm(this.model,this.services,[o,...i?[l]:[]],{direction:H.ROW,alignItems:Z.CENTER})],growth:G.PREFERRED},u={id:"graph-frame",components:e,growth:G.STRETCH,renderType:uc(t,"graphFrameRenderType")||D.SVG},h=!0!==uc(t,"excludeLegend")&&!1!==n.legend.enabled;let d=H.COLUMN;if(h){const e=uc(n,"legend","position");"left"===e?(d=H.ROW,n.legend.orientation||(n.legend.orientation=U.VERTICAL)):"right"===e?(d=H.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=U.VERTICAL)):"bottom"===e&&(d=H.COLUMN_REVERSE)}const p={id:"spacer",components:[new Um(this.model,this.services)],growth:G.PREFERRED},f={id:"full-frame",components:[new Bm(this.model,this.services,[...h?[r]:[],...h?[p]:[],u],{direction:d})],growth:G.STRETCH},g=[];if(s||i){g.push(c);const e={id:"spacer",components:[new Um(this.model,this.services,i?{size:15}:void 0)],growth:G.PREFERRED};g.push(e)}return g.push(f),[new Jm(this.model,this.services),new Vm(this.model,this.services),new Bm(this.model,this.services,g,{direction:H.COLUMN})]}}class mb extends gb{constructor(e,t){super(e,t),this.services=Object.assign(this.services,{cartesianScales:Kv,curves:Qv,zoom:Jv}),this.model=new hu(this.services)}getAxisChartComponents(e,t){const n=this.model.getOptions(),i=uc(n,"zoomBar",N.TOP,"enabled"),r=uc(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),s=uc(n,"axes",a,"scaleType"),o=i&&a===N.BOTTOM&&s===j.TIME,l=this.services.zoom.isZoomBarLocked(N.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new Hm(this.model,this.services)],growth:G.STRETCH},h={id:"toolbar",components:[new jm(this.model,this.services)],growth:G.PREFERRED},d={id:"header",components:[new Bm(this.model,this.services,[u,...r?[h]:[]],{direction:H.ROW,alignItems:Z.CENTER})],growth:G.PREFERRED},p={id:"legend",components:[new Gm(this.model,this.services)],growth:G.PREFERRED};o&&!l&&e.push(new Zm(this.model,this.services),new ty(this.model,this.services)),e.push(new iy(this.model,this.services)),e.push(new ry(this.model,this.services));const f={id:"graph-frame",components:e,growth:G.STRETCH,renderType:D.SVG},g=!1!==uc(t,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let m=H.COLUMN;if(g){const e=uc(this.model.getOptions(),"legend","position");e===F.LEFT?(m=H.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=U.VERTICAL)):e===F.RIGHT?(m=H.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=U.VERTICAL)):e===F.BOTTOM&&(m=H.COLUMN_REVERSE)}const y={id:"spacer",components:[new Um(this.model,this.services)],growth:G.PREFERRED},v={id:"full-frame",components:[new Bm(this.model,this.services,[...g?[p]:[],...g?[y]:[],f],{direction:m})],growth:G.STRETCH},b={id:"zoom-bar",components:[new ny(this.model,this.services)],growth:G.PREFERRED,renderType:D.SVG},_=[];if(c||r){_.push(d);const e={id:"spacer",components:[new Um(this.model,this.services,r?{size:15}:void 0)],growth:G.PREFERRED};_.push(e)}return o&&_.push(b),_.push(v),[new ay(this.model,this.services),new Vm(this.model,this.services),new Bm(this.model,this.services,_,{direction:H.COLUMN})]}}X.LINE,X.SCATTER,X.AREA,X.STACKED_AREA,X.SIMPLE_BAR,X.GROUPED_BAR,X.STACKED_BAR;class yb extends mb{constructor(e,t){super(e,t),this.model.setOptions(function(e,t){const n=ki(e),i=Object.keys(t.axes||{});t?.toolbar?.controls&&delete n.toolbar.controls,0===i.length&&delete n.axes;for(const e in n.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===j.TIME?n.mapsTo="date":e===j.LABELS&&(n.mapsTo="key")}}else delete n.axes[e];return cc(n,t),Xi(n,t)}(sc.lineChart,t.options)),this.init(e,t)}getComponents(){const e=[new yy(this.model,this.services),new hy(this.model,this.services),new py(this.model,this.services),new dy(this.model,this.services),new fy(this.model,this.services,{handleThresholds:!0}),new _y(this.model,this.services),new by(this.model,this.services)];return this.getAxisChartComponents(e)}}class vb extends i.PureComponent{chart;chartRef=i.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){this.props.data!==e.data&&this.chart?.model.setData(this.props.data),this.props.options!==e.options&&this.chart?.model.setOptions(this.props.options)}render(){return i.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class bb extends vb{createChart(e,t,n){return new yb(e,{data:t,options:n})}}var _b;_b||(_b=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,i(n)))}return e}function i(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 i="";for(var a in e)t.call(e,a)&&e[a]&&(i=r(i,a));return i}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}({exports:{}}))},52291:(e,t,n)=>{var i=n(65650),r=n(65111),a=n(53142),s=n(51187),o=i?i.prototype:void 0,l=o?o.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return r(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},52837:e=>{e.exports=function(e){return e.split("")}},53142:e=>{var t=Array.isArray;e.exports=t},54732:(e,t,n)=>{var i=n(44700);e.exports=function(e){return i(this,e).has(e)}},56005:(e,t,n)=>{var i=n(95243),r=n(5485);e.exports=function(e){return r(i(e).toLowerCase())}},56027:(e,t,n)=>{var i=n(87379),r=n(80547);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},57073:(e,t,n)=>{var i=n(72532);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},57200:(e,t,n)=>{var i=n(41580),r=n(84882),a=n(38546),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return a(e);var t=r(e),n=[];for(var o in e)("constructor"!=o||!t&&s.call(e,o))&&n.push(o);return n}},57452:(e,t,n)=>{var i=n(94497);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},57923:(e,t,n)=>{var i=n(93526),r=n(66040);e.exports=function(e,t){for(var n=0,a=(t=i(t,e)).length;null!=e&&n<a;)e=e[r(t[n++])];return n&&n==a?e:void 0}},58898:(e,t,n)=>{var i=n(31623);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},59068:(e,t,n)=>{var i=n(44700);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},62049:(e,t,n)=>{var i=n(97034),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0||(n==t.length-1?t.pop():r.call(t,n,1),--this.size,0))}},63521:(e,t,n)=>{var i=n(51187);e.exports=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,a=e==e,s=i(e),o=void 0!==t,l=null===t,c=t==t,u=i(t);if(!l&&!u&&!s&&e>t||s&&o&&c&&!l&&!u||r&&o&&c||!n&&c||!a)return 1;if(!r&&!s&&!u&&e<t||u&&n&&a&&!r&&!s||l&&n&&a||!o&&a||!c)return-1}return 0}},64066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},64512:(e,t,n)=>{var i=n(94715)(n(78942),"Set");e.exports=i},64759:(e,t,n)=>{var i,r=n(41950),a=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!a&&a in e}},65111:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},65187:(e,t,n)=>{var i=n(53142),r=n(51187),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!r(e))||s.test(e)||!a.test(e)||null!=t&&e in Object(t)}},65387:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},65568:e=>{e.exports=function(e,t){return e.has(t)}},65650:(e,t,n)=>{var i=n(78942).Symbol;e.exports=i},66040:(e,t,n)=>{var i=n(51187);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},67267:(e,t,n)=>{var i=n(41580);e.exports=function(e){return e==e&&!i(e)}},68250:(e,t,n)=>{var i=n(49753),r=n(5681),a=n(80088),s=n(54732),o=n(59068);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,e.exports=l},68580:(e,t,n)=>{"use strict";var i,r;n.d(t,{p6:()=>ze,k5:()=>Ne,Ik:()=>Le,Yj:()=>De}),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(i||(i={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(r||(r={}));const a=i.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s=e=>{switch(typeof e){case"undefined":return a.undefined;case"string":return a.string;case"number":return Number.isNaN(e)?a.nan:a.number;case"boolean":return a.boolean;case"function":return a.function;case"bigint":return a.bigint;case"symbol":return a.symbol;case"object":return Array.isArray(e)?a.array:null===e?a.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?a.promise:"undefined"!=typeof Map&&e instanceof Map?a.map:"undefined"!=typeof Set&&e instanceof Set?a.set:"undefined"!=typeof Date&&e instanceof Date?a.date:a.object;default:return a.unknown}},o=i.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class l extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof l))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,i.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)if(i.path.length>0){const n=i.path[0];t[n]=t[n]||[],t[n].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}l.create=e=>new l(e);const c=(e,t)=>{let n;switch(e.code){case o.invalid_type:n=e.received===a.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,i.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:n=`Unrecognized key(s) in object: ${i.joinValues(e.keys,", ")}`;break;case o.invalid_union:n="Invalid input";break;case o.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${i.joinValues(e.options)}`;break;case o.invalid_enum_value:n=`Invalid enum value. Expected ${i.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:n="Invalid function arguments";break;case o.invalid_return_type:n="Invalid function return type";break;case o.invalid_date:n="Invalid date";break;case o.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:i.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.custom:n="Invalid input";break;case o.invalid_intersection_types:n="Intersection results could not be merged";break;case o.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case o.not_finite:n="Number must be finite";break;default:n=t.defaultError,i.assertNever(e)}return{message:n}};let u=c;var h;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(h||(h={}));function d(e,t){const n=u,i=(e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],s={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let o="";const l=i.filter(e=>!!e).slice().reverse();for(const e of l)o=e(s,{data:t,defaultError:o}).message;return{...r,path:a,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].filter(e=>!!e)});e.common.issues.push(i)}class p{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return f;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return p.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:r}=i;if("aborted"===t.status)return f;if("aborted"===r.status)return f;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!i.alwaysSet||(n[t.value]=r.value)}return{status:e.value,value:n}}}const f=Object.freeze({status:"aborted"}),g=e=>({status:"dirty",value:e}),m=e=>({status:"valid",value:e}),y=e=>"aborted"===e.status,v=e=>"dirty"===e.status,b=e=>"valid"===e.status,_=e=>"undefined"!=typeof Promise&&e instanceof Promise;class x{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w=(e,t)=>{if(b(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new l(e.common.issues);return this._error=t,this._error}}};function A(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class k{get description(){return this._def.description}_getType(e){return s(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p,ctx:{common:e.parent.common,data:e.data,parsedType:s(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(_(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},i=this._parseSync({data:e,path:n.path,parent:n});return w(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return b(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>b(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:s(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(_(i)?i:Promise.resolve(i));return w(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,i)=>{const r=e(t),a=()=>i.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then(e=>!!e||(a(),!1)):!!r||(a(),!1)})}refinement(e,t){return this._refinement((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1))}_refinement(e){return new we({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ae.create(this,this._def)}nullable(){return ke.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oe.create(this)}promise(){return xe.create(this,this._def)}or(e){return ue.create([this,e],this._def)}and(e){return de.create(this,e,this._def)}transform(e){return new we({...A(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new $e({...A(this._def),innerType:this,defaultValue:t,typeName:Ce.ZodDefault})}brand(){return new Se({typeName:Ce.ZodBranded,type:this,...A(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ee({...A(this._def),innerType:this,catchValue:t,typeName:Ce.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Me.create(this,e)}readonly(){return Oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $=/^c[^\s-]{8,}$/i,E=/^[0-9a-z]+$/,T=/^[0-9A-HJKMNP-TV-Z]{26}$/i,S=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,M=/^[a-z0-9_-]{21}$/i,O=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,C=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let z;const L=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,I=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,R=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,P=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,j=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,F="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",B=new RegExp(`^${F}$`);function U(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function V(e){return new RegExp(`^${U(e)}$`)}function H(e){let t=`${F}T${U(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function G(e,t){return!("v4"!==t&&t||!L.test(e))||!("v6"!==t&&t||!I.test(e))}function Z(e,t){if(!O.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return!("object"!=typeof r||null===r||"typ"in r&&"JWT"!==r?.typ||!r.alg||t&&r.alg!==t)}catch{return!1}}function W(e,t){return!("v4"!==t&&t||!N.test(e))||!("v6"!==t&&t||!R.test(e))}class q extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==a.string){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.string,received:t.parsedType}),f}const t=new p;let n;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?d(n,{code:o.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&d(n,{code:o.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)D.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"email",code:o.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)z||(z=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),z.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"emoji",code:o.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)S.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"uuid",code:o.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)M.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"nanoid",code:o.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)$.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid",code:o.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)E.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cuid2",code:o.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)T.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ulid",code:o.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),d(n,{validation:"url",code:o.invalid_string,message:r.message}),t.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"regex",code:o.invalid_string,message:r.message}),t.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):"datetime"===r.kind?H(r).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"datetime",message:r.message}),t.dirty()):"date"===r.kind?B.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"date",message:r.message}),t.dirty()):"time"===r.kind?V(r).test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:o.invalid_string,validation:"time",message:r.message}),t.dirty()):"duration"===r.kind?C.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"duration",code:o.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?G(e.data,r.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"ip",code:o.invalid_string,message:r.message}),t.dirty()):"jwt"===r.kind?Z(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"jwt",code:o.invalid_string,message:r.message}),t.dirty()):"cidr"===r.kind?W(e.data,r.version)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"cidr",code:o.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?P.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64",code:o.invalid_string,message:r.message}),t.dirty()):"base64url"===r.kind?j.test(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{validation:"base64url",code:o.invalid_string,message:r.message}),t.dirty()):i.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:o.invalid_string,...h.errToObj(n)})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Y(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}q.create=e=>new q({checks:[],typeName:Ce.ZodString,coerce:e?.coerce??!1,...A(e)});class X extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==a.number){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.number,received:t.parsedType}),f}let t;const n=new p;for(const r of this._def.checks)"int"===r.kind?i.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),d(t,{code:o.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==Y(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_finite,message:r.message}),n.dirty()):i.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,i){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(i)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&i.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}X.create=e=>new X({checks:[],typeName:Ce.ZodNumber,coerce:e?.coerce||!1,...A(e)});class K extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==a.bigint)return this._getInvalidInput(e);let t;const n=new p;for(const r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),d(t,{code:o.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):i.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.bigint,received:t.parsedType}),f}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,i){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(i)}]})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}K.create=e=>new K({checks:[],typeName:Ce.ZodBigInt,coerce:e?.coerce??!1,...A(e)});class Q extends k{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==a.boolean){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.boolean,received:t.parsedType}),f}return m(e.data)}}Q.create=e=>new Q({typeName:Ce.ZodBoolean,coerce:e?.coerce||!1,...A(e)});class J extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==a.date){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.date,received:t.parsedType}),f}if(Number.isNaN(e.data.getTime()))return d(this._getOrReturnCtx(e),{code:o.invalid_date}),f;const t=new p;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:o.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):i.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}J.create=e=>new J({checks:[],coerce:e?.coerce||!1,typeName:Ce.ZodDate,...A(e)});class ee extends k{_parse(e){if(this._getType(e)!==a.symbol){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.symbol,received:t.parsedType}),f}return m(e.data)}}ee.create=e=>new ee({typeName:Ce.ZodSymbol,...A(e)});class te extends k{_parse(e){if(this._getType(e)!==a.undefined){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.undefined,received:t.parsedType}),f}return m(e.data)}}te.create=e=>new te({typeName:Ce.ZodUndefined,...A(e)});class ne extends k{_parse(e){if(this._getType(e)!==a.null){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.null,received:t.parsedType}),f}return m(e.data)}}ne.create=e=>new ne({typeName:Ce.ZodNull,...A(e)});class ie extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return m(e.data)}}ie.create=e=>new ie({typeName:Ce.ZodAny,...A(e)});class re extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return m(e.data)}}re.create=e=>new re({typeName:Ce.ZodUnknown,...A(e)});class ae extends k{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.never,received:t.parsedType}),f}}ae.create=e=>new ae({typeName:Ce.ZodNever,...A(e)});class se extends k{_parse(e){if(this._getType(e)!==a.undefined){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.void,received:t.parsedType}),f}return m(e.data)}}se.create=e=>new se({typeName:Ce.ZodVoid,...A(e)});class oe extends k{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==a.array)return d(t,{code:o.invalid_type,expected:a.array,received:t.parsedType}),f;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(d(t,{code:e?o.too_big:o.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(d(t,{code:o.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(d(t,{code:o.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>i.type._parseAsync(new x(t,e,t.path,n)))).then(e=>p.mergeArray(n,e));const r=[...t.data].map((e,n)=>i.type._parseSync(new x(t,e,t.path,n)));return p.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new oe({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new oe({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new oe({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}function le(e){if(e instanceof ce){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=Ae.create(le(i))}return new ce({...e._def,shape:()=>t})}return e instanceof oe?new oe({...e._def,type:le(e.element)}):e instanceof Ae?Ae.create(le(e.unwrap())):e instanceof ke?ke.create(le(e.unwrap())):e instanceof pe?pe.create(e.items.map(e=>le(e))):e}oe.create=(e,t)=>new oe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...A(t)});class ce extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=i.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==a.object){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.object,received:t.parsedType}),f}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),s=[];if(!(this._def.catchall instanceof ae&&"strip"===this._def.unknownKeys))for(const e in n.data)r.includes(e)||s.push(e);const l=[];for(const e of r){const t=i[e],r=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new x(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof ae){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&(d(n,{code:o.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const i=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new x(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of l){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e}).then(e=>p.mergeObjectSync(t,e)):p.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new ce({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const i=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:h.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new ce({...this._def,unknownKeys:"strip"})}passthrough(){return new ce({...this._def,unknownKeys:"passthrough"})}extend(e){return new ce({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ce({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ce.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ce({...this._def,catchall:e})}pick(e){const t={};for(const n of i.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new ce({...this._def,shape:()=>t})}omit(e){const t={};for(const n of i.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new ce({...this._def,shape:()=>t})}deepPartial(){return le(this)}partial(e){const t={};for(const n of i.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new ce({...this._def,shape:()=>t})}required(e){const t={};for(const n of i.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ae;)e=e._def.innerType;t[n]=e}return new ce({...this._def,shape:()=>t})}keyof(){return ve(i.objectKeys(this.shape))}}ce.create=(e,t)=>new ce({shape:()=>e,unknownKeys:"strip",catchall:ae.create(),typeName:Ce.ZodObject,...A(t)}),ce.strictCreate=(e,t)=>new ce({shape:()=>e,unknownKeys:"strict",catchall:ae.create(),typeName:Ce.ZodObject,...A(t)}),ce.lazycreate=(e,t)=>new ce({shape:e,unknownKeys:"strip",catchall:ae.create(),typeName:Ce.ZodObject,...A(t)});class ue extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map(e=>new l(e.ctx.common.issues));return d(t,{code:o.invalid_union,unionErrors:n}),f});{let e;const i=[];for(const r of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=r._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=i.map(e=>new l(e));return d(t,{code:o.invalid_union,unionErrors:r}),f}}get options(){return this._def.options}}function he(e,t){const n=s(e),r=s(t);if(e===t)return{valid:!0,data:e};if(n===a.object&&r===a.object){const n=i.objectKeys(t),r=i.objectKeys(e).filter(e=>-1!==n.indexOf(e)),a={...e,...t};for(const n of r){const i=he(e[n],t[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===a.array&&r===a.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=he(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===a.date&&r===a.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}ue.create=(e,t)=>new ue({options:e,typeName:Ce.ZodUnion,...A(t)});class de extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if(y(e)||y(i))return f;const r=he(e.value,i.value);return r.valid?((v(e)||v(i))&&t.dirty(),{status:t.value,value:r.data}):(d(n,{code:o.invalid_intersection_types}),f)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>i(e,t)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}de.create=(e,t,n)=>new de({left:e,right:t,typeName:Ce.ZodIntersection,...A(n)});class pe extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.array)return d(n,{code:o.invalid_type,expected:a.array,received:n.parsedType}),f;if(n.data.length<this._def.items.length)return d(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f;!this._def.rest&&n.data.length>this._def.items.length&&(d(n,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new x(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(i).then(e=>p.mergeArray(t,e)):p.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new pe({...this._def,rest:e})}}pe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pe({items:e,typeName:Ce.ZodTuple,rest:null,...A(t)})};class fe extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.map)return d(n,{code:o.invalid_type,expected:a.map,received:n.parsedType}),f;const i=this._def.keyType,r=this._def.valueType,s=[...n.data.entries()].map(([e,t],a)=>({key:i._parse(new x(n,e,n.path,[a,"key"])),value:r._parse(new x(n,t,n.path,[a,"value"]))}));if(n.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const n of s){const i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return f;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}})}{const e=new Map;for(const n of s){const i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return f;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}}}fe.create=(e,t,n)=>new fe({valueType:t,keyType:e,typeName:Ce.ZodMap,...A(n)});class ge extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.set)return d(n,{code:o.invalid_type,expected:a.set,received:n.parsedType}),f;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(d(n,{code:o.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(d(n,{code:o.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function s(e){const n=new Set;for(const i of e){if("aborted"===i.status)return f;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const l=[...n.data.values()].map((e,t)=>r._parse(new x(n,e,n.path,t)));return n.common.async?Promise.all(l).then(e=>s(e)):s(l)}min(e,t){return new ge({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new ge({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ge.create=(e,t)=>new ge({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...A(t)});class me extends k{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}me.create=(e,t)=>new me({getter:e,typeName:Ce.ZodLazy,...A(t)});class ye extends k{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),f}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ve(e,t){return new be({values:e,typeName:Ce.ZodEnum,...A(t)})}ye.create=(e,t)=>new ye({value:e,typeName:Ce.ZodLiteral,...A(t)});class be extends k{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{expected:i.joinValues(n),received:t.parsedType,code:o.invalid_type}),f}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{received:t.data,code:o.invalid_enum_value,options:n}),f}return m(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return be.create(e,{...this._def,...t})}exclude(e,t=this._def){return be.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}be.create=ve;class _e extends k{_parse(e){const t=i.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==a.string&&n.parsedType!==a.number){const e=i.objectValues(t);return d(n,{expected:i.joinValues(e),received:n.parsedType,code:o.invalid_type}),f}if(this._cache||(this._cache=new Set(i.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=i.objectValues(t);return d(n,{received:n.data,code:o.invalid_enum_value,options:e}),f}return m(e.data)}get enum(){return this._def.values}}_e.create=(e,t)=>new _e({values:e,typeName:Ce.ZodNativeEnum,...A(t)});class xe extends k{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==a.promise&&!1===t.common.async)return d(t,{code:o.invalid_type,expected:a.promise,received:t.parsedType}),f;const n=t.parsedType===a.promise?t.data:Promise.resolve(t.data);return m(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}xe.create=(e,t)=>new xe({type:e,typeName:Ce.ZodPromise,...A(t)});class we extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,a={addIssue:e=>{d(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===r.type){const e=r.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return f;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?f:"dirty"===i.status||"dirty"===t.value?g(i.value):i});{if("aborted"===t.value)return f;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?f:"dirty"===i.status||"dirty"===t.value?g(i.value):i}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?f:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?f:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!b(e))return f;const i=r.transform(e.value,a);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>b(e)?Promise.resolve(r.transform(e.value,a)).then(e=>({status:t.value,value:e})):f)}i.assertNever(r)}}we.create=(e,t,n)=>new we({schema:e,typeName:Ce.ZodEffects,effect:t,...A(n)}),we.createWithPreprocess=(e,t,n)=>new we({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...A(n)});class Ae extends k{_parse(e){return this._getType(e)===a.undefined?m(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ce.ZodOptional,...A(t)});class ke extends k{_parse(e){return this._getType(e)===a.null?m(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ke.create=(e,t)=>new ke({innerType:e,typeName:Ce.ZodNullable,...A(t)});class $e extends k{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===a.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}$e.create=(e,t)=>new $e({innerType:e,typeName:Ce.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...A(t)});class Ee extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _(i)?i.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ee.create=(e,t)=>new Ee({innerType:e,typeName:Ce.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...A(t)});class Te extends k{_parse(e){if(this._getType(e)!==a.nan){const t=this._getOrReturnCtx(e);return d(t,{code:o.invalid_type,expected:a.nan,received:t.parsedType}),f}return{status:"valid",value:e.data}}}Te.create=e=>new Te({typeName:Ce.ZodNaN,...A(e)}),Symbol("zod_brand");class Se extends k{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Me extends k{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),g(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Me({in:e,out:t,typeName:Ce.ZodPipeline})}}class Oe extends k{_parse(e){const t=this._def.innerType._parse(e),n=e=>(b(e)&&(e.value=Object.freeze(e.value)),e);return _(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}var Ce;Oe.create=(e,t)=>new Oe({innerType:e,typeName:Ce.ZodReadonly,...A(t)}),ce.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ce||(Ce={}));const De=q.create,ze=(X.create,Te.create,K.create,Q.create,J.create),Le=(ee.create,te.create,ne.create,ie.create,re.create,ae.create,se.create,oe.create,ce.create),Ne=(ce.strictCreate,ue.create,de.create,pe.create,fe.create,ge.create,me.create,ye.create,be.create);_e.create,xe.create,we.create,Ae.create,ke.create,we.createWithPreprocess,Me.create},69011:(e,t,n)=>{var i=n(68250);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=e.apply(this,i);return n.cache=a.set(r,s)||a,s};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},69334:(e,t,n)=>{var i=n(51340),r=n(79968),a=n(3422),s=n(37930),o=n(30125),l=n(17099),c=n(84354),u=n(83546),h=n(24733),d=n(80393),p=n(93650),f=n(28486),g=n(97350),m=n(50424),y=n(75964),v=n(53142),b=n(75853),_=n(37681),x=n(41580),w=n(83943),A=n(81211),k=n(25288),$="[object Arguments]",E="[object Function]",T="[object Object]",S={};S[$]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[T]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[E]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,M,O,C,D){var z,L=1&n,N=2&n,I=4&n;if(M&&(z=C?M(t,O,C,D):M(t)),void 0!==z)return z;if(!x(t))return t;var R=v(t);if(R){if(z=g(t),!L)return c(t,z)}else{var P=f(t),j=P==E||"[object GeneratorFunction]"==P;if(b(t))return l(t,L);if(P==T||P==$||j&&!C){if(z=N||j?{}:y(t),!L)return N?h(t,o(z,t)):u(t,s(z,t))}else{if(!S[P])return C?t:{};z=m(t,P,L)}}D||(D=new i);var F=D.get(t);if(F)return F;D.set(t,z),w(t)?t.forEach(function(i){z.add(e(i,n,M,i,t,D))}):_(t)&&t.forEach(function(i,r){z.set(r,e(i,n,M,r,t,D))});var B=R?void 0:(I?N?p:d:N?k:A)(t);return r(B||t,function(i,r){B&&(i=t[r=i]),a(z,r,e(i,n,M,r,t,D))}),z}},69632:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},70310:(e,t,n)=>{var i=n(65111),r=n(57923),a=n(3334),s=n(41393),o=n(50642),l=n(49460),c=n(46775),u=n(22053),h=n(53142);e.exports=function(e,t,n){t=t.length?i(t,function(e){return h(e)?function(t){return r(t,1===e.length?e[0]:e)}:e}):[u];var d=-1;t=i(t,l(a));var p=s(e,function(e,n,r){return{criteria:i(t,function(t){return t(e)}),index:++d,value:e}});return o(p,function(e,t){return c(e,t,n)})}},70674:(e,t,n)=>{var i=n(87379),r=n(65387),a=n(80547),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&r(e.length)&&!!s[i(e)]}},72532:(e,t,n)=>{var i=n(94715),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},72828:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(30977),r=n.n(i),a=n(95924),s=n.n(a)()(r());s.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-clinical-view__empty-state__action___YzcNS{margin-bottom:.5rem}.-esm-patient-clinical-view__empty-state__content___Z5VYW{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.5rem}.-esm-patient-clinical-view__empty-state__desktopHeading___Xj2e2 h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-clinical-view__empty-state__tabletHeading___MrJbs h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-clinical-view__empty-state__desktopHeading___Xj2e2,.-esm-patient-clinical-view__empty-state__tabletHeading___MrJbs{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-clinical-view__empty-state__desktopHeading___Xj2e2 h4:after,.-esm-patient-clinical-view__empty-state__tabletHeading___MrJbs h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-clinical-view__empty-state__heading___dJ7I1:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-clinical-view__empty-state__tile___iS7NK{text-align:center;border:1px solid #e0e0e0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/empty-state/empty-state.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,yDACE,mBCgBW,CDbb,0DE01BI,2DAAA,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CFx1BF,aDHQ,CCIR,eCoBW,CDnBX,mBCSW,CDLX,oEEk1BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFh1BA,aDXM,CCgBR,mEE20BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CFz0BA,aDlBM,CCsBV,iIAEE,eAAA,CACA,yBAAA,CACA,kBCFW,CDIX,mJACE,UAAA,CACA,aAAA,CACA,UCGS,CDFT,mBAAA,CACA,2CAAA,CAIJ,gEACE,UAAA,CACA,aAAA,CACA,UCNW,CDOX,mBAAA,CACA,2CAAA,CAGF,uDACE,iBAAA,CACA,wBAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.action {\n margin-bottom: layout.$spacing-03;\n}\n\n.content {\n @include type.type-style('heading-compact-01');\n color: $text-02;\n margin-top: layout.$spacing-05;\n margin-bottom: layout.$spacing-03;\n}\n\n.desktopHeading {\n h4 {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n }\n}\n\n.tabletHeading {\n h4 {\n @include type.type-style('heading-03');\n color: $text-02;\n }\n}\n\n.desktopHeading,\n.tabletHeading {\n text-align: left;\n text-transform: capitalize;\n margin-bottom: layout.$spacing-05;\n\n h4:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid var(--brand-03);\n }\n}\n\n.heading:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid var(--brand-03);\n}\n\n.tile {\n text-align: center;\n border: 1px solid $ui-03;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),s.locals={action:"-esm-patient-clinical-view__empty-state__action___YzcNS",content:"-esm-patient-clinical-view__empty-state__content___Z5VYW",desktopHeading:"-esm-patient-clinical-view__empty-state__desktopHeading___Xj2e2",tabletHeading:"-esm-patient-clinical-view__empty-state__tabletHeading___MrJbs",heading:"-esm-patient-clinical-view__empty-state__heading___dJ7I1",tile:"-esm-patient-clinical-view__empty-state__tile___iS7NK"};const o=s},73501:e=>{e.exports=function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}},74535:(e,t,n)=>{var i=n(46285),r=n(36529),a=n(69632),s=n(41580);e.exports=function(e,t,n){if(!s(n))return!1;var o=typeof t;return!!("number"==o?r(n)&&a(t,n.length):"string"==o&&t in n)&&i(n[t],e)}},74784:(e,t,n)=>{var i=n(3766)(Object.getPrototypeOf,Object);e.exports=i},74874:(e,t,n)=>{var i=n(90242),r=n(41439)(function(e,t){return null==e?{}:i(e,t)});e.exports=r},74967:(e,t,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},75234:(e,t,n)=>{var i=n(86912),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var a=arguments,s=-1,o=r(a.length-t,0),l=Array(o);++s<o;)l[s]=a[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=a[s];return c[t]=n(l),i(e,this,c)}}},75853:(e,t,n)=>{e=n.nmd(e);var i=n(78942),r=n(34772),a=t&&!t.nodeType&&t,s=a&&e&&!e.nodeType&&e,o=s&&s.exports===a?i.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l},75857:(e,t,n)=>{var i=n(90313);e.exports=function(e){return null!=e&&e.length?i(e,1):[]}},75964:(e,t,n)=>{var i=n(39747),r=n(74784),a=n(84882);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:i(r(e))}},76012:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=function(e){return null===e}},76853:(e,t,n)=>{var i=n(69011);e.exports=function(e){var t=i(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},77979:(e,t,n)=>{var i=n(79847),r=n(99306),a=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(e){return null==e?[]:(e=Object(e),i(s(e),function(t){return a.call(e,t)}))}:r;e.exports=o},78285:(e,t,n)=>{"use strict";n.d(t,{pj:()=>o});var i,r=n(90380),a=n.n(r),s=n(9247);const o=a().forwardRef(function({children:e,size:t=16,...n},r){return a().createElement(s.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=a().createElement("path",{d:"M25 10H7a3.0033 3.0033 0 00-3 3v6a2.0023 2.0023 0 002 2v7a2.0023 2.0023 0 002 2h4a2.0023 2.0023 0 002-2V16H12V28H8V19H6V13a1.0009 1.0009 0 011-1H25a1.0009 1.0009 0 011 1v6H24v9H20V16H18V28a2.0023 2.0023 0 002 2h4a2.0023 2.0023 0 002-2V21a2.0023 2.0023 0 002-2V13A3.0033 3.0033 0 0025 10zM10 9a4 4 0 114-4A4.0042 4.0042 0 0110 9zm0-6a2 2 0 102 2A2.0023 2.0023 0 0010 3zM22 9a4 4 0 114-4A4.0042 4.0042 0 0122 9zm0-6a2 2 0 102 2A2.0023 2.0023 0 0022 3z"})),e)})},78340:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},78942:(e,t,n)=>{var i=n(74967),r="object"==typeof self&&self&&self.Object===Object&&self,a=i||r||Function("return this")();e.exports=a},79067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},79847:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,a=[];++n<i;){var s=e[n];t(s,n,e)&&(a[r++]=s)}return a}},79968:e=>{e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},80088:(e,t,n)=>{var i=n(44700);e.exports=function(e){return i(this,e).get(e)}},80231:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(30977),r=n.n(i),a=n(95924),s=n.n(a)()(r());s.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu,.-esm-patient-clinical-view__card-header__tabletHeader___gFxMA{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu h4:after,.-esm-patient-clinical-view__card-header__tabletHeader___gFxMA h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu{height:3rem}.-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-clinical-view__card-header__tabletHeader___gFxMA{height:4.5rem}.-esm-patient-clinical-view__card-header__tabletHeader___gFxMA h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}html[dir=rtl] .-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu,html[dir=rtl] .-esm-patient-clinical-view__card-header__tabletHeader___gFxMA{text-align:right;padding:.75rem 1rem .75rem 0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/cards/card-header.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,+HAEE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBDDc,CCGd,iJACE,UAAA,CACA,aAAA,CACA,UC0BS,CDzBT,mBAAA,CACA,2CAAA,CAIJ,gEACE,WC6BW,CD5BX,mEE20BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CFz0BA,aDlBM,CCsBV,+DACE,aAAA,CACA,kEEm0BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CFj0BA,aD1BM,CCgCR,2JAEE,gBAAA,CACA,4BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.desktopHeader,\n.tabletHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: layout.$spacing-04 0 layout.$spacing-04 layout.$spacing-05;\n background-color: $ui-background;\n\n h4:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid var(--brand-03);\n }\n}\n\n.desktopHeader {\n height: layout.$spacing-09;\n h4 {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n }\n}\n\n.tabletHeader {\n height: 4.5rem;\n h4 {\n @include type.type-style('heading-03');\n color: $text-02;\n }\n}\n\n// Overriding styles for RTL support\nhtml[dir='rtl'] {\n .desktopHeader,\n .tabletHeader {\n text-align: right;\n padding: layout.$spacing-04 layout.$spacing-05 layout.$spacing-04 0;\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),s.locals={desktopHeader:"-esm-patient-clinical-view__card-header__desktopHeader___Qe2fu",tabletHeader:"-esm-patient-clinical-view__card-header__tabletHeader___gFxMA"};const o=s},80393:(e,t,n)=>{var i=n(48244),r=n(77979),a=n(81211);e.exports=function(e){return i(e,a,r)}},80547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},80777:(e,t,n)=>{var i=n(28486),r=n(80547);e.exports=function(e){return r(e)&&"[object Map]"==i(e)}},80796:(e,t,n)=>{var i=n(47403),r=n(3316)(i);e.exports=r},80824:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>N,Jt:()=>v,Op:()=>T,hZ:()=>_,mN:()=>$e,xI:()=>L,xW:()=>E});var i=n(90380),r=e=>"checkbox"===e.type,a=e=>e instanceof Date,s=e=>null==e;const o=e=>"object"==typeof e;var l=e=>!s(e)&&!Array.isArray(e)&&o(e)&&!a(e),c=e=>l(e)&&e.target?r(e.target)?e.target.checked:e.target.value:e,u=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),h=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},d="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){let t;const n=Array.isArray(e),i="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else{if(d&&(e instanceof Blob||i)||!n&&!l(e))return e;if(t=n?[]:Object.create(Object.getPrototypeOf(e)),n||h(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=p(e[n]));else t=e}return t}var f=e=>/^\w*$/.test(e),g=e=>void 0===e,m=e=>Array.isArray(e)?e.filter(Boolean):[],y=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),v=(e,t,n)=>{if(!t||!l(e))return n;const i=(f(t)?[t]:y(t)).reduce((e,t)=>s(e)?e:e[t],e);return g(i)||i===e?g(e[t])?n:e[t]:i},b=e=>"boolean"==typeof e,_=(e,t,n)=>{let i=-1;const r=f(t)?[t]:y(t),a=r.length,s=a-1;for(;++i<a;){const t=r[i];let a=n;if(i!==s){const n=e[t];a=l(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}};const x={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},w={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},A="pattern",k="required",$=i.createContext(null);$.displayName="HookFormContext";const E=()=>i.useContext($),T=e=>{const{children:t,...n}=e;return i.createElement($.Provider,{value:n},t)};var S=(e,t,n,i=!0)=>{const r={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(r,a,{get:()=>{const r=a;return t._proxyFormState[r]!==w.all&&(t._proxyFormState[r]=!i||w.all),n&&(n[r]=!0),e[r]}});return r};const M="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;var O=e=>"string"==typeof e,C=(e,t,n,i,r)=>O(e)?(i&&t.watch.add(e),v(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),v(n,e))):(i&&(t.watchAll=!0),n),D=e=>s(e)||!o(e);function z(e,t,n=new WeakSet){if(D(e)||D(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of i){const i=e[s];if(!r.includes(s))return!1;if("ref"!==s){const e=t[s];if(a(i)&&a(e)||l(i)&&l(e)||Array.isArray(i)&&Array.isArray(e)?!z(i,e,n):i!==e)return!1}}return!0}const L=e=>e.render(function(e){const t=E(),{name:n,disabled:r,control:a=t.control,shouldUnregister:s,defaultValue:o}=e,l=u(a._names.array,n),h=i.useMemo(()=>v(a._formValues,n,v(a._defaultValues,n,o)),[a,n,o]),d=function(e){const t=E(),{control:n=t.control,name:r,defaultValue:a,disabled:s,exact:o,compute:l}=e||{},c=i.useRef(a),u=i.useRef(l),h=i.useRef(void 0);u.current=l;const d=i.useMemo(()=>n._getWatch(r,c.current),[n,r]),[p,f]=i.useState(u.current?u.current(d):d);return M(()=>n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{if(!s){const t=C(r,n._names,e.values||n._formValues,!1,c.current);if(u.current){const e=u.current(t);z(e,h.current)||(f(e),h.current=e)}else f(t)}}}),[n,s,r,o]),i.useEffect(()=>n._removeUnmounted()),p}({control:a,name:n,defaultValue:h,exact:!0}),f=function(e){const t=E(),{control:n=t.control,disabled:r,name:a,exact:s}=e||{},[o,l]=i.useState(n._formState),c=i.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return M(()=>n._subscribe({name:a,formState:c.current,exact:s,callback:e=>{!r&&l({...n._formState,...e})}}),[a,r,s]),i.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),i.useMemo(()=>S(o,n,c.current,!1),[o,n])}({control:a,name:n,exact:!0}),m=i.useRef(e),y=i.useRef(a.register(n,{...e.rules,value:d,...b(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const w=i.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!v(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!v(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!v(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!v(f.validatingFields,n)},error:{enumerable:!0,get:()=>v(f.errors,n)}}),[f,n]),A=i.useCallback(e=>y.current.onChange({target:{value:c(e),name:n},type:x.CHANGE}),[n]),k=i.useCallback(()=>y.current.onBlur({target:{value:v(a._formValues,n),name:n},type:x.BLUR}),[n,a._formValues]),$=i.useCallback(e=>{const t=v(a._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[a._fields,n]),T=i.useMemo(()=>({name:n,value:d,...b(r)||f.disabled?{disabled:f.disabled||r}:{},onChange:A,onBlur:k,ref:$}),[n,r,f.disabled,A,k,$,d]);return i.useEffect(()=>{const e=a._options.shouldUnregister||s;a.register(n,{...m.current.rules,...b(m.current.disabled)?{disabled:m.current.disabled}:{}});const t=(e,t)=>{const n=v(a._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=p(v(a._options.defaultValues,n));_(a._defaultValues,n,e),g(v(a._formValues,n))&&_(a._formValues,n,e)}return!l&&a.register(n),()=>{(l?e&&!a._state.action:e)?a.unregister(n):t(n,!1)}},[n,a,l,s]),i.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),i.useMemo(()=>({field:T,formState:f,fieldState:w}),[T,f,w])}(e));var N=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},I=e=>Array.isArray(e)?e:[e],R=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},P=e=>l(e)&&!Object.keys(e).length,j=e=>"file"===e.type,F=e=>"function"==typeof e,B=e=>{if(!d)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},U=e=>"select-multiple"===e.type,V=e=>"radio"===e.type,H=e=>V(e)||r(e),G=e=>B(e)&&e.isConnected;function Z(e,t){const n=Array.isArray(t)?t:f(t)?[t]:y(t),i=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let i=0;for(;i<n;)e=g(e)?i++:e[t[i++]];return e}(e,n),r=n.length-1,a=n[r];return i&&delete i[a],0!==r&&(l(i)&&P(i)||Array.isArray(i)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(i))&&Z(e,n.slice(0,-1)),e}var W=e=>{for(const t in e)if(F(e[t]))return!0;return!1};function q(e,t={}){const n=Array.isArray(e);if(l(e)||n)for(const n in e)Array.isArray(e[n])||l(e[n])&&!W(e[n])?(t[n]=Array.isArray(e[n])?[]:{},q(e[n],t[n])):s(e[n])||(t[n]=!0);return t}function Y(e,t,n){const i=Array.isArray(e);if(l(e)||i)for(const i in e)Array.isArray(e[i])||l(e[i])&&!W(e[i])?g(t)||D(n[i])?n[i]=Array.isArray(e[i])?q(e[i],[]):{...q(e[i])}:Y(e[i],s(t)?{}:t[i],n[i]):n[i]=!z(e[i],t[i]);return n}var X=(e,t)=>Y(e,t,q(t));const K={value:!1,isValid:!1},Q={value:!0,isValid:!0};var J=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?Q:{value:e[0].value,isValid:!0}:Q:K}return K},ee=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:i})=>g(e)?e:t?""===e?NaN:e?+e:e:n&&O(e)?new Date(e):i?i(e):e;const te={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,te):te;function ie(e){const t=e.ref;return j(t)?t.files:V(t)?ne(e.refs).value:U(t)?[...t.selectedOptions].map(({value:e})=>e):r(t)?J(e.refs).value:ee(g(t.value)?e.ref.value:t.value,e)}var re=(e,t,n,i)=>{const r={};for(const n of e){const e=v(t,n);e&&_(r,n,e._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:i}},ae=e=>e instanceof RegExp,se=e=>g(e)?e:ae(e)?e.source:l(e)?ae(e.value)?e.value.source:e.value:e,oe=e=>({isOnSubmit:!e||e===w.onSubmit,isOnBlur:e===w.onBlur,isOnChange:e===w.onChange,isOnAll:e===w.all,isOnTouch:e===w.onTouched});const le="AsyncFunction";var ce=e=>!!e&&!!e.validate&&!!(F(e.validate)&&e.validate.constructor.name===le||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===le)),ue=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),he=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));const de=(e,t,n,i)=>{for(const r of n||Object.keys(e)){const n=v(e,r);if(n){const{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(de(a,t))break}else if(l(a)&&de(a,t))break}}};function pe(e,t,n){const i=v(e,n);if(i||f(n))return{error:i,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),a=v(t,i),s=v(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};if(s&&s.root&&s.root.type)return{name:`${i}.root`,error:s.root};r.pop()}return{name:n}}var fe=(e,t,n,i)=>{n(e);const{name:r,...a}=e;return P(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!i||w.all))},ge=(e,t,n)=>!e||!t||e===t||I(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),me=(e,t,n,i,r)=>!r.isOnAll&&(!n&&r.isOnTouch?!(t||e):(n?i.isOnBlur:r.isOnBlur)?!e:!(n?i.isOnChange:r.isOnChange)||e),ye=(e,t)=>!m(v(e,t)).length&&Z(e,t),ve=(e,t,n)=>{const i=I(v(e,n));return _(i,"root",t[n]),_(e,n,i),e},be=e=>O(e);function _e(e,t,n="validate"){if(be(e)||Array.isArray(e)&&e.every(be)||b(e)&&!e)return{type:n,message:be(e)?e:"",ref:t}}var xe=e=>l(e)&&!ae(e)?e:{value:e,message:""},we=async(e,t,n,i,a,o)=>{const{ref:c,refs:u,required:h,maxLength:d,minLength:p,min:f,max:m,pattern:y,validate:_,name:x,valueAsNumber:w,mount:$}=e._f,E=v(n,x);if(!$||t.has(x))return{};const T=u?u[0]:c,S=e=>{a&&T.reportValidity&&(T.setCustomValidity(b(e)?"":e||""),T.reportValidity())},M={},C=V(c),D=r(c),z=C||D,L=(w||j(c))&&g(c.value)&&g(E)||B(c)&&""===c.value||""===E||Array.isArray(E)&&!E.length,I=N.bind(null,x,i,M),R=(e,t,n,i="maxLength",r="minLength")=>{const a=e?t:n;M[x]={type:e?i:r,message:a,ref:c,...I(e?i:r,a)}};if(o?!Array.isArray(E)||!E.length:h&&(!z&&(L||s(E))||b(E)&&!E||D&&!J(u).isValid||C&&!ne(u).isValid)){const{value:e,message:t}=be(h)?{value:!!h,message:h}:xe(h);if(e&&(M[x]={type:k,message:t,ref:T,...I(k,t)},!i))return S(t),M}if(!(L||s(f)&&s(m))){let e,t;const n=xe(m),r=xe(f);if(s(E)||isNaN(E)){const i=c.valueAsDate||new Date(E),a=e=>new Date((new Date).toDateString()+" "+e),s="time"==c.type,o="week"==c.type;O(n.value)&&E&&(e=s?a(E)>a(n.value):o?E>n.value:i>new Date(n.value)),O(r.value)&&E&&(t=s?a(E)<a(r.value):o?E<r.value:i<new Date(r.value))}else{const i=c.valueAsNumber||(E?+E:E);s(n.value)||(e=i>n.value),s(r.value)||(t=i<r.value)}if((e||t)&&(R(!!e,n.message,r.message,"max","min"),!i))return S(M[x].message),M}if((d||p)&&!L&&(O(E)||o&&Array.isArray(E))){const e=xe(d),t=xe(p),n=!s(e.value)&&E.length>+e.value,r=!s(t.value)&&E.length<+t.value;if((n||r)&&(R(n,e.message,t.message),!i))return S(M[x].message),M}if(y&&!L&&O(E)){const{value:e,message:t}=xe(y);if(ae(e)&&!E.match(e)&&(M[x]={type:A,message:t,ref:c,...I(A,t)},!i))return S(t),M}if(_)if(F(_)){const e=_e(await _(E,n),T);if(e&&(M[x]={...e,...I("validate",e.message)},!i))return S(e.message),M}else if(l(_)){let e={};for(const t in _){if(!P(e)&&!i)break;const r=_e(await _[t](E,n),T,t);r&&(e={...r,...I(t,r.message)},S(r.message),i&&(M[x]=e))}if(!P(e)&&(M[x]={ref:T,...e},!i))return M}return S(!0),M};const Ae={mode:w.onSubmit,reValidateMode:w.onChange,shouldFocusError:!0};function ke(e={}){let t,n={...Ae,...e},i={submitCount:0,isDirty:!1,isReady:!1,isLoading:F(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},o={},h=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},f=n.shouldUnregister?{}:p(h),y={action:!1,mount:!1,watch:!1},A={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},k=0;const $={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let E={...$};const T={array:R(),state:R()},S=n.criteriaMode===w.all,M=async e=>{if(!n.disabled&&($.isValid||E.isValid||e)){const e=n.resolver?P((await V()).errors):await W(o,!0);e!==i.isValid&&T.state.next({isValid:e})}},D=(e,t)=>{!n.disabled&&($.isValidating||$.validatingFields||E.isValidating||E.validatingFields)&&((e||Array.from(A.mount)).forEach(e=>{e&&(t?_(i.validatingFields,e,t):Z(i.validatingFields,e))}),T.state.next({validatingFields:i.validatingFields,isValidating:!P(i.validatingFields)}))},L=(e,t,n,i)=>{const r=v(o,e);if(r){const a=v(f,e,g(n)?v(h,e):n);g(a)||i&&i.defaultChecked||t?_(f,e,t?a:ie(r._f)):K(e,a),y.mount&&M()}},N=(e,t,r,a,s)=>{let o=!1,l=!1;const c={name:e};if(!n.disabled){if(!r||a){($.isDirty||E.isDirty)&&(l=i.isDirty,i.isDirty=c.isDirty=q(),o=l!==c.isDirty);const n=z(v(h,e),t);l=!!v(i.dirtyFields,e),n?Z(i.dirtyFields,e):_(i.dirtyFields,e,!0),c.dirtyFields=i.dirtyFields,o=o||($.dirtyFields||E.dirtyFields)&&l!==!n}if(r){const t=v(i.touchedFields,e);t||(_(i.touchedFields,e,r),c.touchedFields=i.touchedFields,o=o||($.touchedFields||E.touchedFields)&&t!==r)}o&&s&&T.state.next(c)}return o?c:{}},V=async e=>{D(e,!0);const t=await n.resolver(f,n.context,re(e||A.mount,o,n.criteriaMode,n.shouldUseNativeValidation));return D(e),t},W=async(e,t,r={valid:!0})=>{for(const a in e){const s=e[a];if(s){const{_f:e,...o}=s;if(e){const o=A.array.has(e.name),l=s._f&&ce(s._f);l&&$.validatingFields&&D([a],!0);const c=await we(s,A.disabled,f,S,n.shouldUseNativeValidation&&!t,o);if(l&&$.validatingFields&&D([a]),c[e.name]&&(r.valid=!1,t))break;!t&&(v(c,e.name)?o?ve(i.errors,c,e.name):_(i.errors,e.name,c[e.name]):Z(i.errors,e.name))}!P(o)&&await W(o,t,r)}}return r.valid},q=(e,t)=>!n.disabled&&(e&&t&&_(f,e,t),!z(le(),h)),Y=(e,t,n)=>C(e,A,{...y.mount?f:g(t)?h:O(e)?{[e]:t}:t},n,t),K=(e,t,n={})=>{const i=v(o,e);let a=t;if(i){const n=i._f;n&&(!n.disabled&&_(f,e,ee(t,n)),a=B(n.ref)&&s(t)?"":t,U(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?r(n.ref)?n.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(a)?e.checked=!!a.find(t=>t===e.value):e.checked=a===e.value||!!a)}):n.refs.forEach(e=>e.checked=e.value===a):j(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||T.state.next({name:e,values:p(f)})))}(n.shouldDirty||n.shouldTouch)&&N(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&ae(e)},Q=(e,t,n)=>{for(const i in t){if(!t.hasOwnProperty(i))return;const r=t[i],s=e+"."+i,c=v(o,s);(A.array.has(e)||l(r)||c&&!c._f)&&!a(r)?Q(s,r,n):K(s,r,n)}},J=(e,t,n={})=>{const r=v(o,e),a=A.array.has(e),l=p(t);_(f,e,l),a?(T.array.next({name:e,values:p(f)}),($.isDirty||$.dirtyFields||E.isDirty||E.dirtyFields)&&n.shouldDirty&&T.state.next({name:e,dirtyFields:X(h,f),isDirty:q(e,l)})):!r||r._f||s(l)?K(e,l,n):Q(e,l,n),he(e,A)&&T.state.next({...i,name:e}),T.state.next({name:y.mount?e:void 0,values:p(f)})},te=async e=>{y.mount=!0;const r=e.target;let s=r.name,l=!0;const u=v(o,s),h=e=>{l=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||z(e,v(f,s,e))},d=oe(n.mode),g=oe(n.reValidateMode);if(u){let a,m;const y=r.type?ie(u._f):c(e),w=e.type===x.BLUR||e.type===x.FOCUS_OUT,O=!ue(u._f)&&!n.resolver&&!v(i.errors,s)&&!u._f.deps||me(w,v(i.touchedFields,s),i.isSubmitted,g,d),C=he(s,A,w);_(f,s,y),w?r&&r.readOnly||(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const L=N(s,y,w),I=!P(L)||C;if(!w&&T.state.next({name:s,type:e.type,values:p(f)}),O)return($.isValid||E.isValid)&&("onBlur"===n.mode?w&&M():w||M()),I&&T.state.next({name:s,...C?{}:L});if(!w&&C&&T.state.next({...i}),n.resolver){const{errors:e}=await V([s]);if(h(y),l){const t=pe(i.errors,o,s),n=pe(e,o,t.name||s);a=n.error,s=n.name,m=P(e)}}else D([s],!0),a=(await we(u,A.disabled,f,S,n.shouldUseNativeValidation))[s],D([s]),h(y),l&&(a?m=!1:($.isValid||E.isValid)&&(m=await W(o,!0)));l&&(u._f.deps&&ae(u._f.deps),((e,r,a,s)=>{const o=v(i.errors,e),l=($.isValid||E.isValid)&&b(r)&&i.isValid!==r;var c;if(n.delayError&&a?(c=()=>((e,t)=>{_(i.errors,e,t),T.state.next({errors:i.errors})})(e,a),t=e=>{clearTimeout(k),k=setTimeout(c,e)},t(n.delayError)):(clearTimeout(k),t=null,a?_(i.errors,e,a):Z(i.errors,e)),(a?!z(o,a):o)||!P(s)||l){const t={...s,...l&&b(r)?{isValid:r}:{},errors:i.errors,name:e};i={...i,...t},T.state.next(t)}})(s,m,a,L))}},ne=(e,t)=>{if(v(i.errors,t)&&e.focus)return e.focus(),1},ae=async(e,t={})=>{let r,a;const s=I(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await V(e);if(e)for(const n of e){const e=v(t,n);e?_(i.errors,n,e):Z(i.errors,n)}else i.errors=t;return t})(g(e)?e:s);r=P(t),a=e?!s.some(e=>v(t,e)):r}else e?(a=(await Promise.all(s.map(async e=>{const t=v(o,e);return await W(t&&t._f?{[e]:t}:t)}))).every(Boolean),(a||i.isValid)&&M()):a=r=await W(o);return T.state.next({...!O(e)||($.isValid||E.isValid)&&r!==i.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:i.errors}),t.shouldFocus&&!a&&de(o,ne,e?s:A.mount),a},le=e=>{const t={...y.mount?f:h};return g(e)?t:O(e)?v(t,e):e.map(e=>v(t,e))},be=(e,t)=>({invalid:!!v((t||i).errors,e),isDirty:!!v((t||i).dirtyFields,e),error:v((t||i).errors,e),isValidating:!!v(i.validatingFields,e),isTouched:!!v((t||i).touchedFields,e)}),_e=(e,t,n)=>{const r=(v(o,e,{_f:{}})._f||{}).ref,a=v(i.errors,e)||{},{ref:s,message:l,type:c,...u}=a;_(i.errors,e,{...u,...t,ref:r}),T.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},xe=e=>T.state.subscribe({next:t=>{ge(e.name,t.name,e.exact)&&fe(t,e.formState||$,Ce,e.reRenderRoot)&&e.callback({values:{...f},...i,...t,defaultValues:h})}}).unsubscribe,ke=(e,t={})=>{for(const r of e?I(e):A.mount)A.mount.delete(r),A.array.delete(r),t.keepValue||(Z(o,r),Z(f,r)),!t.keepError&&Z(i.errors,r),!t.keepDirty&&Z(i.dirtyFields,r),!t.keepTouched&&Z(i.touchedFields,r),!t.keepIsValidating&&Z(i.validatingFields,r),!n.shouldUnregister&&!t.keepDefaultValue&&Z(h,r);T.state.next({values:p(f)}),T.state.next({...i,...t.keepDirty?{isDirty:q()}:{}}),!t.keepIsValid&&M()},$e=({disabled:e,name:t})=>{(b(e)&&y.mount||e||A.disabled.has(t))&&(e?A.disabled.add(t):A.disabled.delete(t))},Ee=(e,t={})=>{let i=v(o,e);const r=b(t.disabled)||b(n.disabled);return _(o,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...t}}),A.mount.add(e),i?$e({disabled:b(t.disabled)?t.disabled:n.disabled,name:e}):L(e,!0,t.value),{...r?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:se(t.min),max:se(t.max),minLength:se(t.minLength),maxLength:se(t.maxLength),pattern:se(t.pattern)}:{},name:e,onChange:te,onBlur:te,ref:r=>{if(r){Ee(e,t),i=v(o,e);const n=g(r.value)&&r.querySelectorAll&&r.querySelectorAll("input,select,textarea")[0]||r,a=H(n),s=i._f.refs||[];if(a?s.find(e=>e===n):n===i._f.ref)return;_(o,e,{_f:{...i._f,...a?{refs:[...s.filter(G),n,...Array.isArray(v(h,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),L(e,!1,void 0,n)}else i=v(o,e,{}),i._f&&(i._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!u(A.array,e)||!y.action)&&A.unMount.add(e)}}},Te=()=>n.shouldFocusError&&de(o,ne,A.mount),Se=(e,t)=>async r=>{let a;r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let s=p(f);if(T.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await V();i.errors=e,s=p(t)}else await W(o);if(A.disabled.size)for(const e of A.disabled)Z(s,e);if(Z(i.errors,"root"),P(i.errors)){T.state.next({errors:{}});try{await e(s,r)}catch(e){a=e}}else t&&await t({...i.errors},r),Te(),setTimeout(Te);if(T.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:P(i.errors)&&!a,submitCount:i.submitCount+1,errors:i.errors}),a)throw a},Me=(e,t={})=>{const r=e?p(e):h,a=p(r),s=P(e),l=s?h:a;if(t.keepDefaultValues||(h=r),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...A.mount,...Object.keys(X(h,f))]);for(const t of Array.from(e))v(i.dirtyFields,t)?_(l,t,v(f,t)):J(t,v(l,t))}else{if(d&&g(e))for(const e of A.mount){const t=v(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(B(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of A.mount)J(e,v(l,e));else o={}}f=n.shouldUnregister?t.keepDefaultValues?p(h):{}:p(l),T.array.next({values:{...l}}),T.state.next({values:{...l}})}A={mount:t.keepDirtyValues?A.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!$.isValid||!!t.keepIsValid||!!t.keepDirtyValues,y.watch=!!n.shouldUnregister,T.state.next({submitCount:t.keepSubmitCount?i.submitCount:0,isDirty:!s&&(t.keepDirty?i.isDirty:!(!t.keepDefaultValues||z(e,h))),isSubmitted:!!t.keepIsSubmitted&&i.isSubmitted,dirtyFields:s?{}:t.keepDirtyValues?t.keepDefaultValues&&f?X(h,f):i.dirtyFields:t.keepDefaultValues&&e?X(h,e):t.keepDirty?i.dirtyFields:{},touchedFields:t.keepTouched?i.touchedFields:{},errors:t.keepErrors?i.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1,defaultValues:h})},Oe=(e,t)=>Me(F(e)?e(f):e,t),Ce=e=>{i={...i,...e}},De={control:{register:Ee,unregister:ke,getFieldState:be,handleSubmit:Se,setError:_e,_subscribe:xe,_runSchema:V,_focusError:Te,_getWatch:Y,_getDirty:q,_setValid:M,_setFieldArray:(e,t=[],r,a,s=!0,l=!0)=>{if(a&&r&&!n.disabled){if(y.action=!0,l&&Array.isArray(v(o,e))){const t=r(v(o,e),a.argA,a.argB);s&&_(o,e,t)}if(l&&Array.isArray(v(i.errors,e))){const t=r(v(i.errors,e),a.argA,a.argB);s&&_(i.errors,e,t),ye(i.errors,e)}if(($.touchedFields||E.touchedFields)&&l&&Array.isArray(v(i.touchedFields,e))){const t=r(v(i.touchedFields,e),a.argA,a.argB);s&&_(i.touchedFields,e,t)}($.dirtyFields||E.dirtyFields)&&(i.dirtyFields=X(h,f)),T.state.next({name:e,isDirty:q(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else _(f,e,t)},_setDisabledField:$e,_setErrors:e=>{i.errors=e,T.state.next({errors:i.errors,isValid:!1})},_getFieldArray:e=>m(v(y.mount?f:h,e,n.shouldUnregister?v(h,e,[]):[])),_reset:Me,_resetDefaultValues:()=>F(n.defaultValues)&&n.defaultValues().then(e=>{Oe(e,n.resetOptions),T.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(const e of A.unMount){const t=v(o,e);t&&(t._f.refs?t._f.refs.every(e=>!G(e)):!G(t._f.ref))&&ke(e)}A.unMount=new Set},_disableForm:e=>{b(e)&&(T.state.next({disabled:e}),de(o,(t,n)=>{const i=v(o,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},_subjects:T,_proxyFormState:$,get _fields(){return o},get _formValues(){return f},get _state(){return y},set _state(e){y=e},get _defaultValues(){return h},get _names(){return A},set _names(e){A=e},get _formState(){return i},get _options(){return n},set _options(e){n={...n,...e}}},subscribe:e=>(y.mount=!0,E={...E,...e.formState},xe({...e,formState:E})),trigger:ae,register:Ee,handleSubmit:Se,watch:(e,t)=>F(e)?T.state.subscribe({next:n=>"values"in n&&e(Y(void 0,t),n)}):Y(e,t,!0),setValue:J,getValues:le,reset:Oe,resetField:(e,t={})=>{v(o,e)&&(g(t.defaultValue)?J(e,p(v(h,e))):(J(e,t.defaultValue),_(h,e,p(t.defaultValue))),t.keepTouched||Z(i.touchedFields,e),t.keepDirty||(Z(i.dirtyFields,e),i.isDirty=t.defaultValue?q(e,p(v(h,e))):q()),t.keepError||(Z(i.errors,e),$.isValid&&M()),T.state.next({...i}))},clearErrors:e=>{e&&I(e).forEach(e=>Z(i.errors,e)),T.state.next({errors:e?i.errors:{}})},unregister:ke,setError:_e,setFocus:(e,t={})=>{const n=v(o,e),i=n&&n._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&F(e.select)&&e.select())}},getFieldState:be};return{...De,formControl:De}}function $e(e={}){const t=i.useRef(void 0),n=i.useRef(void 0),[r,a]=i.useState({isDirty:!1,isValidating:!1,isLoading:F(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:F(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!F(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:n,...i}=ke(e);t.current={...i,formState:r}}const s=t.current.control;return s._options=e,M(()=>{const e=s._subscribe({formState:s._proxyFormState,callback:()=>a({...s._formState}),reRenderRoot:!0});return a(e=>({...e,isReady:!0})),s._formState.isReady=!0,e},[s]),i.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),i.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),i.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),i.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),i.useEffect(()=>{if(s._proxyFormState.isDirty){const e=s._getDirty();e!==r.isDirty&&s._subjects.state.next({isDirty:e})}},[s,r.isDirty]),i.useEffect(()=>{e.values&&!z(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),n.current=e.values,a(e=>({...e}))):s._resetDefaultValues()},[s,e.values]),i.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=S(r,s),t.current}},81160:(e,t,n)=>{"use strict";n.d(t,{u:()=>c});var i=n(80824);const r=(e,t,n)=>{if(e&&"reportValidity"in e){const r=(0,i.Jt)(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},a=(e,t)=>{for(const n in t.fields){const i=t.fields[n];i&&i.ref&&"reportValidity"in i.ref?r(i.ref,n,e):i.refs&&i.refs.forEach(t=>r(t,n,e))}},s=(e,t)=>{t.shouldUseNativeValidation&&a(e,t);const n={};for(const r in e){const a=(0,i.Jt)(t.fields,r),s=Object.assign(e[r]||{},{ref:a&&a.ref});if(o(t.names||Object.keys(e),r)){const e=Object.assign({},(0,i.Jt)(n,r));(0,i.hZ)(e,"root",s),(0,i.hZ)(n,r,e)}else(0,i.hZ)(n,r,s)}return n},o=(e,t)=>e.some(e=>e.startsWith(t+"."));var l=function(e,t){for(var n={};e.length;){var r=e[0],a=r.code,s=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[o]={message:l.message,type:l.code}}else n[o]={message:s,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,u=c&&c[r.code];n[o]=(0,i.Gb)(o,t,n,a,u?[].concat(u,r.message):r.message)}e.shift()}return n},c=function(e,t,n){return void 0===n&&(n={}),function(i,r,o){try{return Promise.resolve(function(r,s){try{var l=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](i,t)).then(function(e){return o.shouldUseNativeValidation&&a({},o),{errors:{},values:n.raw?i:e}})}catch(e){return s(e)}return l&&l.then?l.then(void 0,s):l}(0,function(e){if(function(e){return Array.isArray(null==e?void 0:e.errors)}(e))return{values:{},errors:s(l(e.errors,!o.shouldUseNativeValidation&&"all"===o.criteriaMode),o)};throw e}))}catch(e){return Promise.reject(e)}}}},81211:(e,t,n)=>{var i=n(10358),r=n(195),a=n(36529);e.exports=function(e){return a(e)?i(e):r(e)}},81586:(e,t,n)=>{var i=n(93526),r=n(98087),a=n(13398),s=n(66040);e.exports=function(e,t){return t=i(t,e),null==(e=a(e,t))||delete e[s(r(t))]}},81797:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var i=n(39791),r=n(43944);var a=n(97942);const s=function(e){return e==e&&!(0,a.A)(e)};var o=n(7817);const l=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},c=function(e){var t=function(e){for(var t=(0,o.A)(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,s(r)]}return t}(e);return 1==t.length&&t[0][2]?l(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,a){var s=n.length,o=s,l=!a;if(null==e)return!o;for(e=Object(e);s--;){var c=n[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var u=(c=n[s])[0],h=e[u],d=c[1];if(l&&c[2]){if(void 0===h&&!(u in e))return!1}else{var p=new i.A;if(a)var f=a(h,d,u,e,t,p);if(!(void 0===f?(0,r.A)(d,h,3,a,p):f))return!1}}return!0}(n,e,t)}};var u=n(55841);const h=function(e,t){return null!=e&&t in Object(e)};var d=n(85861),p=n(61697),f=n(96956),g=n(85378),m=n(47893),y=n(9322);const v=function(e,t){return null!=e&&function(e,t,n){for(var i=-1,r=(t=(0,d.A)(t,e)).length,a=!1;++i<r;){var s=(0,y.A)(t[i]);if(!(a=null!=e&&n(e,s)))break;e=e[s]}return a||++i!=r?a:!!(r=null==e?0:e.length)&&(0,m.A)(r)&&(0,g.A)(s,r)&&((0,f.A)(e)||(0,p.A)(e))}(e,t,h)};var b=n(1677);const _=function(e,t){return(0,b.A)(e)&&s(t)?l((0,y.A)(e),t):function(n){var i=function(e,t,n){var i=null==e?void 0:(0,u.A)(e,t);return void 0===i?n:i}(n,e);return void 0===i&&i===t?v(n,e):(0,r.A)(t,i,3)}};var x=n(14151);const w=function(e){return(0,b.A)(e)?(t=(0,y.A)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,u.A)(t,e)}}(e);var t};var A=n(34149);const k=function(e){return e!=e},$=function(e,t){return!(null==e||!e.length)&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):function(e,t,n,i){for(var r=e.length,a=n+(i?1:-1);i?a--:++a<r;)if(t(e[a],a,e))return a;return-1}(e,k,n)}(e,t,0)>-1},E=function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1};var T=n(62026),S=n(28574);var M=n(39922);const O=S.A&&1/(0,M.A)(new S.A([,-0]))[1]==1/0?function(e){return new S.A(e)}:function(){},C=function(e,t){return e&&e.length?function(e,t,n){var i=-1,r=$,a=e.length,s=!0,o=[],l=o;if(n)s=!1,r=E;else if(a>=200){var c=t?null:O(e);if(c)return(0,M.A)(c);s=!1,r=T.A,l=new A.A}else l=t?[]:o;e:for(;++i<a;){var u=e[i],h=t?t(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),o.push(u)}else r(l,h,n)||(l!==o&&l.push(h),o.push(u))}return o}(e,"function"==typeof(n=t)?n:null==n?x.A:"object"==typeof n?(0,f.A)(n)?_(n[0],n[1]):c(n):w(n)):[];var n}},81935:(e,t,n)=>{var i=n(28486),r=n(80547);e.exports=function(e){return r(e)&&"[object Set]"==i(e)}},82237:(e,t,n)=>{var i=n(52837),r=n(83417),a=n(92013);e.exports=function(e){return r(e)?a(e):i(e)}},82619:e=>{e.exports=function(e){return function(){return e}}},83417:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},83546:(e,t,n)=>{var i=n(39032),r=n(77979);e.exports=function(e,t){return i(e,r(e),t)}},83943:(e,t,n)=>{var i=n(81935),r=n(49460),a=n(2306),s=a&&a.isSet,o=s?r(s):i;e.exports=o},84354:e=>{e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},84570:(e,t,n)=>{var i=n(47170),r=n(45770)(i);e.exports=r},84882:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},85832:(e,t,n)=>{var i=n(11129),r=n(74784),a=n(77979),s=n(99306),o=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)i(t,a(e)),e=r(e);return t}:s;e.exports=o},85899:(e,t,n)=>{var i=n(93526),r=n(3283),a=n(53142),s=n(69632),o=n(65387),l=n(66040);e.exports=function(e,t,n){for(var c=-1,u=(t=i(t,e)).length,h=!1;++c<u;){var d=l(t[c]);if(!(h=null!=e&&n(e,d)))break;e=e[d]}return h||++c!=u?h:!!(u=null==e?0:e.length)&&o(u)&&s(d,u)&&(a(e)||r(e))}},86484:(e,t,n)=>{var i=n(1386);e.exports=function(){this.__data__=new i,this.size=0}},86596:e=>{e.exports=function(e){return function(t,n,i){for(var r=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[e?o:++r];if(!1===n(a[l],l,a))break}return t}}},86912:e=>{e.exports=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)}},87379:(e,t,n)=>{var i=n(65650),r=n(8870),a=n(29005),s=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):a(e)}},87655:(e,t,n)=>{var i=n(3422),r=n(93526),a=n(69632),s=n(41580),o=n(66040);e.exports=function(e,t,n,l){if(!s(e))return e;for(var c=-1,u=(t=r(t,e)).length,h=u-1,d=e;null!=d&&++c<u;){var p=o(t[c]),f=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(c!=h){var g=d[p];void 0===(f=l?l(g,p,d):void 0)&&(f=s(g)?g:a(t[c+1])?[]:{})}i(d,p,f),d=d[p]}return e}},88861:(e,t,n)=>{var i=n(65650),r=n(31623),a=n(46285),s=n(33934),o=n(95894),l=n(49828),c=i?i.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,i,c,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=o;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)return!1;var g=d.get(e);if(g)return g==t;i|=2,d.set(e,t);var m=s(p(e),p(t),i,c,h,d);return d.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},88931:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var i=n(60587),r=n(8007);var a=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const s=function(e){return a.test(e)};var o="\\ud800-\\udfff",l="["+o+"]",c="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",u="\\ud83c[\\udffb-\\udfff]",h="[^"+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",f="(?:"+c+"|"+u+")?",g="[\\ufe0e\\ufe0f]?",m=g+f+"(?:\\u200d(?:"+[h,d,p].join("|")+")"+g+f+")*",y="(?:"+[h+c+"?",c,d,p,l].join("|")+")",v=RegExp(u+"(?="+u+")|"+y+m,"g");const b=function(e){return s(e)?function(e){return e.match(v)||[]}(e):function(e){return e.split("")}(e)},_=function(e){e=(0,i.A)(e);var t,n,a,o,l=s(e)?b(e):void 0,c=l?l[0]:e.charAt(0),u=l?(t=l,n=1,o=t.length,a=void 0===a?o:a,!n&&a>=o?t:(0,r.A)(t,n,a)).join(""):e.slice(1);return c.toUpperCase()+u},x=function(e){return _((0,i.A)(e).toLowerCase())}},89413:(e,t,n)=>{var i=n(94715)(n(78942),"Promise");e.exports=i},89624:(e,t,n)=>{var i=n(93655),r=n(64759),a=n(41580),s=n(64066),o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,h=c.hasOwnProperty,d=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||r(e))&&(i(e)?d:o).test(s(e))}},90242:(e,t,n)=>{var i=n(35031),r=n(27276);e.exports=function(e,t){return i(e,t,function(t,n){return r(e,n)})}},90313:(e,t,n)=>{var i=n(11129),r=n(20714);e.exports=function e(t,n,a,s,o){var l=-1,c=t.length;for(a||(a=r),o||(o=[]);++l<c;){var u=t[l];n>0&&a(u)?n>1?e(u,n-1,a,s,o):i(o,u):s||(o[o.length]=u)}return o}},90353:(e,t,n)=>{var i=n(51340),r=n(33934),a=n(88861),s=n(31182),o=n(28486),l=n(53142),c=n(75853),u=n(8666),h="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var v=l(e),b=l(t),_=v?d:o(e),x=b?d:o(t),w=(_=_==h?p:_)==p,A=(x=x==h?p:x)==p,k=_==x;if(k&&c(e)){if(!c(t))return!1;v=!0,w=!1}if(k&&!w)return y||(y=new i),v||u(e)?r(e,t,n,g,m,y):a(e,t,_,n,g,m,y);if(!(1&n)){var $=w&&f.call(e,"__wrapped__"),E=A&&f.call(t,"__wrapped__");if($||E){var T=$?e.value():e,S=E?t.value():t;return y||(y=new i),m(T,S,n,g,y)}}return!!k&&(y||(y=new i),s(e,t,n,g,m,y))}},92013:e=>{var t="\\ud800-\\udfff",n="["+t+"]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",a="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+i+"|"+r+")?",c="[\\ufe0e\\ufe0f]?",u=c+l+"(?:\\u200d(?:"+[a,s,o].join("|")+")"+c+l+")*",h="(?:"+[a+i+"?",i,s,o,n].join("|")+")",d=RegExp(r+"(?="+r+")|"+h+u,"g");e.exports=function(e){return e.match(d)||[]}},92264:(e,t,n)=>{var i=n(58898);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},92480:(e,t,n)=>{var i=n(58898);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},93526:(e,t,n)=>{var i=n(53142),r=n(65187),a=n(96493),s=n(95243);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:a(s(e))}},93650:(e,t,n)=>{var i=n(48244),r=n(85832),a=n(25288);e.exports=function(e){return i(e,a,r)}},93655:(e,t,n)=>{var i=n(87379),r=n(41580);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},94497:(e,t,n)=>{var i=n(94715)(Object,"create");e.exports=i},94687:(e,t,n)=>{var i=n(90353),r=n(80547);e.exports=function e(t,n,a,s,o){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,a,s,e,o))}},94715:(e,t,n)=>{var i=n(89624),r=n(20155);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},95243:(e,t,n)=>{var i=n(52291);e.exports=function(e){return null==e?"":i(e)}},95324:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var i=n(30977),r=n.n(i),a=n(95924),s=n.n(a)()(r());s.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-clinical-view__error-state__errorMessage___T9q98{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-clinical-view__error-state__errorCopy___-QHlU{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-clinical-view__error-state__desktopHeading___S68BW h4{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-clinical-view__error-state__tabletHeading___QZKod h4{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);color:#525252}.-esm-patient-clinical-view__error-state__desktopHeading___S68BW,.-esm-patient-clinical-view__error-state__tabletHeading___QZKod{text-align:left;text-transform:capitalize;margin-bottom:1rem}.-esm-patient-clinical-view__error-state__desktopHeading___S68BW h4:after,.-esm-patient-clinical-view__error-state__tabletHeading___QZKod h4:after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid var(--brand-03)}.-esm-patient-clinical-view__error-state__tile___-aLtB{text-align:center;border:1px solid #e0e0e0}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./../../node_modules/@openmrs/esm-patient-common-lib/src/error-state/error-state.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CCzDF,+DC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD31BF,kBAAA,CACA,mBEaW,CFVb,4DACE,mBESW,CD60BT,gDAAA,CAAA,+CAAA,CAAA,mDAAA,CAAA,wDAAA,CDp1BF,aDPQ,CCWR,oECg1BE,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD90BA,aDbM,CCkBR,mECy0BE,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDv0BA,aDpBM,CCwBV,iIAEE,eAAA,CACA,yBAAA,CACA,kBEJW,CFMX,mJACE,UAAA,CACA,aAAA,CACA,UECS,CAAA,mBAAA,CFCT,2CAAA,CAIJ,uDACE,iBAAA,CACA,wBAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@carbon/type';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.errorMessage {\n @include type.type-style('heading-compact-02');\n\n margin-top: 2.25rem;\n margin-bottom: layout.$spacing-03;\n}\n\n.errorCopy {\n margin-bottom: layout.$spacing-03;\n @include type.type-style('body-01');\n color: $text-02;\n}\n\n.desktopHeading {\n h4 {\n @include type.type-style('heading-compact-02');\n color: $text-02;\n }\n}\n\n.tabletHeading {\n h4 {\n @include type.type-style('heading-03');\n color: $text-02;\n }\n}\n\n.desktopHeading,\n.tabletHeading {\n text-align: left;\n text-transform: capitalize;\n margin-bottom: layout.$spacing-05;\n\n h4:after {\n content: '';\n display: block;\n width: layout.$spacing-07;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid var(--brand-03);\n }\n}\n\n.tile {\n text-align: center;\n border: 1px solid $ui-03;\n}\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n"],sourceRoot:""}]),s.locals={errorMessage:"-esm-patient-clinical-view__error-state__errorMessage___T9q98",errorCopy:"-esm-patient-clinical-view__error-state__errorCopy___-QHlU",desktopHeading:"-esm-patient-clinical-view__error-state__desktopHeading___S68BW",tabletHeading:"-esm-patient-clinical-view__error-state__tabletHeading___QZKod",tile:"-esm-patient-clinical-view__error-state__tile___-aLtB"};const o=s},95894:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}},96493:(e,t,n)=>{var i=n(76853),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=i(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,function(e,n,i,r){t.push(i?r.replace(a,"$1"):n||e)}),t});e.exports=s},96638:(e,t,n)=>{var i=n(1386),r=n(19770),a=n(68250);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(e,t),this.size=n.size,this}},97034:(e,t,n)=>{var i=n(46285);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},97350:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,i=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(i.index=e.index,i.input=e.input),i}},98087:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},98121:(e,t,n)=>{var i=n(3766)(Object.keys,Object);e.exports=i},98880:(e,t,n)=>{var i=n(57923);e.exports=function(e){return function(t){return i(t,e)}}},99306:e=>{e.exports=function(){return[]}}}]);